---
id: guides/agents
title: AI Agents & bex router
description: Why on-chain AI agents use bex router as their RPC backend, and what to watch for when an agent calls chain APIs autonomously.
keywords: [ai agents, bex router, rpc, multi-chain, autonomous agents]
last_updated: 2026-08-19
---

A growing share of bex router traffic comes from **AI agents** — trading
bots, on-chain research assistants, and autonomous programs that read chain
state and submit transactions without a human clicking a button for each
call. This guide covers what makes bex router a good fit for that traffic
pattern, and what to design around.

## Why agents need a metered, multi-chain gateway

A human developer hits a handful of endpoints while building; an agent can
call an RPC endpoint hundreds of times a minute, across several chains, with
no natural pause between requests. That changes the requirements:

- **One key, every chain.** An agent that needs to check an Ethereum balance,
  read a Sui object, and submit an Aptos transaction in the same loop
  authenticates once — see [Overview](/docs/getting-started/overview) for
  the full chain list.
- **Cost is machine-readable.** [Compute units](/docs/compute-unit) turn
  "how much did this loop cost" into one comparable number across chains and
  methods, so an agent (or its budget-tracking wrapper) can meter itself.
- **Rate limits are explicit, not discovered by trial and error.** An agent
  that retries blindly on failure can blow through a quota fast; see
  [Rate Limits & Quotas](/docs/rate-limits) for the numbers and
  [maximizing performance](/docs/maximizing-performance-a-guide-to-efficient-rpc-requests)
  for batching patterns that keep an agent's request volume down.

## Designing an agent's request loop

- **Batch reads where the chain's API supports it** — one batched
  JSON-RPC call instead of N sequential ones saves both latency and compute
  units.
- **Back off on rate-limit responses** — treat a 429 as a signal to slow
  down, not a transient error to retry immediately; a tight retry loop is
  the fastest way for an autonomous agent to exhaust a quota.
- **Cache what doesn't change block-to-block** — chain ID, contract ABIs,
  and other static lookups don't need to be requests inside the hot loop.

## Next step

[Understanding compute unit routing](/docs/guides/rankings) covers how bex
router selects and monitors the underlying nodes an agent's requests
actually land on.
