๐Ÿง  Cerebro โ€” Platform & Security ๐ŸŒ Loom โ€” Infrastructure & Deploy ๐Ÿงถ Weave โ€” Plugins & Knowledge โšก Workflows ๐Ÿ“Š Presentation

๐Ÿง  Cerebro โ€” Secure Agentic AI, Any Model, Any Cloud, Any Channel

One platform where identity, credentials, knowledge, and policy enforcement follow every action โ€” regardless of which AI model powers it, which cloud runs it, or how you access it. Click any block for details.

๐Ÿ“ก Access Channels ๐Ÿ–ฅ๏ธ Browser Chat UI ๐Ÿ“ฑ Mobile App / REST API ๐ŸŽค Voice (Siri / Alexa) Same identity + security 1 ๐Ÿง  Cerebro App Flask ยท app.py ยท /api/agent/chat ๐Ÿ” OIDC Auth ๐Ÿ“š RAG Context ๐Ÿ‘ค Identity Extract email, role, groups โ†’ inject into agent 2 ๐Ÿ”„ Agent Loop agent.py ยท _agentic_loop() ๐Ÿ› ๏ธ Tool Registry ๐Ÿ“ก SSE Stream Loop: LLM โ†’ tool_calls โ†’ execute โ†’ repeat 3 ๐Ÿค– LLM Backend (Pluggable) Swap models without changing security Azure OpenAI GPT-4o Claude (Anthropic) Ollama (Local/Free) Gemini (Planned) ๐Ÿ”„ Switch via LLM_BACKEND env var โ†’ tool_calls[] output (same format) tool_calls[] 4 ๐Ÿ”’ Identity Injection _user_email + _user_role + _user_groups + X-User-Email header + X-SSO-Token 5 ๐Ÿ“ก MCP Transport Streamable HTTP / SSE ยท call_tool() ยท agent.py:878 ๐Ÿ” Credential Vault User โ†’ Group โ†’ Org cascade Azure Key Vault / HashiCorp ๐Ÿ“š Hierarchical RAG P5 Personal โ†’ P4 Group โ†’ P3 Org โ†’ P2 Plugin โ†’ P1 Engine Azure AI Search 6 ENGINES โ€” Each runs in its own K8s namespace ยท Deploy as many as needed ๐Ÿ”Œ mcp1 โ€” Primary Engine ns: mcp1 ยท dashboard.py + plugin_loader.py ๐Ÿ›ก๏ธ Security ๐Ÿ”‘ Credentials ๐Ÿ“ Audit โš–๏ธ Policy ๐Ÿ“ง Email ๐Ÿ’ณ Payments ๐Ÿ™ GitHub โœˆ๏ธ Travel ๐Ÿ”Œ mcp2 โ€” DevOps Engine ns: mcp2 ยท separate namespace ๐Ÿ›ก๏ธ Security ๐Ÿ”‘ Credentials ๐Ÿ“ Audit ๐Ÿ“‹ Jira ๐Ÿ“Š Datadog ๐Ÿ“ง Email ๐Ÿ’ณ Pay ๐Ÿ”Œ mcp-N Healthcare ยท Finance ยท Legal Industry-specific engines Each engine โ†’ own namespace own plugins ยท own policies + โ€ฆ deploy unlimited engines ๐Ÿ”— shared via dependency ๐Ÿ”— Plugin sharing: mcp2 imports Email + Payments from mcp1 via scoped dependency โ€” only cherry-picked tools, filtered RAG indexes, separate credentials 7 AVAILABLE COMING SOON INDUSTRY ๐Ÿ“ง Email send ยท read ยท search ๐Ÿ’ณ Payments charge ยท refund ยท list ๐Ÿ™ GitHub repos ยท issues ยท PRs โœˆ๏ธ Travel flights ยท hotels ยท book ๐Ÿ“… Calendar ๐Ÿ“‹ Jira ๐Ÿ’ฌ Slack ๐Ÿ—„๏ธ Database ๐Ÿ“„ Docs โ˜๏ธ Cloud Ops ๐Ÿ“Š Analytics ๐Ÿ”” Notify ๐Ÿ‘ค Identity โ€ฆ + more ๐Ÿฅ Healthcare ๐Ÿ’ฐ Finance โš–๏ธ Legal ๐Ÿš€ Aerospace ๐Ÿซ Education ๐Ÿ›’ Retail ๐Ÿญ Mfg โœจ Build Your Own โ˜๏ธ LOOM โ€” Cloud-Agnostic Infrastructure Layer (Terraform modules swap the cloud, not the app) โ˜๏ธ Azure (Current) AKS (Kubernetes) Cosmos DB AI Search Azure OpenAI Key Vault ACR (Registry) terraform apply โ†’ ~20 min โ‡„ โ˜๏ธ AWS (Planned) EKS (Kubernetes) DynamoDB OpenSearch Bedrock LLM Secrets Manager ECR (Registry) Same Terraform modules โ‡„ โ˜๏ธ GCP (Planned) GKE (Kubernetes) Firestore Vertex AI Search Vertex AI LLM Secret Manager Artifact Registry Same Terraform modules ๐Ÿ  Local Docker SQLite Ollama File Vault Air-gapped ๐Ÿ’พ Document DB Cosmos / DynamoDB / Firestore ๐Ÿ“Š Observability Prometheus ยท Grafana ยท Loki Response streams back via SSE / REST / Voice 8
Multi-Channel + Cerebro App
Agent Loop + Coming Soon Plugins
LLM Backend (Pluggable)
Security + Industry Verticals
MCP Engine + Available Plugins
Cloud-Agnostic (Azure / AWS / GCP / Local)
โœ•

๐Ÿ“ก Multi-Channel Access

๐Ÿ–ฅ๏ธ Browser Chat UI โ€” Current. Full-featured admin + user views with SSE streaming, session history, Visual Designer.

๐Ÿ“ฑ Mobile App / REST API โ€” The POST /api/agent/chat/sync endpoint already returns JSON โ€” any mobile app can call it. Future: dedicated mobile SDKs (iOS/Android), push notifications for workflow approvals.

๐ŸŽค Voice Assistants โ€” Future: POST /api/agent/voice endpoint. Flow: Speech-to-Text (Azure/Whisper) โ†’ Agent Loop โ†’ Text-to-Speech (Azure TTS) โ†’ audio response. Siri Shortcuts, Alexa Skills, Google Actions can all call the REST API.

๐Ÿ”— Webhooks โ€” Already supported for workflow triggers. Any external system can kick off an agent action.

Key: All channels authenticate the same way (OIDC/SSO token) and pass through the same 5 security layers. Typing, tapping, or talking โ€” the security is identical.

โœ•

๐Ÿ‘ค User Interaction

Entry point: User types a question in the Chat UI (browser)

Identity source: Entra ID / OIDC session โ†’ session["user"]

What flows forward: Question text + selected MCP server IDs

What comes back: SSE event stream โ€” tokens, tool calls, citations, final answer

โœ•

๐Ÿง  Cerebro App

File: app.py lines 4495โ€“4720

Endpoints: POST /api/agent/chat (streaming) ยท POST /api/agent/chat/sync (JSON)

Step 1: Extract identity โ€” _current_user_email(), _user_max_role(), _current_user_groups()

Step 2: Create/resume chat session in Cosmos DB

Step 3: Call agent_mod.agent_chat(question, server_ids, ...user_email, user_role, user_groups)

Step 4: Stream events back to browser via SSE (/api/stream/<sid>)

โœ•

๐Ÿ”„ Agent Loop

File: agent.py lines 987โ€“1333

Entry: agent_chat(question, server_ids, ...)

Step 1: Sync user identity to all MCP servers via _sync_user_to_server() โ†’ POST /api/set-user

Step 2: Discover tools from each server via MCP protocol โ€” discover_tools() โ†’ ClientSession.list_tools()

Step 3: Build tool registry mapping tool_name โ†’ {server_url, parameters}

Step 4: Build system prompt with available tools + RAG context + policies

Step 5: Enter loop: LLM call โ†’ if tool_calls โ†’ execute each โ†’ feed results back โ†’ repeat until no more tool_calls

Max iterations: 10 (prevents infinite loops)

โœ•

๐Ÿค– LLM Backend (Pluggable)

Current: Azure OpenAI GPT-4o โ€” azure_clients.get_active_openai_client()

Planned backends:

โ†’ Claude (Anthropic) โ€” Extended thinking, parallel tool calls, large context windows. Paid API ($3-75/1M tokens).

โ†’ Ollama (Local) โ€” Free, runs Llama/Mistral/Qwen locally. Already in sim_mode. Great for development and air-gapped deployments.

โ†’ Google Gemini โ€” Free tier available, good tool use support. Planned.

How it works: All backends produce the same output format โ€” tool_calls[] array. The agent loop doesn't care which model produced them. Switch via LLM_BACKEND env var or per-engine in the Visual Designer.

Key insight: The LLM is a commodity brain โ€” swappable. The 5 security layers wrapping every tool call are the real differentiator. No other platform has that.

โœ•

๐Ÿ”’ Identity Injection

File: agent.py lines 1253โ€“1267

What happens: After the LLM returns tool_calls, before execution:

โ†’ func_args["_user_email"] = user_email

โ†’ func_args["_user_role"] = user_role

โ†’ func_args["_user_groups"] = user_groups

โ†’ HTTP header: X-User-Email: sarah@acme.com

โ†’ SSO token: X-SSO-Token: base64(payload).hmac_sig

Why both args + headers? FastMCP strips unknown kwargs (args starting with _), so identity must also flow via HTTP headers + ContextVar fallback.

โœ•

๐Ÿ“ก MCP Transport

File: agent.py lines 839โ€“890

Protocol: MCP (Model Context Protocol) by Anthropic

Transport options:

โ†’ Streamable HTTP (streamablehttp_client) โ€” default, stateless

โ†’ SSE (sse_client) โ€” fallback, persistent connection

Operations: session.list_tools() (discover) ยท session.call_tool(name, args) (execute)

URL pattern: http://mcp1.mcp1.svc:5001/mcp (K8s service DNS)

โœ•

๐Ÿ”Œ MCP Engine (Gatekeeper)

Each engine runs in its own K8s namespace with its own plugins, credentials, policies, and RAG indexes. Deploy as many as needed.

Every tool call passes through 5 checks: Security Wrapper โ†’ Credential Resolve โ†’ Policy Check โ†’ Audit Log โ†’ Metrics.

mcp1 (Primary): Email, Payments, GitHub, Travel โ€” the core business tools.

Plugin sharing: Other engines can import plugins from mcp1 via scoped dependencies. mcp2 can use Email and Payments from mcp1 without reinstalling โ€” but only the cherry-picked tools are visible, and RAG indexes are filtered to the imported scope.

Result: โœ… ALLOW โ†’ execute plugin | โŒ BLOCK โ†’ return error. The LLM never knows it was blocked โ€” it just gets a "permission denied" message and adapts.

โœ•

๐Ÿ”Œ mcp2 โ€” DevOps Engine (Example)

Native plugins: Jira, Datadog โ€” tools specific to this engine's purpose.

Shared plugins (via dependency): Email and Payments imported from mcp1. Shown with dashed borders.

How sharing works:

1. Admin wires a dependency in the Visual Designer: mcp2 โ†’ mcp1

2. Cherry-pick which plugins to import (not all โ€” just Email + Payments)

3. Imported tools get X-Dependency-Scope header โ€” mcp1 enforces scoped access

4. RAG search is filtered to imported plugin indexes only

5. Credentials resolve independently per engine โ€” mcp2 users have their own vault keys

Security: Prompt injection in mcp2 cannot access GitHub or Travel tools โ€” they're not in mcp2's scope. The dependency boundary is a code-level firewall.

โœ•

๐Ÿ”Œ mcp-N โ€” Deploy Unlimited Engines

Each industry vertical or department can have its own MCP engine:

๐Ÿฅ mcp-healthcare: EHR, FHIR, clinical trials plugins โ€” HIPAA namespace isolation

๐Ÿ’ฐ mcp-finance: Bloomberg, Plaid, KYC plugins โ€” SOX-compliant audit trail

โš–๏ธ mcp-legal: Westlaw, DocuSign, billing โ€” ethical wall enforcement

Each engine is a separate Helm release: helm install mcp-healthcare ./helm/mcp-engine -n mcp-healthcare

Share common plugins (Email, Calendar) across engines via dependencies while keeping specialized plugins isolated.

โœ•

๐Ÿงฉ Plugins

File: plugin_loader.py ยท Each plugin is a ZIP with manifest.json + Python code

Available: Email, GitHub, Payments, Travel (+ industry verticals on roadmap)

Each plugin registers MCP tools with the FastMCP server. The engine wraps each tool with the security middleware.

Credentials: Resolved per-user from vault cascade โ€” the plugin function receives ready-to-use API keys, never raw vault secrets.

Scoping: Plugins only see indexes they own (scoped RAG search).

โœ•

๐ŸŒ External APIs

The actual services that plugins call: Gmail, Stripe, GitHub, Amadeus, etc.

Credentials used: User's personal API keys (from vault cascade), NOT shared org keys.

The AI never sees these keys โ€” they're injected by the engine's credential resolver at the last moment.

โœ•

๐Ÿ” Credential Vault

File: vault_client.py

Cascade: User key โ†’ Group key โ†’ Org key (most specific wins)

Storage: Azure Key Vault (production) or HashiCorp Vault or local encrypted

Access: Managed Identity โ€” no API keys stored in pods

โœ•

๐Ÿ“š Hierarchical RAG

File: cerebro_client.py ยท search_all_indexes()

5 priority levels: P5 Personal โ†’ P4 Group โ†’ P3 Org โ†’ P2 Plugin โ†’ P1 Engine

Identity-scoped: Search filters by _user_email, _user_groups, ACLs on each index

Result: Injected into the LLM system prompt as context before the agent loop starts

โœ•

๐Ÿ’พ Document Database (Cloud-Agnostic)

Persists: Chat sessions, Visual Designer blueprints, MCP server registry, workflow definitions & runs, user preferences, connector configs.

Azure: Cosmos DB ยท AWS: DynamoDB ยท GCP: Firestore ยท Local: SQLite

The app code uses a common interface โ€” swap the database by changing one Terraform module.

โœ•

๐Ÿ“Š Observability Stack

Prometheus: Metrics โ€” tool calls, latency, error rates, RAG queries

Grafana: Dashboards โ€” platform overview, MCP engine, security audit, user activity

Loki: Logs โ€” all pod logs with level detection and colored volume charts

โœ•

๐Ÿญ Industry Vertical Plugins

Specialized plugin bundles for regulated industries. Each ships as a ZIP and installs in 2 clicks via the Visual Designer.

๐Ÿฅ Healthcare: EHR integration, HL7 FHIR, clinical trials, drug interactions โ€” HIPAA-enforced at code level

๐Ÿ’ฐ Finance: Bloomberg, Plaid, QuickBooks, compliance/KYC โ€” SOX audit trail built in

โš–๏ธ Legal: Westlaw, DocuSign, e-filing, billing โ€” ethical walls + attorney-client privilege enforced

๐Ÿš€ Aerospace: Supply chain, fleet management โ€” clearance-level data isolation

๐Ÿซ Education: Canvas/Blackboard, student info โ€” FERPA compliance

๐Ÿ›’ Retail: Shopify, CRM, inventory โ€” per-merchant data isolation

โœจ Build Your Own: No-code wizard imports any OpenAPI spec and wraps it with ContextWeaver's 5 security layers automatically.

โœ•

โ˜๏ธ Loom โ€” Cloud-Agnostic Infrastructure

How it works: 9 Terraform modules abstract each cloud service into a common interface. The app code never references cloud-specific APIs.

Azure (Current): AKS, Cosmos DB, AI Search, Azure OpenAI, Key Vault, ACR โ€” fully wired, running in production.

AWS (Planned): EKS, DynamoDB, OpenSearch, Bedrock, Secrets Manager, ECR โ€” same Terraform modules, different providers.

GCP (Planned): GKE, Firestore, Vertex AI Search, Vertex AI, Secret Manager, Artifact Registry.

Local/On-Prem: Docker Compose, SQLite, Ollama, file-based vault โ€” for air-gapped deployments and development.

Key command: cd environments/aws && terraform apply โ€” swaps the entire cloud backend. The app, security, plugins, and user data remain untouched.

Security stays constant: Identity injection, credential vault, policy enforcement, and audit logging work identically regardless of which cloud runs underneath.