Introduction
AIR (Automated Intelligence Router) is a local, provider agnostic AI routing library for Python. It is developed by NISPAX InfoTech.
Applications call AIR instead of integrating directly with individual AI providers. AIR does not run any hosted infrastructure of its own. You supply your own API keys for each provider, and AIR talks to those providers directly over HTTPS.
What AIR does
- Gives you one interface (
air.chat(...)) across multiple AI providers instead of writing separate integration code for each one. - Automatically falls back to another configured provider if the current one hits a rate limit, runs out of quota, times out, or returns a server error.
- Optionally picks a starting provider based on simple, deterministic signals in the request (coding, reasoning, required capabilities, estimated size) instead of always using a fixed priority order.
- Tracks provider health and, when you configure token limits, estimated remaining capacity, and skips a provider before sending a request if it looks like it cannot handle it.
- Keeps conversation history in a session, independent of which provider answered any given turn, so switching providers mid conversation does not lose context.
- Stores sessions in memory by default, or in a local SQLite file if you ask for it. No server, no cloud database.
- Trims long conversations to a configurable token budget before sending them to a provider, while keeping the original full history in the session store.
- Emits structured events (provider switch, exhaustion, recovery, usage thresholds, capacity skips) that applications can subscribe to directly, with an optional text to speech announcer as one possible consumer.
What AIR does not do
- AIR does not implement long term user memory, embeddings, or a vector database.
- AIR does not implement an agent framework, tool calling orchestration, or a web server.
- AIR does not currently ship Android or iOS SDKs. Mobile and web applications can still consume AIR's structured events or supply their own TTS backend from their own runtime.
- AIR does not guess a provider's real remaining quota. It only tracks usage the provider actually reports, against a limit you configure.
Current providers
AIR currently ships adapters for four providers:
- xAI (Grok) -
air.providers.xai.XAIProvider - Google Gemini -
air.providers.gemini.GeminiProvider - Groq -
air.providers.groq.GroqProvider - OpenRouter -
air.providers.openrouter.OpenRouterProvider
You can add your own provider by implementing the air.providers.base.Provider interface. See core/providers.md.
Where to go next
- installation.md for how to install the current build.
- quick-start.md for a minimal working example.
- architecture.md for how the pieces fit together.