Skip to main content
← Back

Frequently asked questions

What Sonzai is, how it works, and how it compares to other memory layers and agent infrastructure.

What is Sonzai?

Sonzai is the relational agent harness for stateful AI agents — a hosted mind layer that gives any agent persistent memory, Big Five personality, 4D mood, relationships, and a knowledge graph through three peer surfaces: a REST API, an MCP server, and native SDKs for TypeScript, Python, and Go.

What is a mind layer?

A mind layer is infrastructure that sits between an LLM and your application, providing persistent state — memory, personality, mood, and relationships — across conversations. It is the relational layer an agent needs to form a long-term bond with a user. Sonzai is a hosted mind layer: one API call returns a compiled context that your LLM uses to stay in character and remember each user.

What is a memory layer for AI agents?

A memory layer stores per-user state (facts, episodes, summaries, relationships) and retrieves it at inference time so the agent remembers users across sessions. Unlike a stateless LLM, an agent with a memory layer can recall who the user is, what they care about, and what was said before.

How is Sonzai different from a vector database?

A vector database stores embeddings and does similarity search. Sonzai is a full mind layer: it builds and maintains a hierarchical memory tree (facts, episodes, summaries, relationships), runs hybrid retrieval (BM25 lexical + vector + LLM re-ranking), applies confidence decay and polarity-group conflict resolution, evolves personality and mood, and returns a compiled prompt-ready context — not just retrieved chunks. You don't run your own embedding pipeline, summarization, or decay logic.

How is Sonzai different from RAG?

RAG retrieves documents to answer questions. Sonzai retrieves per-user state to keep an agent in character. They share some implementation primitives (embeddings, retrieval) but solve different problems: RAG = 'what does the knowledge base say about X'; Sonzai = 'what do I know about this user, and how do I feel about them'.

Does Sonzai support MCP (Model Context Protocol)?

Yes — Sonzai ships a native MCP server so Claude, Cursor, and other MCP-aware clients can read and write memory, personality, and mood directly. You can also call the REST API from any language.

Which LLMs does Sonzai work with?

Sonzai is model-agnostic. It returns a compiled context (system prompt + retrieved memory + personality cues) that you inject into any LLM call — OpenAI, Anthropic, Google Gemini, Mistral, open-source, or local models.

What SDKs does Sonzai provide?

Three first-party SDKs — peer surfaces alongside the REST API and MCP server, not thin wrappers: TypeScript (@sonzai-labs/agents), Python (sonzai), and Go (github.com/sonz-ai/sonzai-go). Any other language can call the REST API directly, and any MCP-aware client (Claude Desktop, Cursor, Claude Code) can use the MCP surface.

Is Sonzai hosted or self-hosted?

Sonzai is a hosted API at api.sonz.ai. There is no agent runtime to manage, no vector database to operate, and no memory pipeline to maintain. Enterprise self-hosted deployments are available on request.

What's the retrieval latency?

The context loader targets sub-200ms for a full multi-layer context build, with a 150ms hard deadline that returns whatever has been collected. Designed for real-time voice and chat use cases where the lookup has to fit inside a conversational turn.

How does Sonzai compare to Mem0, Letta, and Zep?

Mem0 is a memory layer focused on fact extraction — Sonzai adds personality, mood, and relationships on top of hierarchical memory. Letta (formerly MemGPT) is an agent framework with self-editing memory — Sonzai is a hosted API, so there's no agent runtime to manage. Zep is a memory layer with summarization — Sonzai unifies memory, personality, mood, and relationships in one API with native MCP.

What is the Big Five personality API?

Sonzai's personality API uses the Big Five (OCEAN) and BFAS trait models to give agents stable personalities that evolve believably over time. Traits drive speech patterns, interests, and decision style. You define an agent with a bio, and Sonzai infers and maintains a consistent trait profile.

What does 4D mood mean?

Sonzai tracks agent mood on four continuous dimensions: happiness, energy, calmness, and affection. Mood is initialized from personality and updated through interactions — so agents aren't flat; they get tired, warm, anxious, or energized depending on what happens in a conversation.

How do I get started?

Install an SDK, create an agent via POST /api/v1/agents with a name and bio, then chat via POST /api/v1/agents/{id}/chat with a user_id. Memory accumulates automatically. See sonz.ai/docs/en/getting-started for a complete quickstart.

Does Sonzai work for voice agents, game NPCs, and AI companions?

Yes. Voice agents, game NPCs, AI companions, tutors, and customer-facing agents are the primary use cases — anywhere an agent needs to remember users across sessions and stay in character. The sub-200ms retrieval fits real-time voice turns.

What does Sonzai cost?

See sonz.ai/pricing for current tiers. Usage-based pricing scales with active agents and memory operations. A free tier is available for development.

Still have questions?

Read the docs, or get an API key and start building.