Guides

Naming your agents

One header tells Rakuvo which agent made a call, so spend and failures are split by agent.

A gateway sees calls, not agents. To split the numbers by agent, have each agent send one header:

text
X-Rakuvo-Agent: support-bot

With the OpenAI Python client:

python
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:8081/v1",
api_key="anything",
default_headers={"X-Rakuvo-Agent": "support-bot"},
)

#What you get

The name is attached to every trace event the call produces and shown on the Agents page and on each run. For each agent the page shows:

  • its share of total spend and its cost;
  • the number of calls, failures and retries;
  • median time and token counts;
  • the number of times a layer acted on its calls;
  • a plain health label with the reason: Healthy, Retrying a lot (more than about 15% of calls needed a retry), Some failures (more than 1% failed) or Failing (more than 5% failed).

#Rules of thumb

  • Use short, stable names: support-bot, report-writer. A name that changes with each deploy splits one agent into many.
  • Name the agent, not the user. User identity for memory is a separate setting (see The layers).
  • Calls without the header are grouped as (unnamed). If every call is unnamed, the Agents page says so and shows this header.