Unified LLM routing and billing layer purpose-built for AI agents.
面向 AI Agents 的統一大模型路由與結算平台。
- EN: AgentGrid is a unified LLM routing and billing layer purpose-built for AI agents.
- 中文:AgentGrid 是面向 AI Agents 的統一大模型路由與結算平台。
- EN: Integrate once with AgentGrid to access multiple LLM providers, auto-optimize for cost/latency/reliability, and get audit-ready token metering and billing.
- 中文:接一次 AgentGrid,即可調用多家模型;自動在成本、延遲、成功率間做最優路由,並完成可對帳的 token 計量與計費。
- OpenAI-compatible API gateway for agents
- Multi-provider model routing (
cheapest,fastest,balanced) - Automatic retry and fallback across providers/models
- Tenant-level budget, quota, and rate limit control
- Token metering, usage analytics, and billing ledger
- Traceable request lifecycle for audit and debugging
agentgrid/
apps/
gateway/ # Unified API entry for agents
router/ # Routing engine and policy evaluation
metering/ # Token accounting and usage aggregation
billing/ # Ledger and invoice pipeline
console/ # Admin and tenant console
packages/
sdk-js/ # JavaScript/TypeScript SDK
sdk-python/ # Python SDK
shared-types/ # Cross-service schema and contracts
docs/ # Product and architecture docs
- Preferred domain:
agentgrid.ai - Alternatives:
agentgrid.dev,agentgrid.io,useagentgrid.com,agentgridhq.com - Suggested GitHub org:
agentgrid
- PostgreSQL DDL for tenant, usage, and billing ledger
- Router v1 scoring and fallback pseudocode
- OpenAI-compatible API field mapping
- Minimal deployable gateway prototype
- PostgreSQL DDL:
docs/POSTGRES_DDL_V1.sql - Router pseudocode:
docs/ROUTER_V1_PSEUDOCODE.md - OpenAI field mapping:
docs/OPENAI_FIELD_MAPPING.md - Gateway prototype:
apps/gateway/prototype/server.js - Gateway smoke test:
scripts/smoke_gateway.sh - Gateway postgres smoke wrapper:
scripts/smoke_gateway_postgres.sh