
# β‘ Free-AI Gateway
**Enterprise-grade capability-routed AI Gateway monorepo aggregating free-tier and local AI APIs into reusable libraries, Model Context Protocol (MCP) servers, and OpenAI-compatible HTTP proxies.**
[](LICENSE)
[](https://www.typescriptlang.org/)
[](https://nodejs.org/)
[](https://fastify.dev/)
[](Dockerfile)
[](LEARN.md)
[](CONTRIBUTING.md)
> π **New to Free-AI Gateway?** Check out the comprehensive **[Architecture & Developer Guide (LEARN.md)](LEARN.md)** for detailed deep dives, tutorials, and integration patterns.
---
## π Architecture & Monorepo Overview
**`free-ai-gateway`** is organized as an enterprise monorepo separating **pure AI orchestration infrastructure** from **protocol-specific delivery mechanisms** (HTTP Fastify Proxy, MCP Server, CLI, & Web Examples):
```mermaid
flowchart TD
subgraph CoreLayer ["@free-ai-gateway/core (Standalone npm package)"]
Router["CapabilityRouter & Strategy Engine"]
Providers["20 Provider Adapters & Dynamic Registry"]
Resilience["QuotaTracker & CircuitBreaker"]
Observability["EventBus & MetricsTracker"]
Transport["HttpClient with Exponential Backoff"]
end
subgraph Consumers ["Consumer Applications & Examples"]
GatewayApp["apps/gateway (@free-ai-gateway/gateway)