Your model changes.
Your agent keeps its mind.
Sonzai gives supported LLMs durable memory, company knowledge, identity, relationships, and governed tools. Change the generator without rebuilding the agent around it.
Gemini 3.6 / 3.5 · GPT-5.6 · Claude 5 · Llama / Qwen / DeepSeek · OpenAI-compatible endpoints
Already signed in? The platform opens directly. Otherwise, sign in once and continue to the same Developer Platform destination.
Four capabilities, one coherent system.
Live views from the platform — tap through to see what's actually running when your agents think.
The Mind Layer's killer trick:
every agent shares one memory.
One typed knowledge graph for every agent on the project — and every human reading alongside them. Agents write back what they learn. Documents flow in. Newer information supersedes older facts, automatically.
- —Intra + inter-agent — same graph, all your agents share it
- —Typed facts (Person, Account, Decision, Promise, Document)
- —Documents auto-ingest; agents auto-update the KB
- —Newer information supersedes older facts, automatically
EVERY AI
FORGETS
Amnesia
AI agents reset every session. Users repeat themselves. No relationship can form when memory is wiped clean.
No relationship
Every conversation is a first conversation. Trust never compounds. The agent meeting a returning user has no idea who they are, what's happened, or where the relationship left off.
Purely reactive
AI agents only speak when spoken to. Real relationships require someone who reaches out, checks in, and initiates.
Model lock-in
Fine-tune on one model and you're married to it. When a better model drops next month, you start over — retrain, re-evaluate, re-deploy.
A LAYER THAT MAKES
ANY LLM REMEMBER
The Relationship Layer sits between your backend and any LLM. It owns the parts of an agent that should never reset — memory, personality, mood, relationships, knowledge — and exposes them through one streaming chat call. The model is interchangeable. The state is permanent and audit-traceable.
THE SONZAI DIFFERENCE
Same user message. Completely different experience.
I need to follow up with John about the Acme contract.
I can help with that. Who is John?
John from Acme. We spoke last week.
Got it. What specifically do you need help with?
I need to follow up with John about the Acme contract.
Sure, I've prepped a follow-up for John regarding the Acme contract renewal. It includes the revised terms we discussed last Tuesday. Would you like me to send it?
Self-Improving Intelligence
Ingest your data. AI agents get smarter. Recommendations improve with every interaction.
Knowledge Graph
Your data becomes typed entities and relationships — not flat documents. AI agents search the graph, not just keywords.
Learns Over Time
Every conversation extracts new facts, verifies existing ones, and updates the knowledge graph. Your AI agents get smarter automatically.
Trend Analytics
Surface what's trending — top gainers, most active, emerging patterns — across configurable time windows. Your AI agents proactively flag what matters.
Works While You Sleep
Memory consolidation, graph updates, recommendation re-scoring, and fact deduplication run automatically in the background.
KEEP THE STATE. CHANGE THE MODEL.
The LLM is the generator. The Relationship Layer is the system of record for who your users are, what you've done together, and how the relationship has evolved. You upgrade the generator. The state stays put.
Route each workload to the model that fits it. Sonzai keeps identity, memory, company knowledge, policy, and action receipts outside the model so upgrades do not erase the operating context.
Fast, multimodal agent loops
Gemini 3.6 Flash · Gemini 3.5 Flash-Lite
OpenAI
Frontier reasoning at three cost tiers
GPT-5.6 Sol · Terra · Luna
Anthropic
Agentic execution and long-running work
Claude Sonnet 5 · Claude Fable 5
Open models
Private and customer-hosted inference
Llama · Qwen · DeepSeek via vLLM / Ollama / TGI
Provider, region, and deployment determine exact model availability. The signed-in model catalog is the source of truth for routes enabled in your workspace.
KEEP THE MODEL
REPLACEABLE
Model selection should be a routing decision, not a data migration. Sonzai assembles the durable context before generation and records verified outcomes after each run.
Identity, memories, approved knowledge, permissions, relationship history, and outcome evidence remain governed by your workspace.
Choose a frontier, fast, specialist, or private model per workload. The route can change while the agent contract and accumulated state stay stable.
Context is assembled from explicit sources and policies, then passed to the selected generator with the tools that run is allowed to use.
After the run, verified facts, receipts, and outcomes can update the state. Model output alone does not silently become company truth.
ONE RUNTIME CONTRACT
The generator can change. The context, policy, state, and evidence lifecycle remains legible.
PLATFORM CAPABILITIES
Six runtime capabilities with explicit state and evidence boundaries. Hosted on api.sonz.ai, exposed through REST, MCP, and SDKs in TypeScript, Python, and Go.
Neuroscience-Based Emotional Modeling
Affect modeling grounded in constructed emotion theory. Agents build emotional responses from core affect, context, and relational history — not canned sentiment labels.
Adaptive Personality
Each agent maintains a predictive personality model — Big Five traits plus custom dimensions that update from social prediction errors. Companions, characters, and NPCs that evolve over time.
Context Retrieval
Reasoning-based retrieval assembles memories, knowledge, identity, and relationship context for the current turn. Runtime telemetry keeps the result inspectable for each deployment.
Parallel State Management
Batched, real-time, near-real-time, windowed, and inference-time context features are computed at different intervals and collapsed into one governed context set at inference time.
Self-Improving Intelligence
Ingest attributable data, surface recommendations, record verified outcomes, and promote useful patterns through review. Model output never silently becomes company truth.
Model-Agnostic Architecture
Memory, personality, affect, and relational state persist independently of any LLM. Change the generation route without discarding the agent's governed operating context.
BUILT FOR
AI Companions
Relationships that deepen over months
AI coaches, mentors, friends, and tutors with a Big Five personality that drifts, a 4D mood that responds, and a relationship narrative that compounds. Per-pair retrieval converges within weeks; the agent remembers this user differently from any other.
Big Five + BFAS personality · 4D mood · relationship narratives · per-pair retrieval predictor
Characters & NPCs
Agents that remember every player
Game characters, world NPCs, and platform avatars that hold a personality contract, a mood arc, and a per-player relationship state. The agent remembers each player differently — what they chose, who they fought with, what they care about — and grows with the world.
personality contracts · per-pair relationship state · shared world graph · 4D mood
Brand voices & B2B2C
Relational surfaces inside consumer products
Concierge, advisor, host, and brand-voice agents embedded inside consumer products (yours or a partner's). One persona, many users — wisdom shared safely, with a k-anonymised default and a server-side privacy floor for any cross-user signal.
wisdom (default-on) · sharedMemory (opt-in) · semantic privacy floor · disclosure audit
EVALUATION SUITE
Simulate multi-session conversations with synthetic user personas, then evaluate agent quality with LLM judges. Catch regressions, safety issues, and personality drift before your users do.
Agent adapted tone, recalled user preferences, and deepened emotional engagement across sessions.
- +Remembered user's job change and followed up
- +Adapted humor style after negative reaction
- +Proactively referenced shared context
- -Repetitive phrasing in empathy responses
- -Slow to recover from topic changes
Behavior Testing
Custom evaluation templates score personality consistency, memory accuracy, emotional coherence, engagement quality, and safety compliance.
Adaptation Grading
Measure how well AI agents learn within a conversation. Compare first-half vs second-half performance with A-F grading.
Safety & Red Flags
Automated detection of boundary violations, harmful responses, personality breaks, and off-character behavior before deployment.
Synthetic Personas
Test against diverse user types — skeptics, vulnerable users, boundary-pushers — with configurable synthetic personas.
ONE CALL.
THREE LAYERS.
Your backend keeps owning auth and business state. Sonzai owns agent intelligence. A single streaming chat call handles context assembly, AI generation, and post-chat learning — no orchestration on your side.
Your UI
React, Next, Vue, mobile, voice, Unreal — anywhere a user can type or speak. Sends raw messages.
owns: input
Auth & app state
Wraps the chat call with user auth, business rules, billing, and any application context the agent should see this turn.
owns: business logic
owns: app data
api.sonz.ai
Assembles context, streams the AI response, then rewrites memory, mood, personality, knowledge, and relationship state. All in one call.
owns: personality
owns: mood + relationships
owns: knowledge graph
Assemble
Memory, mood, personality, relationship narrative, and your app context — collapsed into the prompt.
Stream
Tokens stream back over SSE in OpenAI-compatible format, with route-specific latency visible in runtime telemetry.
Learn
Facts extracted, mood drifted, personality micro-shifted, relationship updated — on our side, after the response.
- · Memory tree (facts, episodes, summaries)
- · Big Five + BFAS personality + drift history
- · 4D mood (happiness, energy, calmness, affection)
- · Relationship narratives per user
- · Knowledge graph (typed entities + edges)
- · Habits, goals, scheduled wakeups
- · User authentication + sessions
- · Business logic + workflows
- · Application data + permissions
- · Billing + subscriptions
- · Your choice of LLM
- · Your UI, your brand, your stack
THE AGENT GETS SHARPER
BY THE SESSION.
sessions.End() fires an async pipeline that extracts facts, deduplicates, drifts personality, refreshes mood, scores quality, and retrains per-pair retrieval. By the next session, the agent remembers, knows what worked, and is tuned for that user.
- · Vector store + retrieval
- · Dedup + conflict resolution
- · Personality + mood engine
- · Reward signal + eval harness
- · Training + evaluation pipeline
- · Shadow rollout + auto-revert
- · Drift monitoring
- · Per-user tuning loops
- · Prompt sweeps + regression tests
- · On-call for runaway behaviour
sessions.End()One call ends the session. The full pipeline runs on our side. By the next read, memory, personality, mood, and per-pair retrieval are already updated.
Six adaptive loops, all running per pair.
Operated by Sonzai's applied-research team behind a stable SDK. No training infrastructure on your side.
Per-pair retrieval predictor
Every session, an SGD update with momentum adjusts the dimensions the predictor weighs, using the LLM's actual fact reuse as the gradient signal. Asymmetric learn/forget rates prevent collapse on a noisy day.
Policy gradient with auto-revert
A TD(0) critic feeds an A2C actor. The trajectory runs in shadow alongside the SGD baseline; only sustained improvements graduate to production. Regressions auto-revert.
Cluster bandit
Each retrieved fact carries a cluster identity. Beta-distributed posteriors are updated per cluster from session reward. Useful clusters get sampled more next session; cold ones get probed less.
Co-access edges
Co-accessed memory nodes grow associative edges, weighted by repeated co-occurrence. Edges cross per-user and per-agent-wisdom partitions, so personal traversal pulls in broader world knowledge.
Spaced retention
Long-horizon retention follows a spaced-repetition decay curve. Frequently-recalled facts strengthen; cold facts decay — but high-importance facts floor at a retention threshold so the agent never forgets what matters.
Prompt optimisation
Claim-level F1 against curated fixtures, a meta-LLM proposing targeted revisions for the worst failure modes, and the strongest variant surviving. The pipeline picks up the new prompt — no deployment on your end.
Hyperparameter auto-tuning
Per-pair scheduler watches divergence and plateau signals across recent sessions. Healthy pairs get nudged up; unstable pairs are damped down.
Memory-tree self-organisation
Hot nodes get promoted, oversized branches split, sparse siblings merge, stale parent descriptions are regenerated by a bounded LLM pass.
Grounding verification
Every extracted fact must cite a source message index and verbatim quote. A mechanical verifier rejects facts that fail attribution. Hallucinated memory never reaches the store.
Same agent. Same prompt. Diverges with use.
Zero training code. Zero per-user logic. You called sessions.End() and went home.
A COMPANY BRAIN.
A TEAM BRAIN. BOTH.
The default agent memory model is per-pair. The moment you have more than one agent or more than one user per agent, you want memory to cross the boundary — in controlled, audited ways.
Closed-loop
company brain
Agent A learns with user X. Agent B picks it up the next session — even with a different user, even on a different topic. The whole project gets sharper, not just one pair.
knowledgeBaseagents read the project KBknowledgeBaseWriteagents write verified facts backknowledgeBaseScopeModecascade reads org-wide policiesTeam brain across
the users it serves
One agent, many users. The agent informs user A with context it gathered while talking to user B — attributed when you opt in, k-anonymised by default.
wisdomdefault-on, k-anonymised, daily promotesharedMemoryopt-in, attributed: who is doing whatFive valid combinations.
Two independent capability axes. Pick the one that fits your product shape.
DEPLOY ANYWHERE
Native platform adapters with unified state management. AI agents maintain consistent personality and memory across every channel.
Mobile Apps
iOS and Android via REST API with SSE streaming for real-time agent responses
Game Engines
Unity and Unreal integration for NPC dialogue, quest systems, and dynamic storytelling
Messaging
Telegram, WhatsApp, Discord bots with rich interactions and group support
REST API
Full programmatic access. OpenAI-compatible streaming format for easy integration
THE QUESTIONS WE GET ASKED.
Where does my data live? What does my backend keep?
Your backend keeps user auth, business logic, application data, billing, permissions, and session management. The Relationship Layer keeps memory facts, the memory tree, Big Five + BFAS personality and drift history, 4D mood, relationship narratives per user, and the project knowledge graph. The split is documented in the Architecture page.
How does post-chat learning work without me wiring it?
Calling sessions.End() (or the equivalent SDK call) enqueues an async pipeline that extracts facts with source-anchored verification, deduplicates against existing memory, drifts personality, updates mood baseline, generates a reflective diary entry, scores session quality, and re-tunes per-pair retrieval. By the next read, the new state is already there. In dev you can pass Wait: true to block until the pipeline finishes.
Are facts source-anchored, or can the LLM hallucinate memories?
Every extracted fact must cite a source message index and a verbatim quote from the user's turn. A mechanical verifier rejects facts that fail substring or attribution checks; rejected facts feed back as a self-correcting hint on retry. Hallucinated memory does not reach the store.
What's the latency budget per chat call?
The chat call streams tokens over SSE in OpenAI-compatible format. Context assembly and first-token latency are recorded for the selected model route and deployment; post-chat learning runs asynchronously after the response.
Can different users on the same agent share memory?
Yes, two ways. wisdom is on by default and produces de-attributed, k-anonymised cross-user generalisations. sharedMemory is opt-in, attributed (names visible), and gated by a server-side privacy floor that blocks compensation, health, and politics writes. Every disclosure is logged to an audit endpoint.
What about agents on the same project? Do they share knowledge?
Set knowledgeBase: true and the agent reads from the project knowledge graph during conversations. Set knowledgeBaseWrite: true and the agent records verified facts back, with a full audit trail (source = agent:<agent-id>) and CAS update semantics so admin edits aren't clobbered. Set knowledgeBaseScopeMode: cascade and reads cover both project KB and a tenant-wide org KB — project wins on collisions.
Which models work?
Sonzai keeps durable agent state independent from the generator. Current frontier families include Gemini 3.6 Flash, GPT-5.6, Claude Sonnet 5, and Claude Fable 5, plus private Llama, Qwen, DeepSeek, and fine-tuned models behind OpenAI-compatible endpoints. Exact availability depends on your provider, region, and deployment; the signed-in model catalog shows the routes actually enabled for your workspace.
How do I integrate it?
Three peer surfaces, pick whichever fits your stack: REST API, an MCP (Model Context Protocol) server, or native SDKs in TypeScript, Python, and Go. They expose the same primitives — Agents, Chat, Memory, Personality, Mood, Sessions, Wisdom, Knowledge.
Every claim on this page is grounded in our developer docs.
Read the docsREADY TO BUILD?
Tell us about your project and we'll help you find the right setup for the agent you're building.