The Inference of AI Agents. Agent-native inference routing — constrained optimization across models, not a billing gateway.
Production-grade policy templates and routing methodology for AI agent inference. This repo defines how Ainfera routes requests to the optimal model based on quality, cost, and latency constraints — with every decision recorded in a signed audit chain.
| Directory | Description |
|---|---|
ainfera_routing/ |
Core routing library |
templates/ |
Policy templates for common agent workloads |
schema/ |
JSON schemas for routing policies |
docs/ |
Methodology documentation |
tests/ |
Test suite |
scripts/ |
Operational scripts |
# Install
pip install -e .
# Use a policy template
python -m ainfera_routing --template agentic-coding
# Custom policy
python -m ainfera_routing --config my-policy.yaml| Template | Use Case | Strategy |
|---|---|---|
agentic-coding |
Code generation, debugging | Quality-first, fallback to cost |
research |
Long-context research, analysis | Context-length aware |
high-throughput |
Bulk processing | Cost-optimized |
balanced |
General purpose | Quality/cost equilibrium |
Ainfera's routing is outcome-aware: it learns from observed outcomes (latency, quality, cost) at the orchestration boundary, not from static model labels. See docs/ and STRATEGY.md for the full methodology.
Apache 2.0 — see LICENSE.