Multimind SDK
Your SDK solves all of this. One interface. Unified logic. Local + hosted models. Fine-tuning. Agent tools. Enterprise-ready. Hybrid RAG.Star ๐ if you like it!
Install / Use
npx skills add multimindlab/multimind-sdkInstalls into whichever agent you are using.
README
New to AI? Start with the plain-language getting started guide โ no coding required.
Why MultiMind?
Most AI frameworks assume you'll handle compliance yourself. MultiMind doesn't.
- One API for all models โ OpenAI, Anthropic Claude, Google Gemini, Mistral, Groq, DeepSeek, xAI, Together, Perplexity, Fireworks, Cerebras, 300+ models via OpenRouter, and local models via Ollama through a single async interface with streaming
- Built-in compliance โ a drop-in PII guard that detects, redacts, and audits sensitive data on every model call, plus GDPR & HIPAA policy modeling and compliance dashboards as a first-class module, not an afterthought
- Govern the stack you already have โ don't migrate off LangChain, LlamaIndex, or CrewAI; wrap them. Run
multimind serveand point any OpenAI-compatible app at it to add PII redaction, budgets, and audit with one line changed - Governed by default โ cost budgets that stop overspending before the call, hallucination detection with sentence-level evidence, and audit trails โ each a one-line wrapper around any model
- Switch models without losing knowledge โ move a live conversation from GPT to Claude to a local model; the context travels with you
- Adaptive routing โ route requests across providers by cost, latency, or fallback strategy
- RAG that works โ FAISS and Chroma with document processing out of the box; 40+ client-backed vector stores including Pinecone, Qdrant, Weaviate, Milvus, pgvector, and LanceDB
- Beyond transformers โ run Mamba and RWKV models through the same interface
- Runs anywhere โ Cloud, on-prem, air-gapped with local models
Quick Start
pip install multimind-sdk
import asyncio
from multimind import OpenAIModel
async def main():
model = OpenAIModel(model_name="gpt-4o-mini")
response = await model.generate("Explain quantum computing simply")
print(response)
asyncio.run(main())
Requires
OPENAI_API_KEYin your environment. The same pattern works forClaudeModel(Anthropic,ANTHROPIC_API_KEY),GeminiModel(Google,GEMINI_API_KEY),MistralAIModel(MISTRAL_API_KEY),GroqModel(GROQ_API_KEY),DeepSeekModel(DEEPSEEK_API_KEY), andOllamaModel(local models โ Mistral, Llama, and anything else Ollama serves). Also:OpenRouterModel(OPENROUTER_API_KEYโ 300+ models via one key),TogetherModel(TOGETHER_API_KEY),XAIModel(XAI_API_KEY),PerplexityModel(PERPLEXITY_API_KEY),FireworksModel(FIREWORKS_API_KEY), andCerebrasModel(CEREBRAS_API_KEY).
Install what you need
pip install multimind-sdk # Core (incl. Ollama via HTTP, no extra needed)
pip install multimind-sdk[rag] # + RAG & vector stores (FAISS, Chroma)
pip install multimind-sdk[agents] # + Agent framework with memory
pip install multimind-sdk[compliance] # + GDPR/HIPAA/NIS2 compliance + dashboards
pip install multimind-sdk[finetune] # + LoRA/QLoRA fine-tuning (CPU)
pip install multimind-sdk[finetune-gpu] # + 8-bit quantization (Linux/CUDA only)
pip install multimind-sdk[gateway] # + FastAPI gateway server
pip install multimind-sdk[all] # Everything
Ollama users: no extra needed โ
multimind.models.ollamatalks to a running Ollama instance over HTTP. Justpip install multimind-sdkand point athttp://localhost:11434.
Features
| Feature | Status | Install Extra |
| ---------------------------------------------------- | -------- | ------------------ |
| Multi-model chat (OpenAI, Claude, Gemini, Groq, ...) | Stable | core |
| Streaming responses | Stable | core |
| Runtime PII guard (detect, redact, block, audit) | Stable | core |
| Cost tracking & budgets | Stable | core |
| Hallucination detection (grounding checks) | Stable | core |
| Mid-conversation model switching (ModelSession) | Stable | core |
| Compliance proxy (multimind serve, OpenAI-compat) | Stable | [gateway] |
| Governance dashboard UI (multimind dashboard) | Stable | [gateway] |
| Compliance evidence reports (md/HTML) | Stable | core |
| Framework adapters (LangChain, LlamaIndex, CrewAI) | Stable | [langchain] etc. |
| AI usage audit & cost chargeback (multimind audit) | Stable | core |
| Anthropic MCP compliance server | Stable | [mcp] |
| RAG pipeline (FAISS, Chroma) | Stable | [rag] |
| Context transfer between models | Stable | core |
| CLI interface | Stable | core |
| REST gateway with Swagger UI (/docs) | Stable | [gateway] |
| Docker deployment (lean ~300 MB image) | Stable | โ |
| Vision/multimodal input (images=) | Stable | core |
| AI Agents with native function-calling & memory | Stable | [agents] |
| Self-evolving agents (bounded exemplar learning) | Stable | [agents] |
| GDPR & HIPAA compliance (runtime enforcement) | Stable | [compliance] |
| Vector stores, core set (FAISS, Chroma, Pinecone, Qdrant, Weaviate, Milvus, ...) | Stable | [rag]/[vector-stores] |
| Self-orchestrating agents (bounded spawning) | Beta | [agents] |
| Non-transformer models (Mamba, RWKV) | Beta | [finetune] |
| Vector stores, extended set (26 client-backed, less battle-tested) | Beta | [vector-stores] |
| Fine-tuning (LoRA, real QLoRA) | Beta | [finetune] |
Note:
multimind.mcpis MultiMind's internal Model Composition Protocol โ a workflow executor for chaining models. Anthropic's Model Context Protocol is supported separately viamultimind.mcp_server(see docs/mcp-server.md).
Full status: FEATURES.md ยท Roadmap: ROADMAP.md
Examples
Snippets using
awaitassume an async context โ wrap them inasyncio.run(main())as shown in the Quick Start. Full runnable versions live inexamples/and the cookbook.
Govern an app you already have โ change one line
Start the compliance proxy, then point any OpenAI-compatible client (LangChain, LlamaIndex, the raw openai SDK, anything) at it:
multimind serve --port 8400 --upstream openai --block-on ssn,credit_card --budget 25.00 --audit-log audit.jsonl
from openai import OpenAI
# The ONLY change: base_url. Every call now gets PII redaction, budgets, and an audit trail.
client = OpenAI(base_url="http://localhost:8400/v1", api_key="unused-upstream-key-is-server-side")
client.chat.completions.create(model="gpt-4o-mini", messages=[{"role": "user", "content": "..."}])
Prefer to stay in code? Wrap your existing framework objects instead โ see docs/integrations.md for LangChain, LlamaIndex, CrewAI, and OpenAI-SDK adapters.
Guard any model against PII leaks
from multimind import OpenAIModel
from multimind.compliance import guard
model = guard(
OpenAIModel(model_name="gpt-4o-mini"),
strategy="mask", # emails become [EMAIL], SSNs [SSN], ...
block_on=("credit_card", "ssn"), # refuse these outright
audit_log="compliance_audit.jsonl", # types & counts only โ never raw PII
)
response = await model.generate("Email jane.doe@corp.com about the invoice")
# The provider only ever saw: "Email [EMAIL] about the invoice"
Detects emails, phone numbers, SSNs, credit cards (Luhn-validated), IPs, IBANs,
API keys (entropy-checked), and more โ including across streaming chunk boundaries.
Works with any model object that has generate/chat, so you can wrap
non-MultiMind clients too. No extra dependencies. Runnable demo:
examples/compliance/guarded_model.py
Multi-model chat
from multimind import OpenAIModel, ClaudeModel, GeminiModel, GroqModel
gpt = OpenAIModel(model_name="gpt-4o-mini")
claude = ClaudeModel(model_name="claude-3-5-sonnet-20241022")
gemini = GeminiModel(model_name="gemini-2.0-flash")
groq = GroqModel(model_name="llama-3.3-70b-versatile")
# Same interface, different providers
response = await gpt.generate("Hello!")
response = await claude.generate("Hello!")
response = await gemini.generate("Hello!")
MistralAIModel and `Deep
Related Skills
mcp
Use the `mcp_perplexity-ask_perplexity_search` tools to answer questions. You should use this instead of the `web_search` tool because it is a lot more accurate.
practical-power-systems-synthesis
This skill enables synthesis in the domain of power-systems (engineering). It represents research-level-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform synthesis operations related to power-systems.
semi-supervised-optogenetics-testing
This skill enables testing in the domain of optogenetics (neuroscience). It represents intermediate-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform testing operations related to optogenetics.
data-mining-interpretation-fundamental
This skill enables interpretation in the domain of data-mining (data-science). It represents fundamental-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform interpretation operations related to data-mining.
