Agents that never run away with the wallet.

Multi-step tool loops route each hop under the same policy. Budgets per key, project or organization stop a runaway agent before money moves, and every hop keeps its route and charge.

WHAT YOU GET
Hard stops per key, project and organization
Tool-capable endpoints only, enforced as a hard constraint
Every hop and fallback in the request timeline
MODELS FOR THIS WORKLOAD · LIVE CATALOG
agents.py · OpenAI SDK, base URL changed
from openai import OpenAI

client = OpenAI(
    base_url="https://yelno.ai/v1",
    api_key=YELNO_API_KEY,
)

res = client.chat.completions.create(
    model="openai/gpt-5.4",
    messages=history,
    tools=[search, write_file],
)
# res.yelno["provider"] → the vendor that served this hop
# res.yelno["charge"]   → the metered charge · final
Go live in three steps
01
Create the agents-prod policy

Start from the template; tools become a hard constraint and cost the ranking.

02
Give each agent its own key

A key with its own spend limit: the gateway stops the next hop before money moves.

03
Inspect the trace

Open any request in the console to see attempts, fallbacks and the charge.

Agents guideproduction in four steps
1. Policy

Create agents-prod from the Agents template. Tools become a hard constraint; the ranking strategy defaults to cost.

2. Keys

Issue one key per agent environment with a spend limit. The key is bound to the policy so no code path can bypass it.

3. Stops

Handle 402 insufficient_funds as a normal tool result: summarize and stop. It is raised before dispatch, so nothing is charged.

4. Evidence

Open a request in the console to see attempts, fallbacks and the charge; export the timeline for postmortems.

guide copy · the code calls the gateway's OpenAI-compatible routes; model slugs are examples from the catalog · not yet connected