Architecture
How Anshin Aegis Fits Together
Anshin Aegis is Anshin proprietary IP — Anna, SuperPAI+, Anshin Connect, and Anshin Knowledge, all designed and built by Anshin. LiteLLM (MIT) is the sole upstream open-source component at the model-routing layer. Here's how the pieces line up, top to bottom.
Each layer below is either Aegis-native (Anshin owns + engineers), Shared Anshin infra (used by every Anshin product), or External / BYO (models you already have or want).
- Layer 1Aegis-native
User Surfaces
What developers, admins, and compliance officers see
Anna Chat
Aegis-nativeDeveloper chat interface for AI-assisted work
Anna Console
Admin surfaceTenant lifecycle · cost dashboards · audit query · Constitution editor
Anna Coder
CLI + IDEDeveloper command line + IDE integration for local dev flow
- Layer 2Aegis-native
Governance & Coordination
The layer that decides what's allowed and keeps sessions coordinated
Anna Constitution v1.0.0
14 Articles ratifiedThe ratified policy framework — your Compliance officer's enforceable AI policy
32-Guardrail Engine
Runtime enforcementEvery prompt + response passes 32 policy checks before + after LLM invocation
SuperPAI+ Sync Fabric
Multi-agent coordinationMachines · sessions · heartbeat · SSE · shared team memory + inbox
Hash-Chained Audit Trail
Per-tenant, immutableEvery AI decision Merkle-chained; auditor-verifiable + HIPAA-defensible
- Layer 3Aegis-native (built on OSS LiteLLM)
Model + Tool Proxy
One policy layer for every model and every MCP tool
LiteLLM Proxy
MIT OSS + Anshin callbacksRoutes every prompt to the right model (external LLM or your own GPU) via the same policy layer
Presidio PHI Scrub
CallbackPII/PHI scrubbed on prompts + responses before logs — HIPAA-mandated Safeguard §164.312
AnshinCostCallback
CallbackPer-user + per-team + per-project spend telemetry across every model
MCP Marketplace
Compliance-vetted catalogAnshin mcp-knowledge + superpai-mcp + community MCPs — per-team allowlists
litellm-auth M2M Sidecar
OAuth2 JWT → virtual keyAegis Console fetches an M2M JWT (Authentik client_credentials grant); sidecar validates JWT and maps it to a scoped LiteLLM virtual key — no sk-* keys ever reach the browser
- Layer 4Shared Anshin infra
Identity & Federation
Shared Anshin service — Aegis consumes, doesn't own
Anshin Connect
Authentik-based OIDC brokerThe single identity broker for every Anshin app — Aegis, Accelerate, Assure, Comply, Predict, Concur. Handles customer SSO + SCIM + tenant scoping.
Customer IdP Federation
OIDC / SAMLYour Okta / Azure AD / Google Workspace / on-prem AD authenticates against Connect; users flow into Aegis with tenant + role attributes attached
- Layer 5External + BYO
Model Backends
External LLMs + your own GPU inference
Anthropic Claude
External (BAA-covered)Sonnet 4.6 · Opus · Haiku — prompt caching pass-through for cost efficiency
OpenAI
External (BAA-covered)GPT-5 · GPT-4.1 · o-series
Google Gemini
External (BAA-covered)Pro · Flash
Your Own GPU
BYOvLLM · Ollama · TGI — Anshin runs Qwen2.5-Coder-32B (gpu-01) + Qwen-72B (gpu-02) in production; yours runs whatever you have
- Layer 6Aegis-hosted / Anshin fleet
Infrastructure
Anshin-operated or your-cloud-hosted
K3s Cluster (dev + prod)
KubernetesPer-tenant namespace isolation; MetalLB ingress; internal PKI
PostgreSQL Per-Tenant Schema
Data isolationRow-level isolation with per-tenant TDE — HIPAA §164.312(a)(2)(iv) encryption at rest
step-ca Internal PKI
ADR-025Every internal-access hostname gets a real cert from Anshin's internal CA — no self-signed warnings
Ceph Storage
DistributedAudit trail hash-chain artifacts, model output archives, backup vaults
The Request Flow — End to End
Here's what happens when a developer on your team asks Aegis to review their code.
- 1
Developer opens Anna Chat / Anna Coder
Their session authenticates against Anshin Connect (which federates to your Okta/Azure AD/etc.). Connect issues a JWT with tenant + role + email.
- 2
Prompt enters the SuperPAI+ sync fabric
If the same developer has other sessions running, SuperPAI+ correlates the context so all their sessions see the same team memory + inbox.
- 3
Prompt hits the 32-guardrail engine
Pre-flight: PHI check, model allowlist check, tool allowlist check, budget check, Constitution alignment. If any fails, prompt is blocked + logged.
- 4
LiteLLM proxy routes to a model
Anna's routing policy decides: your own GPU (Qwen-Coder for code work), or Claude Sonnet 4.6 (with prompt caching), or GPT-5 for the tasks that need it. Presidio scrubs any PHI before the prompt leaves your cluster.
- 5
Response returns; scrub + audit
LiteLLM applies AnshinCostCallback (cost logged per-team) + Presidio (scrub any PHI in the response) + hash-chain audit event (immutable per-tenant record).
- 6
Response reaches the developer
Rendered in Anna Chat / Anna Coder. If a guardrail flagged something, the developer sees an explanation with the specific policy that fired.
What's Anshin-Built vs. Upstream
Anshin Aegis is Anshin proprietary IP — designed, built, and owned by Anshin Health Solutions, Inc. One genuine upstream open-source dependency (LiteLLM, MIT) at the model-routing layer. Everything else — Anna, SuperPAI+, Connect, Knowledge — is Anshin-authored and Anshin-owned.
Anna
100% Anshin-authored
AI agent platform + governance
SuperPAI+
100% Anshin-authored
Multi-agent session coordination fabric
Anshin Connect
Anshin-built with Authentik as OIDC backend engine
Identity + tenant federation (shared across ALL Anshin products)
Anshin Knowledge
100% Anshin-authored
Organizational wiki + MCP-served knowledge base
LiteLLM (only upstream OSS)
Upstream: BerriAI/litellm (MIT)
Model routing proxy
Anna Constitution
Public thought-leadership
14 Articles of AI governance
Curious how this maps to your team's stack?
A 30-minute demo walks through the specific pieces relevant to your existing tools — IdP, GPU shop, Copilot restrictions, and how Aegis fits.