Get an agent
agents:readAuthenticationReturns metadata, mutable draft, deployment pointers, and compact immutable history from one coherent aggregate snapshot. Use the strong ETag on any subsequent agent mutation.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
id*stringuuidSuccess
application/json- response
id*stringuuidslug*stringname*stringrevision*integerMonotonic 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.
int641 <= valueupdated_at*stringTime of the latest externally visible aggregate change. Semantic no-ops preserve this value.
date-timeproduction_version_id?stringuuidproduction_version_number?integerImmutable version number currently deployed to production. Omitted until production_version_id is present; a staging-only snapshot is never reported as production.
1 <= valueproduction_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?stringTopology 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.
"three_stage""two_stage_speechlm"mode*stringContent 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.
"prompt""empty"created_at*stringdate-timearchived_at?stringdate-timestaging_version_id?stringuuiddraft_version_id?stringuuidstaging_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.
items <= 200three_stage_allowed*booleanPoint-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*booleanPoint-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.
curl -X GET 'https://api.kejue.co/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "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}