Skip to Content
Agents

Get an agent

Permissionagents:readAuthentication
GET
/agents/{id}

Returns metadata, mutable draft, deployment pointers, and compact immutable history from one coherent aggregate snapshot. Use the strong ETag on any subsequent agent mutation.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Response Body

Success

application/json
  1. response
id*string
Formatuuid
slug*string
name*string
revision*integer

Monotonic persisted revision of the complete mutable agent aggregate. Never construct an ETag from this number: the opaque aggregate tag also covers a representation-version component and deployment capability bits.

Formatint64
Range1 <= value
updated_at*string

Time of the latest externally visible aggregate change. Semantic no-ops preserve this value.

Formatdate-time
production_version_id?string
Formatuuid
production_version_number?integer

Immutable version number currently deployed to production. Omitted until production_version_id is present; a staging-only snapshot is never reported as production.

Range1 <= value
production_version?|

Full draft or immutable snapshot. Drafts have is_draft=true and omit version; immutable snapshots have is_draft=false and require their positive version number. prompt and workflow are mutually exclusive. Modern runnable rows have exactly one of them; neither is allowed only so a versionless or migrated legacy empty row remains readable and can be repaired through draft authoring.

pipeline_topology?string

Topology of the effective version selected in strict production→staging→draft precedence. Omitted only when none of those pointers resolves to a version. Reported label derived from pipeline_mode: cascaded (STT → brain → TTS) reads three_stage, speech_model reads two_stage_speechlm; a legacy version stored on the three-stage engine also reads three_stage. It is not the runtime engine selector (every v2 version, cascaded included, runs the v2 turn engine), and writing three_stage back to a cascaded draft is a no-op.

Value in"three_stage""two_stage_speechlm"
mode*string

Content mode of the same effective production→staging→draft version used for pipeline_topology. prompt means prompt is present, and empty means no effective runnable content/version exists. This is deployment-effective state, not necessarily the newest draft's mode.

Value in"prompt""empty"
created_at*string
Formatdate-time
archived_at?string
Formatdate-time
staging_version_id?string
Formatuuid
draft_version_id?string
Formatuuid
staging_version?|

Full draft or immutable snapshot. Drafts have is_draft=true and omit version; immutable snapshots have is_draft=false and require their positive version number. prompt and workflow are mutually exclusive. Modern runnable rows have exactly one of them; neither is allowed only so a versionless or migrated legacy empty row remains readable and can be repaired through draft authoring.

draft_version?|

Full draft or immutable snapshot. Drafts have is_draft=true and omit version; immutable snapshots have is_draft=false and require their positive version number. prompt and workflow are mutually exclusive. Modern runnable rows have exactly one of them; neither is allowed only so a versionless or migrated legacy empty row remains readable and can be repaired through draft authoring.

versions*array<>

At most 200 compact immutable snapshots, ordered by created_at descending and then UUID id descending. Drafts are excluded. Use /agents/{id}/versions to traverse the complete history with the same ordering.

Itemsitems <= 200
three_stage_allowed*boolean

Point-in-time deployment capability. True means new draft authoring and lifecycle activation may select three_stage, subject to provider-specific compatibility. False means clients must author two_stage_speechlm; an old immutable three-stage snapshot remains readable but cannot be activated.

all_stt_models_allowed*boolean

Point-in-time deployment capability. True means agent authoring may select any enabled compatible STT catalog model; false means the server applies its curated STT allowlist. This flag is not an entitlement and can change between reads, so lifecycle operations always revalidate it.

Example Request
curl -X GET 'https://api.kejue.co/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "11111111-1111-4111-8111-111111111111",  "slug": "billing_assistant",  "name": "Billing Assistant",  "revision": 5,  "updated_at": "2026-07-20T09:25:00Z",  "production_version_id": "33333333-3333-4333-8333-333333333333",  "production_version_number": 1,  "production_version": {    "id": "33333333-3333-4333-8333-333333333333",    "version": 1,    "is_draft": false,    "name": "Initial production candidate",    "prompt": "Help {{lead_name}} resolve their billing question.",    "pipeline_topology": "two_stage_speechlm",    "pipeline_mode": "speech_model",    "endpointing_mode": "auto",    "created_by": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",    "created_at": "2026-07-20T09:15:00Z"  },  "staging_version_id": "33333333-3333-4333-8333-333333333333",  "staging_version": {    "id": "33333333-3333-4333-8333-333333333333",    "version": 1,    "is_draft": false,    "name": "Initial production candidate",    "prompt": "Help {{lead_name}} resolve their billing question.",    "pipeline_topology": "two_stage_speechlm",    "pipeline_mode": "speech_model",    "endpointing_mode": "auto",    "created_by": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",    "created_at": "2026-07-20T09:15:00Z"  },  "draft_version_id": "22222222-2222-4222-8222-222222222222",  "draft_version": {    "id": "22222222-2222-4222-8222-222222222222",    "is_draft": true,    "prompt": "Help {{lead_name}} resolve their billing question.",    "pipeline_topology": "two_stage_speechlm",    "pipeline_mode": "speech_model",    "endpointing_mode": "auto",    "created_at": "2026-07-20T09:00:00Z"  },  "pipeline_topology": "two_stage_speechlm",  "mode": "prompt",  "created_at": "2026-07-20T09:00:00Z",  "versions": [    {      "id": "33333333-3333-4333-8333-333333333333",      "version": 1,      "is_draft": false,      "name": "Initial production candidate",      "pipeline_topology": "two_stage_speechlm",      "created_by": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",      "created_at": "2026-07-20T09:15:00Z"    }  ],  "three_stage_allowed": false,  "all_stt_models_allowed": false}