Skip to content

Ctrl/⌘ K

API reference

Get an agent run

Reads the current or terminal status of one authenticated background run.

GET /v1/agent/{id}

Parameters

Request parameters
Name
id
In
path
Required
Yes
Type
string
Description
Agent-session UUID returned at creation.
Name
x-agent-session
In
header
Required
Yes
Type
string
Description
Session proof present only in the creation response.
Request cURL
curl --request GET "https://yep.com/api/v1/agent/$YEP_AGENT_SESSION_ID" \
  --header "Authorization: Bearer $YEP_API_KEY" \
  --header "x-agent-session: $YEP_AGENT_SESSION_SECRET"

Responses

Response statuses
Status
200
Description
Current or terminal agent-session status.
Body
AgentRuntimeStatus
Status
400
Description
Invalid request.
Body
PublicApiError
Status
401
Description
API-key or session-proof authentication failed.
Body
PublicApiError
Status
403
Description
The API key lacks agent permission.
Body
PublicApiError
Status
404
Description
The session does not exist in the caller's scope.
Body
PublicApiError
Status
429
Description
The request exceeded a rate boundary.
Body
PublicApiError
Status
500
Description
The service could not safely complete the operation.
Body
PublicApiError
Status
502
Description
The agent runtime returned an invalid response.
Body
PublicApiError
Status
503
Description
The agent is temporarily unavailable.
Body
PublicApiError

Schemas

AgentRuntimeFailure

Product-facing agent failure after runtime metadata has crossed the policy boundary.

AgentRuntimeFailure fields
Field
class
Required
Yes
Type
AgentRuntimeFailureClass
Description
Stable runtime failure class.
Constraints
Field
message
Required
Yes
Type
string
Description
Sanitized target-owned explanation.
Constraints
Field
reason
Required
Yes
Type
null | ErrorReason
Description
Constraints
Field
recovery
Required
Yes
Type
null | ErrorRecovery
Description
Constraints

AgentRuntimeFailureClass

Closed portable runtime failure classes.

Request json
[
  "rate_limited",
  "timeout",
  "transport",
  "invalid_output",
  "rejected",
  "internal"
]

AgentRuntimeState

Portable runtime lifecycle values.

Request json
[
  "queued",
  "running",
  "succeeded",
  "failed"
]

AgentRuntimeStatus

Product-facing terminal or in-progress status returned by agent APIs.

AgentRuntimeStatus fields
Field
agent_session_id
Required
Yes
Type
string
Description
Non-secret execution correlation id from the signed runtime session.
Constraints
Field
error
Required
Yes
Type
null | AgentRuntimeFailure
Description
Constraints
Field
output
Required
Yes
Type
null | Report
Description
Constraints
Field
program_digest
Required
Yes
Type
string
Description
Pinned semantic program digest.
Constraints
Field
state
Required
Yes
Type
AgentRuntimeState
Description
Closed runtime lifecycle state.
Constraints
Field
usage
Required
Yes
Type
UsageReport
Description
Provider usage accumulated so far.
Constraints

ErrorCode

Machine-readable product API failure.

Request json
[
  "unauthenticated",
  "forbidden",
  "invalid_request",
  "not_found",
  "conflict",
  "payment_required",
  "too_many_requests",
  "upstream",
  "internal"
]

ErrorReason

Stable product API failure reason.

Request json
[
  "malformed_request",
  "authentication_required",
  "reauthentication_required",
  "permission_denied",
  "api_key_name_invalid",
  "spend_policy_invalid",
  "rate_policy_invalid",
  "provider_key_invalid",
  "provider_key_missing",
  "agent_model_not_allowed",
  "resource_not_found",
  "state_conflict",
  "insufficient_funds",
  "spend_limit_exceeded",
  "rate_limit_exceeded",
  "model_provider_rate_limited",
  "model_provider_overloaded",
  "dependency_unavailable",
  "internal_failure"
]

ErrorRecovery

Browser-safe recovery action selected by the authoritative product boundary.

ErrorRecovery alternatives
Variant
1
Type
object
Variant
2
Type
object
Variant
3
Type
object

PublicApiError

Stable public error envelope for APIs whose reason vocabulary is extensible.

PublicApiError fields
Field
agent_session_id
Required
No
Type
string | null
Description
Agent execution correlation id, present after an invocation is admitted.
Constraints
Field
code
Required
Yes
Type
ErrorCode
Description
Closed status category suitable for program control flow.
Constraints
Field
message
Required
Yes
Type
string
Description
Safe diagnostic intended for operators, not program branching.
Constraints
Field
reason
Required
Yes
Type
string
Description
Extensible machine-readable detail; clients must accept unknown values.
Constraints
Field
recovery
Required
No
Type
null | ErrorRecovery
Description
Constraints
Field
validation
Required
No
Type
null | ValidationReport
Description
Constraints

Report

UsageReport

ValidationIssue

One actionable, privacy-safe contract violation.

ValidationIssue fields
Field
allowed_values
Required
No
Type
array | null
Description
Constraints
max items: 16
Field
code
Required
Yes
Type
string
Description
Stable, extensible machine-readable category.
Constraints
max length: 64
Field
path
Required
Yes
Type
string
Description
RFC 6901 pointer to the rejected location; empty means the root value.
Constraints
max length: 1024
Field
suggestion
Required
Yes
Type
string
Description
Code-owned instruction for correcting the request.
Constraints
max length: 512

ValidationReport

Bounded validation feedback shared by model, REST, and MCP boundaries.

ValidationReport fields
Field
contract
Required
Yes
Type
string
Description
Stable contract name, normally the published schema component name.
Constraints
max length: 128
Field
issues
Required
Yes
Type
ValidationIssue[]
Description
At most eight deterministic violations. Correct every issue before retrying.
Constraints
max items: 8
Field
truncated
Required
Yes
Type
boolean
Description
Whether more violations were omitted; retry after correcting the listed issues.
Constraints

Commands