POST
https://api.prysm1.com/v1/agent/run · Requires authentication/v1/chat/completions routes one prompt to one model
and /v2/orchestrate crosses several models for one robust
answer, the agent endpoints execute a goal as a bounded, multi-step trajectory — planning,
crossing models, and finishing on their own.
Two guarantees set PRYSM agents apart, both enforced server-side and verifiable:
- A hard cost ceiling. A run with cap
$Cnever spends more than$C— not “+5%”, at most$C. Before each step, AgentGuard bounds the step’s worst-case cost and only runs it if it fits the remaining budget, downshifting intensity (Laser → Halo → Foton) under pressure instead of overspending. Hyper-frontier models are ring-fenced out of flat-tier agents by construction. - A tamper-evident trajectory. Every step is hashed into a chain + merkle root — a
PrysmProof trajectory. Reorder, drop, or edit any step and verification
fails. Anyone can verify a trajectory with
POST /v1/agent/verify— no account required.
Run an agent
POST
/v1/agent/run · Requires authenticationAuthorization
Your secret key as a bearer token:
Bearer prysm_sk_...Body
The goal for the agent to accomplish autonomously. (
prompt is accepted as an alias.)The hard spend ceiling for the entire run, in USD. The run can never exceed it. Defaults
to 5× the plan’s per-query envelope. A request above your tier’s limit is rejected with
402 before any model runs.Optional hard cap for a single step (clamped to ≤ the run cap). Useful to keep a
high-fan-out agent from spending most of its budget on one step. AgentGuard binds it when
planning each step.
Maximum number of steps before the run stops gracefully. Hard ceiling:
1000.The objective dial:
efficiency, balanced, or depth. Sets the starting intensity; the
guard still downshifts under budget pressure.A retry-safe key. A second
/v1/agent/run with the same key (same user) returns the original
run without spending again — no double-charge.Maximum tokens per underlying model call.
Sampling temperature passed to the underlying models.
Response
Always
agent.run.Unique run id, e.g.
agt_9f8e.... Use it with the other agent endpoints.complete, budget_exhausted, or max_steps_reached. The run never errors out from budget pressure — it stops gracefully and returns the best partial result.The policy the run used.
The primary per-step strategy.
The sub-tasks the goal was decomposed into.
How many steps executed.
Total spend — always ≤
max_cost_usd.The hard cap that was enforced.
Budget left.
The run’s PrysmProof trajectory root, e.g.
sha256:a1b2c3d4e5f6....The consolidated final result.
The per-step trajectory.
Budget-pressure alerts (70% → WARNING/Halo, 90% → CRITICAL/Foton).
Plan envelope, tier limit, multiplier, and the enforced cap.
Set when a run stopped on budget/steps, e.g. “agent stopped after 7 steps (budget_exhausted); 5.00 spent.”
List runs
GET
/v1/agent/runs?limit=50 · Requires authenticationlimit is
capped at 200.
Always
list.Number of runs returned.
Run summaries (same shape as the run state, plus a truncated
goal).Get run state
GET
/v1/agent/{run_id} · Requires authenticationstatus, cost_consumed_usd, steps_taken,
trajectory_proof, output. Returns 404 if the run isn’t yours.
Get the full trajectory
GET
/v1/agent/{run_id}/trajectory · Requires authenticationWhen
true, returns the full 64-hex per-step hashes and step proofs (instead of the
truncated display form) plus a ready-to-POST verify_request bundle — pipe it straight
into POST /v1/agent/verify to independently re-confirm the run
without trusting this server. This closes the external-verification loop end-to-end.Every step with its hashes, cost, intensity, and per-step proof (full 64-hex when
?full=true).Deterministic-replay result:
{ "valid": true, "recomputed_proof": "sha256:...", "n_steps": N, "mismatched_steps": [] }.Present only with
?full=true: a self-contained bundle (run_id, trajectory_proof,
policy, strategy, output_hash, steps, step_proofs) that POSTs directly to
/v1/agent/verify and returns valid: true.Cancel a run
POST
/v1/agent/{run_id}/cancel · Requires authenticationVerify a trajectory
POST
/v1/agent/verify · Public — no authenticationtrajectory_proof. Lets an external auditor confirm a PRYSM agent’s trajectory
without trusting (or even reaching) PRYSM’s servers. Verification needs the full (64-hex)
per-step hashes. Capped at 2,000 steps.
The run id the proof was computed over.
The claimed
sha256:... root to check.The step records (
index, model, input_hash, output_hash, cost_usd, confidence, timestamp).The run’s policy.
The run’s primary strategy.
The raw final output (we hash it). Or supply
output_hash directly.Optional claimed per-step proofs — when supplied, a tamper is localized in
mismatched_steps.Whether the trajectory verifies.
The proof recomputed from the supplied data.
Indices of steps whose proof didn’t match (empty when valid).
Errors
| Status | error | Meaning |
|---|---|---|
400 | no_goal | goal (or prompt) was empty. |
401 | — | Missing or invalid API key. |
402 | budget_exceeds_tier_limit | max_cost_usd exceeds your tier’s ceiling (5× the plan envelope). |
404 | run_not_found | No such run, or it isn’t yours. |
413 | request_too_large | Request body exceeds the server limit (default 2 MiB). |
502 | agent_error | The runner raised unexpectedly. |
503 | no_provider_available | No provider API keys are configured on the server. |