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).

  1. Layer 1Aegis-native

    User Surfaces

    What developers, admins, and compliance officers see

    Anna Chat

    Aegis-native

    Developer chat interface for AI-assisted work

    Anna Console

    Admin surface

    Tenant lifecycle · cost dashboards · audit query · Constitution editor

    Anna Coder

    CLI + IDE

    Developer command line + IDE integration for local dev flow

  2. Layer 2Aegis-native

    Governance & Coordination

    The layer that decides what's allowed and keeps sessions coordinated

    Anna Constitution v1.0.0

    14 Articles ratified

    The ratified policy framework — your Compliance officer's enforceable AI policy

    32-Guardrail Engine

    Runtime enforcement

    Every prompt + response passes 32 policy checks before + after LLM invocation

    SuperPAI+ Sync Fabric

    Multi-agent coordination

    Machines · sessions · heartbeat · SSE · shared team memory + inbox

    Hash-Chained Audit Trail

    Per-tenant, immutable

    Every AI decision Merkle-chained; auditor-verifiable + HIPAA-defensible

  3. 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 callbacks

    Routes every prompt to the right model (external LLM or your own GPU) via the same policy layer

    Presidio PHI Scrub

    Callback

    PII/PHI scrubbed on prompts + responses before logs — HIPAA-mandated Safeguard §164.312

    AnshinCostCallback

    Callback

    Per-user + per-team + per-project spend telemetry across every model

    MCP Marketplace

    Compliance-vetted catalog

    Anshin mcp-knowledge + superpai-mcp + community MCPs — per-team allowlists

    litellm-auth M2M Sidecar

    OAuth2 JWT → virtual key

    Aegis 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

  4. Layer 4Shared Anshin infra

    Identity & Federation

    Shared Anshin service — Aegis consumes, doesn't own

    Anshin Connect

    Authentik-based OIDC broker

    The single identity broker for every Anshin app — Aegis, Accelerate, Assure, Comply, Predict, Concur. Handles customer SSO + SCIM + tenant scoping.

    Customer IdP Federation

    OIDC / SAML

    Your Okta / Azure AD / Google Workspace / on-prem AD authenticates against Connect; users flow into Aegis with tenant + role attributes attached

  5. 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

    BYO

    vLLM · Ollama · TGI — Anshin runs Qwen2.5-Coder-32B (gpu-01) + Qwen-72B (gpu-02) in production; yours runs whatever you have

  6. Layer 6Aegis-hosted / Anshin fleet

    Infrastructure

    Anshin-operated or your-cloud-hosted

    K3s Cluster (dev + prod)

    Kubernetes

    Per-tenant namespace isolation; MetalLB ingress; internal PKI

    PostgreSQL Per-Tenant Schema

    Data isolation

    Row-level isolation with per-tenant TDE — HIPAA §164.312(a)(2)(iv) encryption at rest

    step-ca Internal PKI

    ADR-025

    Every internal-access hostname gets a real cert from Anshin's internal CA — no self-signed warnings

    Ceph Storage

    Distributed

    Audit 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. 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. 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. 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. 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. 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. 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

What Anshin adds: React-based Chat + Console + Coder surfaces (implementation entirely Anshin, inspired by OpenWebUI study but not a fork) + Anna Constitution v1.0.0 (14 Articles of AI governance) + 32-guardrail engine + hash-chained per-tenant audit trail. The Constitution DOCUMENT is published publicly as thought-leadership; the enforcement engine that operationalizes it stays proprietary.
License: Anshin proprietary (Anshin Commercial License). Anna Constitution as a document: CC BY-ND (attribution, no derivatives) for public reading.

SuperPAI+

100% Anshin-authored

Multi-agent session coordination fabric

What Anshin adds: Sync fabric — machines/sessions/heartbeat/SSE + shared team memory + inbox + voice/notifications + MCP peer registration + 81 skills + 56 commands + 37 agents. No open-source release; Anshin proprietary end-to-end.
License: Anshin proprietary (Anshin Commercial License)

Anshin Connect

Anshin-built with Authentik as OIDC backend engine

Identity + tenant federation (shared across ALL Anshin products)

What Anshin adds: Anshin-built RBAC + tenant model + user surface + integration via @anshin/auth SDK. Authentik provides the OIDC broker plumbing under the hood; the entire user-visible experience + role architecture + integration surface is Anshin-authored. Every Anshin product — Aegis, Accelerate, Assure, Comply, Predict, Concur — federates through Connect for uniform SSO.
License: Anshin proprietary (Anshin Commercial License). Authentik is MIT upstream but Anshin's wrapping + config + RBAC + @anshin/auth SDK are all Anshin IP.

Anshin Knowledge

100% Anshin-authored

Organizational wiki + MCP-served knowledge base

What Anshin adds: Anshin-built wiki platform + org-wide knowledge indexing + MCP endpoint for LLM-consumable retrieval. Serves as canonical source of standards, runbooks, ADRs, policy docs across all Anshin products.
License: Anshin proprietary (Anshin Commercial License)

LiteLLM (only upstream OSS)

Upstream: BerriAI/litellm (MIT)

Model routing proxy

What Anshin adds: Anshin runs LiteLLM OSS Community. On top: litellm-auth M2M sidecar (Authentik JWT → scoped virtual key, no sk-* keys in browser) + Presidio PHI scrub callback + AnshinCostCallback (cost telemetry) + per-team model allowlists + MCP Marketplace curation. Anshin's sidecar + callbacks are Anshin IP.
License: LiteLLM upstream: MIT. Anshin sidecar + callbacks + configuration + MCP integration: Anshin proprietary.

Anna Constitution

Public thought-leadership

14 Articles of AI governance

The Anna Constitution v1.0.0 is published as a public thought-leadership document at anshin-aegis.com/constitution. Any healthcare organization can read, cite, and adopt the framework as a starting point for their own AI governance program. The enforcement — the 32-guardrail engine that operationalizes each Article at runtime — stays Anshin proprietary.
License: CC BY-ND 4.0 (share with attribution, no derivatives). Enforcement engine: Anshin proprietary.

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.