Skip to content

Instantly share code, notes, and snippets.

@7etsuo
Created June 24, 2026 08:38
Show Gist options
  • Select an option

  • Save 7etsuo/a00c04d714b83140b404ea85e82d10aa to your computer and use it in GitHub Desktop.

Select an option

Save 7etsuo/a00c04d714b83140b404ea85e82d10aa to your computer and use it in GitHub Desktop.
Agenc backend
┌─────────────────────────┐ ┌──────────────────────────────────┐
│ agenc-backend │ mints │ LiteLLM gateway box (separate) │
│ (CONTROL PLANE) │ ──key──▶ │ (DATA PLANE) │
│ │ │ │
│ • login (wallet) │ │ • holds the REAL Anthropic / │
│ • billing (Stripe/Sol) │ │ OpenAI / xAI / Google keys │
│ • mints per-user keys │ │ • routes + enforces budget │
│ • picks model │ │ • tracks spend (its own DB) │
│ │ │ • egress locked to provider hosts │
│ NEVER sees provider │ └──────────────▲────────────────────┘
│ keys. NEVER sees │ │ OpenAI-compatible
│ inference traffic. │ │ request w/ virtual key
└─────────────────────────┘ │
▲ │
│ /v1/auth/llm-credential │
│ → {virtualKey, gatewayURL} │
┌────┴──────────┐ │
│ user's daemon │──────────────────────────────┘
│ / CLI │ talks DIRECTLY to the gateway, not the backend
└───────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment