Adapted from
docs/services/backend/README.mdin black-candle-technologies/chitin.
Go service that proxies LLM requests through an optimization pipeline (budget enforcement, exact-match cache, semantic dedup, context compression, model routing, RAG, tool optimization, batching) before dispatching to upstream providers.
Client (OpenAI SDK)
│ base_url = "https://api.usechitin.com/v1"
▼
Auth middleware → Rate limit
▼
Pipeline (stages 01–11, sequential per request)
▼
Provider dispatch → Response pipeline → Token accounting → Stripe billing
Storage:
pgvector — tenants, API keys, token events, budgets, embeddingsKey invariants:
chitin:{tenant_id}:{namespace}:{key}PipelineContext in place; order is fixeddocker compose up -d postgres rediscp .env.example .env.local (set DATABASE_URL, REDIS_URL, STRIPE_SECRET_KEY, etc.)make migratedocs/services/backend/docs/ — quickstart, API reference, optimization guide, billing, Anthropic savings report, dashboard implementation, operations runbookdocs/services/backend/spec/ — product requirements, engineering roadmap, admin auth spec (three-plane auth model), compression guide, competitive analysis, enterprise migrationSee also: Chitin overview · SDKs