Skip to main content

Sonzai Mind Layer

Persistent memory, personality, and context for AI agents — whether you're building an assistant, a character, or an enterprise workflow agent.

Sonzai is the Mind Layer for AI agents: a hosted platform that gives any agent persistent memory, evolving personality, mood, relationships, and a knowledge graph. Integrate via REST, MCP, or native SDKs for TypeScript, Python, and Go.

Install

Pick the path that matches your stack. All paths talk to the same hosted API — mix and match freely (e.g. backend in Python, plus MCP from Claude Desktop for ops).

pip install sonzai
  • Python 3.11+. Sync (Sonzai) and async (AsyncSonzai) clients ship in the same package.
  • TypeScript runs on Node.js >=18, Bun, and Deno. Zero runtime dependencies.
  • Go 1.25+. Standard library only.
  • All SDKs read SONZAI_API_KEY from the environment by default.
  • OpenClaw itself is required for the OpenClaw path — install it from openclaw.ai (Getting Started).
  • Full guides: MCP · OpenClaw · REST API Reference.

Need an API key first? Create a project at platform.sonz.ai, then jump to the Quickstart for the full walkthrough.

What are you building?

Pick the track that matches your product. Each quickstart walks through the features that matter for your use case — and explicitly flags what you can skip.

Core Capabilities

Every feature below works for all three audiences, but the emphasis differs. Use the In practice tabs on each page to jump to examples for your use case.

Memory & Context
Persistent memory across sessions — facts, events, commitments, and summaries. Seed, search, and browse via SDK.
All audiences
Personality
Big Five (OCEAN) model with behavioral dimensions, interaction preferences, and trait evolution.
All audiences
Emotions & Mood
Four mood dimensions that shift with conversations and events.
Best for Companions · safe to ignore for task agents
Conversations
Real-time streaming chat. Memory, mood, and personality update automatically after each turn.
All audiences
Knowledge Base
Upload documents or push structured data to build a knowledge graph agents search during chat.
All audiences
Custom Tools
Register tools the LLM can invoke during chat — built-in capabilities, persistent agent tools, and ephemeral session tools.
All audiences
Multi-Instance
One agent, many isolated contexts — per-user, per-workspace, per-environment.
Best for Employees & Enterprise
Webhooks & Notifications
Real-time event callbacks and proactive agent messages.
Best for Enterprise
Proactive Wakeups
Agents schedule check-ins based on relationship context, tasks, or SLA.
All audiences
Voice
Text-to-speech, speech-to-text, and real-time duplex voice streaming.
Best for Companions & Enterprise support
Agent Generation
Create agents from natural-language descriptions. Auto-generate personality, bio, and seed memories.
All audiences
Evaluation
Score agent quality with rubrics, run multi-turn simulations, benchmark consistency.
All audiences
How Agents Improve Over Time
The complete picture of automatic learning: memory decay, consolidation, dedup, retrieval policy learning, personality drift, breakthroughs, and the shadow-rollout system.
All audiences
BYOK — Bring Your Own Key
Run on Sonzai's stack but bill provider tokens to your own OpenAI / Gemini / xAI / OpenRouter account. Per-project, encrypted at rest.
All audiences

Integration

For AI Agents

Feeding Sonzai docs to an AI assistant? Every page has a Copy for LLM button, and the bundles below are pre-formatted for ingestion.

Each page also has a raw-markdown URL: append .md to any doc path. For example, /docs/en/memory.md returns plain markdown ready to paste into an LLM or pipe into a tool.

How It Fits Into Your Application

Your backend handles business logic and user sessions. The Mind Layer owns agent intelligence — personality, memory, mood, and relationships. Connect via REST, MCP, or SDK; pass application context per request; let the platform manage everything else.

Read the full integration guide →

On this page