Agents
client.agents combines two public surfaces:
- stable runtime for get/run/replay/rerun flows
- public beta stateless authoring and iteration for create/update/version/publish/workflow/compare/diff/rollback flows
Stable runtime methods
get(agentId, { organizationId })->GET /api/agents/:idrun(agentId, { organizationId, agentVersionId?, input })->POST /api/agents/:id/runloadInputs(runId, { organizationId })->POST /api/agent-runs/:id/load-inputsrerunFromStep(runId, { organizationId, stepId })->POST /api/agent-runs/:id/rerun-from-step
Public beta stateless authoring methods
list({ organizationId })->GET /api/agentscreate(...)->POST /api/agentsupdate(agentId, ...)->PATCH /api/agents/:idcreateVersion(agentId, ...)->POST /api/agents/:id/versionspublish(agentId, ...)->POST /api/agents/:id/publishsaveWorkflow(agentVersionId, ...)->PUT /api/agent-versions/:id/workflowvalidateWorkflow(agentVersionId, ...)->POST /api/agent-versions/:id/workflow/validatecompareRuns({ organizationId, leftRunId, rightRunId })->GET /api/agent-runs/comparediffVersion(agentId, versionId, { organizationId, againstVersionId })->GET /api/agents/:id/versions/:versionId/diffrollbackVersion(agentId, versionId, { organizationId })->POST /api/agents/:id/versions/:versionId/rollback
Workflow model
Workflow is public only as agent-scoped dependent configuration.
That means:
- build workflow through
createVersion,validateWorkflow, andsaveWorkflow - publish through the owning
agent - do not expect a top-level
client.workflows.*resource
Recommended stateless authoring loop
createcreateVersionvalidateWorkflowsaveWorkflowpublishrunclient.runs.get(...)compareRuns,diffVersion, orrollbackVersionwhen iterating
End-to-end proof example
prompt-orchestra-ts/scripts/agent-authoring-e2e.ts is the canonical Sprint 2 example. It exercises the full promoted flow end to end and writes a structured evidence artifact for regression tracking.
Boundary notes
- Agent runtime remains
stable. - Stateless authoring and iteration remain
public beta. - Session-backed routes and realtime agent surfaces are not part of
client.agents.