Skip to main content
Every API provider experiences outages. Without a failover layer, a single provider going down can halt your agent mid-task — and if your agent is in production, that means a broken experience for your users. AgentKey insulates you from this by keeping multiple providers behind every capability and automatically routing each call to a healthy one. When the active provider for a capability goes down, AgentKey promotes the next available backup instantly. Your agent keeps running, and you do not have to change a single line of code.

How routing works

AgentKey maintains a live view of every upstream provider’s health and uses it to decide where each call is sent. Within a capability — web search, for example — multiple providers are registered behind the same interface. At any moment, one is active and the others are on standby, ready to take over.
AGENTKEY ROUTER
  ├─ Tavily      ✓ Active     → routing here
  ├─ Brave       ✕ Down       → skipped
  └─ Perplexity  ◦ Standby    → ready to take over
When the active provider becomes unavailable, AgentKey detects the failure and immediately begins routing to the next healthy standby. The capability name your agent calls — for example, find_tools("web search") resolves to a web-search tool regardless of which provider is active — stays the same. The routing change is invisible at the interface level: your agent sends the same call and receives the same response envelope regardless of which provider handled it underneath.

What this means for you

  • No code changes — failover is handled entirely at the routing layer inside AgentKey. You do not need to implement retry logic, circuit breakers, or provider fallback in your own code.
  • One stable interface — your agent calls a capability, not a specific vendor. Adding or swapping out a backup provider behind the scenes never affects how your agent interacts with AgentKey.
  • Higher uptime — a single provider’s outage no longer breaks your agent or your users’ experience. As long as at least one provider for a capability is healthy, calls continue to succeed.

Check Upstream Health

Call execute_tool("agentkey_account") — always free — to get your remaining credits and the current health status of every upstream provider. Useful for diagnosing issues or confirming routing status before a critical task.