The problem: agents call models you didn’t expect
A single-prompt call is easy to reason about. An autonomous agent is not. One mis-routed batch — a frontier model on a task that a budget model handles just as well — can dwarf a month of ordinary usage. And you usually find out on the bill, not in the logs. PRYSM solves this at three levels:- Per-request cost caps (AgentGuard) — PRYSM downgrades requests that would exceed your cap instead of running them at full price.
- Model blocks — frontier models you never want an agent to touch are blocked server-side and routed around automatically.
- Verifiable trajectory — every step is hashed into a chain; a tamper-evident
trajectory_proofproves what ran, in what order, at what cost.
1 — Configure once in BRAIN.md
ABRAIN.md in your project root sets the routing preferences,
spend caps, and blocked models for every request from that context. It’s checked into
version control and reviewed in pull requests — the spending policy is code, not a
checkbox buried in a dashboard.
BRAIN.md
2 — Hard spend ceiling on agent runs
The/v1/agent/run endpoint executes a goal as a bounded,
multi-step trajectory. Pass max_cost_usd and the run provably cannot exceed it —
not “+5%”, at most that amount.
Before each step, AgentGuard binds the step’s worst-case cost
against the remaining budget and only runs it if it fits, downshifting intensity
(Laser → Halo → Foton) under pressure rather than overspending.
status to distinguish clean completion from a budget stop.
Idempotency for retries
Passidempotency_key to make a run retry-safe: a second request with the same key
returns the original result without spending again.
3 — Verify the trajectory
Every step is hashed into a chain. The run returns atrajectory_proof that commits to
every step — model, cost, intensity, input hash, output hash — in a tamper-evident bundle.
Reorder, drop, or edit any step and verification fails.
You can verify a trajectory without a PRYSM account — the verify endpoint is public:
4 — Preview costs before the agent runs
Use a dry-run route call to estimate what any prompt would cost before committing:Python
max_cost_per_request cap behaves the
way you expect before deploying an agent.
5 — AI-to-AI distribution via MCP
If your agent is Claude Desktop, Cursor, or Windsurf, give it cost-aware routing as a native tool — no API calls in application code required. Install the PRYSM MCP server and the agent callsprysm_route, prysm_usage, and prysm_savings as tools with its own
key.
claude_desktop_config.json
Reference
AgentGuard
Per-request caps, monthly budgets, and model blocks — enforced server-side.
Agent API
/v1/agent/run, trajectory retrieval, and the public verify endpoint.PrysmProof
How every step is hashed into a tamper-evident chain.
BRAIN.md
Version-controlled routing config — rules, blocks, caps, and fallback chains.