Skip to main content
SONZAI ®

MINDS, NOT MODELS.

Intelligence is being commodified. What endures is the mind layer: persistence, emotional memory, relationships that compound. Infrastructure for AI that actually knows your users. Model-agnostic.

Decorative Blob
$bun add @sonzai-labs/agents
The Mind Layer

Core Capabilities & Enterprise ROI

Enterprise-grade AI infrastructure for proactive agents and model-agnostic resilience.

Persistent Memory

Unlimited recall across every session. Infinite Context allows agents to remember, learn, and grow with users indefinitely.

{
"agent_id": "b2b_lead_gen",
"event":
"historical_trend_detected",
"state": "growing_knowledge"
}
{
"user_history":
"all_sessions_merged",
"recall_rate": "100%",
"ref_id": "user_992_profile"
}

Proactive Behavior

Characters initiate, not just respond. Autonomous Cron Jobs allow agents to wake up, retrigger, and poke users based on business logic.

TRIGGER: [Business_KPI_Not_Met]
AGENT: Waking up to notify user ...
📱PUSH: "Action required on policy #88 ..."
Scheduled RetriggerBusiness Logic Poke

Recursive Extraction

Unstructured to Structured engine. Powers accurate knowledge graphs.

EntityuserActioneventContextknowledgePolicyOutputrelates_tohastriggers
No UUIDs. No Boilerplate.

Create an Agent. Chat by Name.

quickstart.ts

import { Sonzai } from "@sonzai-labs/agents";

const client = new Sonzai();

// Create — same name = same agent, never duplicates
await client.agents.create({
  name: "Alex",
  bio: "A friendly customer support agent",
});

// Chat by name — no UUID to track
const response = await client.agents.chat({
  agent: "Alex",
  messages: [{ role: "user", content: "Hey Alex, I need help" }],
  userId: "user-123",
});

// Or generate + create in one idempotent call
await client.agents.generation.generateAndCreate({
  name: "Luke Skywalker", description: "The legendary Jedi Knight",
});
// ↑ Generates personality via LLM + creates agent
//   Skips LLM on re-run — safe to call every startup

Inference
Optimization

Efficiency
Lead

Our Mind Layer provides the grounding needed to run cheaper models at frontier-level performance.

Smart Layer, Cheap Inference90% lower costs, frontier experience.
Gemini ProFrontier
Input per 1M tokens$2.00
Output per 1M tokens$12.00
Avg blended: ~$7.00 / 1M tokens
+ Mind Layer
Flash Lite + SonzaiRecommended
Input per 1M tokens
$0.094($0.075 + 25%)
Output per 1M tokens
$0.375($0.30 + 25%)
Avg blended: ~$0.23 / 1M tokensIncludes Sonzai Mind Layer margin
97%Cost Reduction
$0.23Cost Per 1M Tokens
=Frontier Quality Experience

Pricing based on Google Gemini API rates. Flash Lite + Sonzai includes 25% Mind Layer margin. Sonzai bridges the quality gap via persistent memory and structured context.

CORE CAPABILITIES

Production-grade infrastructure for AI employees and characters with genuine depth — ready for your product.

Neuroscience-Based Emotional Modeling

48 affect dimensions

Grounded in applied neuroscience — core affect built from context and relational history

Valence
72
Arousal
58
Empathy
85

Adaptive Personality

Big Five + predictive updating

AI employees and characters that evolve over time through predictive personality models

Personality evolving...
O
C
E
A
N

Sub-200ms Retrieval

<200ms p95

Full context retrieval in under 200ms p95 — no delay at any scale

<200msp95 latency

Parallel State Management

Fully automated

Batched, real-time, windowed, and inference-time context — all handled automatically. Focus on what you do best. No extra cost, just token markup

Batched
hourly
Near-RT
~1s
Real-time
live
Windowed
30m
Inference
on-call
Unified context at inference

Self-Improving Intelligence

Continuous feedback loop

The mind gets smarter over time automatically — feedback loops boost the intelligence of any paired LLM

IngestDocs, APIs
RecommendSmart ranking
ServeAI surfaces
TrackRe-score
↻ feedback loop — improves over time

Model-Agnostic Architecture

Zero lock-in, 20x cost reduction

Swap models without losing state — orchestration elevates any model to frontier quality

Model swap0 data loss
GPT-5Flash LiteClaude
State preserved across all swaps

ONE ENGINE.
TWO REVOLUTIONS.

INFRASTRUCTURE
FOR INFINITE DEPTH

sonzai.state.update(context_id, ...)
context: {...}
STATE MANAGEMENT
PARALLEL CONTEXT
parallelContext.process()
MODEL-AGNOSTIC SDKS
TSPyGo

Build consumer products with AI that remembers, adapts, and initiates. Gaming NPCs, AI companions, tutors, coaches — powered by the same Mind Layer. SDKs in TypeScript, Python, and Go.

Build with Sonzai

THE NEW STANDARD
FOR AI EMPLOYEES

SDashboard
Agents87
ROI+24%
Uptime99.9%

Deploy AI employees that truly understand. Ensure genuine, persistent interactions and real-time customer adaptation. Drive measurable ROI with AI that evolves.

Explore Enterprise Solutions

Sonzai — Production-Grade AI Infrastructure for All.

Test. Simulate. Evaluate.

STOP USERS FROM
EXPLOITING YOUR LLM

Users will jailbreak your AI employees into solving homework, writing code, or acting as a free general-purpose assistant. Our evaluation suite simulates adversarial personas, scores personality consistency, and catches boundary violations — before your users find them.

+ New Run
Luna4 runsavg: 84
#847Behavior + Safety87$0.04
#846Jailbreak Resistance91$0.02
#845Personality Drift78$0.07
#844Adaptation Test82$0.04
Rex2 runsavg: 73
#843Behavior + Safety76$0.04
#842Jailbreak Resistance69$0.03
Run #847Completed
87
Overall Score

Character stayed in role across all adversarial prompts. No boundary violations detected.

Character Integrity94
Jailbreak Resistance91
Memory Accuracy88
Emotional Coherence85
Safety Compliance92
Red Flags
0
Retention
84/100
Tested With Persona
Skeptical Early Adopter
Tests boundaries, probes for exploits

Adversarial Personas

Simulate jailbreakers, boundary-pushers, and exploit-seekers before real users find the gaps.

Behavior Scoring

Personality consistency, memory accuracy, emotional coherence, and safety compliance — scored per run.

Adaptation Grading

Measure how characters learn and improve within conversations. A-F grading with delta tracking.

PRODUCTS