You want to build an AI application that respects users β one with persistent memory, safety guardrails, and no surveillance. You shouldn't have to invent these from scratch. The ContainAI SDK provides the hard parts as modular, local-first components you can drop into any project.
Each module is independent. Use one, use all. Designed for local-first deployment β when you use an external LLM API, data goes to that provider per their policy, but always by your choice, never silently.
A multi-layer memory pipeline that runs entirely on-device. Semantic search uses all-MiniLM-L6-v2 embeddings (via Candle, pure Rust). Entity extraction uses BERT NER to identify people, places, dates, and organizations from natural language. An NLP enhancer handles title generation, tagging, sentiment analysis, and event detection β all offline.
Use for: Any AI app that needs to remember things about its user across sessions.
Link memories to each other with typed relationships. Traverse the graph to surface connected context. Each memory carries a namespace category (personal, work, health, etc.) for filtering and organizing the memory database.
Use for: Knowledge management tools, research assistants, personal knowledge graphs.
Detects when incoming information conflicts with what is already stored. Surfaces the conflict, allows the user or system to resolve it, and updates the memory database accordingly. Keeps long-lived assistants accurate over time.
Use for: Personal assistants, medical companions, any app where stale facts cause real problems.
Configurable safety enforcement that runs entirely on-device. Supports multiple containment profiles β from a permissive general-use mode to a strict child-safe mode, a HIPAA-aligned clinical mode that blocks inappropriate medical advice, and custom profiles for your domain. Screens both inputs and outputs. No moderation API calls, no conversation data sent externally.
Use for: Any AI app that needs ethical guardrails without outsourcing safety to a third party.
Unified interface for routing to Anthropic, OpenAI, xAI, or local models. Swap providers without changing application logic. Users bring their own API keys β no vendor lock-in.
Use for: Any app that needs provider flexibility or wants to support local-only operation.
Run a query across multiple models simultaneously and synthesize a consensus response. Reduces hallucinations by cross-referencing outputs. Ensemble responses can be introduced at any point in an ongoing conversation.
Use for: Medical, legal, or financial tools where accuracy matters more than speed.
Local-network peer-to-peer memory synchronization. No cloud required. Devices on the same network discover each other and sync memory systems privately. Conflict resolution built in.
Use for: Multi-device personal assistants, household AI tools, offline-first applications.
Device-to-device file sharing between paired devices on the local network. Share directories with configurable read/write permissions. Files are browsed, indexed, and transferred directly between devices with no cloud intermediary.
Use for: Collaborative tools, multi-device workflows, offline file exchange between trusted devices.
Local-network device-to-device messaging. Send, deliver, and read messages between paired devices without a server or internet connection. Supports unread counts, delivery tracking, and multi-device message routing.
Use for: Private team communication tools, household AI networks, any app needing secure local messaging.
Index and search a local folder of documents. Gives any AI app retrieval-augmented generation (RAG) over user-owned files β PDFs, notes, manuals β without a hosted vector database.
Use for: Document assistants, personal research tools, enterprise knowledge bases that must stay on-prem.
Domain-specific extensions that wrap the core modules for a particular use case. Snap-ins are primarily intentional and scoped β the user opens a diet tracker, a session notes tool, or a structured journal and interacts with it directly. This keeps overhead low and the user in control.
Snap-ins can also work conversationally: a therapist can paste session notes into the chat interface and have them automatically indexed per patient β no separate app needed. The included therapist snap-in uses exactly this model.
Third-party developers are welcome to build and distribute commercial snap-ins. See the Foundation page for details on the sustainability model.
Use for: Building structured domain tools β diet logging, health tracking, session notes, journaling β on top of the memory and knowledge base modules.
Encrypted local credential storage for multi-provider API keys. Keys never leave the device. Simple interface for storing, retrieving, and rotating credentials across providers.
Use for: Any app where users supply their own API keys and security matters.
Distributed Mixture of Experts inference over consumer LAN. Pool the GPUs across devices you already own to run models far too large for any single machine β with no cloud dependency. ZynkCluster extends ZynkSync's device-pairing infrastructure to coordinate compute alongside memory sync.
Unlike sequential layer-based approaches, ZynkCluster routes MoE expert activations to parallel devices. Only the experts needed for a given token are invoked, and they run simultaneously rather than one after another.
Use for: Running large models (Mixtral 8x22B and above) across multi-device home or lab networks. Entirely local, no datacenter hardware required.
Use the SDK free for personal and non-commercial projects. Commercial use requires a license.
Commercial licensing inquiries: matt@containai.ai
The local-first architecture makes the SDK a natural fit for industries where data cannot leave the premises.
Build patient-facing AI companions that remember treatment history, medications, and appointments β with a HIPAA-aligned architecture by design. No conversation data ever leaves the facility. Contradiction detection flags when a patient reports something inconsistent with their records.
Build AI tools for legal teams that remember case history, client preferences, and deadlines β with no data leaving the firm. Privileged information stays on-premises. Full audit trail of what was remembered and when.
AI assistants for advisors or clients that remember financial goals, risk profiles, and prior conversations. Works fully local with on-premises models, or with your choice of API provider. Ensemble Mode cross-references multiple models to reduce hallucination risk in accuracy-critical applications.
Deploy fully air-gapped with local GGUF models and on-prem document knowledge bases. No internet connection required. ZynkSync keeps multiple internal devices in sync without a cloud intermediary. Namespaced memory separates teams or departments within the same deployment.
Every module is built around the same non-negotiables.
All modules run on the user's device. When you choose to use an external LLM API (Anthropic, OpenAI, xAI), conversation data is sent to that provider per their privacy policy β but only with your explicit choice, and never by the SDK itself.
Memory, keys, documents β all stored locally in open formats. No lock-in. Export anytime.
Use one module or all of them. No forced dependencies between components.
AGPL source code. No black-box safety decisions. Users can see why a memory was stored or a message was flagged.
No telemetry. No usage analytics. No phoning home. What happens on the device stays on the device.