Skip to main content
Autonomous agents don’t run one prompt. They run loops — sometimes thousands of LLM calls per job. If every call goes to gpt-5.2-pro or claude-opus-4.6, you’re paying $21/MTok for tasks like “extract a date from this text” or “write a log line.” PRYSM routes each call to the right model automatically, without you changing your agent code.

The cost problem in agent loops

A typical research agent flow:
Steps 3 and 5 are 80% of the call volume but need only 2–5% of the cost. Routing them to frontier models wastes budget.

Drop PRYSM into any agent framework

Inspect routing decisions

Every response carries a prysm.routing extension so your agent can log exactly why each call went where:
Sample output from a 5-step research agent:

Pin specific models per agent role

Some tasks warrant explicit model choices. Use model directly or configure a BRAIN.md:
BRAIN.md in your agent's working directory
When a BRAIN.md is present, PRYSM applies your rules before its own routing logic. Team-level policies propagate automatically to every agent in the repo.

Set a hard cost cap per request

For runaway-proof agents, add X-Max-Cost-USD to your OpenAI client’s default headers:
If the routed model’s estimated cost exceeds the cap, PRYSM auto-downgrades to the cheapest live model that fits — no exception thrown, no user intervention. See AgentGuard for the full safety layer.