Persona AI SDK
A TypeScript SDK that bundles default AI personas, durable character memory, and OpenAI and Amazon Bedrock adapters in one package.
At a Glance
ai-persona-sdk TypeScript SDK released under the MIT License; free to use, copy, modify and distribute.
Engagement
Available On
Listed Nov 2026
About Persona AI SDK
Persona AI SDK, published to npm as ai-persona-sdk by Tavern Labs, is a TypeScript SDK for applications where an AI character should stay consistent and remember what matters across conversations. It combines a catalog of eight persona cards with a provider-neutral memory and response runtime. It is MIT-licensed and installed with a single npm package.
What It Is
The SDK separates five concerns: personas, memory, model, persistence, and interface. Each is replaceable. Personas are ready-made cards with prompts, traits, greetings, and memory seeds. The memory layer handles extraction, provenance, consolidation, visibility, recall, and lifecycle. Developers pick a persona, wire a model, and get a character that remembers.
How the Runtime Works
A single respond call on the persona runtime recalls relevant memories, compiles character instructions, asks a model for the next response, ingests the completed turn, and advances relationship state. It returns the response text, voice delivery metadata (emotion, pace, expressiveness, style, pause), and a trace with provider, model, timings, and recalled memory IDs.
Memory records keep the message IDs that support them. Duplicates merge, mutable state can be superseded, and contradictions are reported rather than silently overwritten. Memories support character-only and user-only visibility.
Personas, Providers, and Storage
The bundled personas are Atlas, Sage, Vera, Scout, Wren, Ember, Lumen, and Mica, covering roles such as strategic analyst, customer support agent, sales development rep, and research assistant. Adapters for the OpenAI Responses and Embeddings APIs and for Amazon Bedrock (Converse extraction, Titan V2 embeddings) can be mixed, since extraction, embeddings, and generation are independent ports. Storage options are in-memory, atomic JSON file, and SQLite (via optional better-sqlite3). Scaled deployments can implement the documented MemoryStore contract.
Migration and Setup
The sillytavern import path reads SillyTavern Character Card V1/V2/V3 files and JSONL chat histories. The package also includes a framework-neutral HTTP service adapter and evaluation helpers. It requires Node.js 20 or newer plus an OpenAI API key or AWS credentials with Bedrock model access.
Community Discussions
Be the first to start a conversation about Persona AI SDK
Share your experience with Persona AI SDK, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
ai-persona-sdk TypeScript SDK released under the MIT License; free to use, copy, modify and distribute.
- MIT License
- Default persona catalog (8 personas)
- Durable character memory runtime
- OpenAI and Amazon Bedrock adapters
- In-memory, atomic JSON and SQLite stores
Capabilities
Key Features
- Eight bundled persona cards
- Durable character memory with provenance
- Memory consolidation, supersession, and contradiction reporting
- Character-only and user-only memory visibility
- Persona runtime with relationship state progression
- Voice delivery metadata in responses
- OpenAI and Amazon Bedrock adapters
- Mixable providers for extraction, embeddings, and generation
- In-memory, atomic JSON, and SQLite stores
- SillyTavern Character Card and JSONL chat import
- Framework-neutral HTTP service adapter
- Retrieval and persona evaluation helpers
- Built-in TypeScript type declarations
