A multi-agent AI platform with intelligent routing, provider failover, credit-based circuit breakers, and self-healing infrastructure.
Instead of one chatbot connected to a notes app, this is a swarm of specialized agents that classify tasks, route them to the optimal model, fail over across providers, and monitor themselves.
You (Chat Channels)
│
▼
┌─────────────────────────────────────────────┐
│ Hub (Dispatcher) │
│ Classifies message → 9 categories │
│ Routes to optimal agent + model │
└────┬────────┬────────┬────────┬─────────────┘
│ │ │ │
▼ ▼ ▼ ▼
Main Code Security Personal
(complex) (code) (scans) (separate
reasoning tasks read-only workspace)
| Agent | Role | Model Tier | Notes |
|---|---|---|---|
| Hub | Dispatcher + simple tasks | Free / fast mid-tier | Handles trivial in-house |
| Main | Complex reasoning | Top reasoning model | Multi-provider fallback |
| Code | Code specialist | Code-specialized model | Restricted filesystem |
| Security | Watchdog | Strong mid-tier | Read-only, never modifies |
Every message is classified into one of 9 categories and routed to the cheapest model that can handle it:
trivial → free tier
simple → fast mid-tier
lookup → fast mid-tier
data → fast mid-tier
ops → strong mid-tier
code → code-specialized
security → strong mid-tier
complex → top reasoning
hardest → maximum capability
Every fallback chain spans all 3 major providers. No single point of failure.
- Each agent gets a daily credit budget, auto-refilled
- Prevents runaway API costs from rogue loops
- Bankruptcy fallback: Hub switches to free tier + sends alert
- Guard script validates all state writes and auto-backs up
┌──────────────────────┐ ┌──────────────────────┐
│ Local (Primary) │◄───►│ VPS (Always-On) │
│ │ │ │
│ Gateway │ │ Gateway │
│ AI Agents │ │ Database + Cache │
│ Dev CLI │ │ Workflow Engine │
│ │ │ Monitoring │
│ │ │ Reverse Proxy │
│ │ │ Local LLM │
└──────────────────────┘ └──────────────────────┘
Bidirectional delegation via gateways
- Health checks on a short interval, auto-discovering services
- Multiple monitoring probes with instant alerts
- Workflow automations for usage tracking and cost alerts
- Daily backups with retention policies
- Key-only auth + intrusion detection
- All services behind reverse proxy (zero exposed ports)
- Strict file permissions
- Automated API key rotation
- Bot access restricted to allowlists
- Dedicated read-only security agent with continuous scanning
- Per-agent tool restrictions and execution policies
| Channel | Status |
|---|---|
| Chat app 1 | Active |
| Chat app 2 | Active |
| Chat app 3 | Active |
| Item | Monthly |
|---|---|
| VPS | ~$12 |
| API usage | Variable (routing optimized) |
| Free-tier model | $0 |
| Search API | ~$25 |
| Infrastructure total | ~$37 + API |
Routing optimization is the cost control. Most messages hit free/cheap models. Expensive models only fire for genuinely complex tasks.
- Route to the cheapest capable model. Don't waste frontier-model tokens on "what time is it?"
- Every chain covers all providers. No single point of failure.
- Circuit breakers, not budgets. Credit limits exist to catch bugs, not restrict usage.
- Security agent is read-only. An agent that can detect AND fix problems is an agent that can cause problems.
- Monitor before you scale. Add observability before adding complexity.
- Start with one agent, one channel, one model
- Add a second agent with a different specialty + routing
- Add monitoring and alerting
- Add provider failover + credit limits
MIT