Retrieve an agent

Updated

Retrieves the configuration of a saved agent.

Preview documentation

You're reading the Conversational AI Platform (Preview) docs. Switch to Main.
GET
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/agents/{agent_id}

The response includes the agent's current ETag. Pass it in the If-Match header when you update the agent. Pipeline stages report only credential.mode. API keys and secret references are never returned.

Path Parameters

appidstring
Required

The App ID of your project.

agent_idstring
Required

The ID of the agent, returned in agent_id when you create the agent.

Response Body

The request was successful. The response body contains the agent.

Response Headers

Agora-Request-Idstring

A unique ID for the request. Include it when you contact Agora support.

ETagstring

The current version of the resource. Pass this value in the If-Match header of your next update or delete request for this resource.

agent_idstring
Required

The ID of the agent, a UUID.

agent_namestring
Required

A name for the agent, 1 to 255 characters. It doesn't need to be unique.

instructionsstring

The system instructions that define how the agent behaves. The model receives them as the first system message, before messages.

messagesarray<object>

Messages that start the conversation history. They follow instructions.

variablesobject

Every variable the agent uses, keyed by variable name. A name starts with a lowercase letter and contains up to 64 lowercase letters, digits, and underscores. Reference a variable as {{variable_name}} in instructions, messages, greeting.text, pipeline.llm.failure_message, pipeline.silence_config.content, and generated filler instructions. The agent doesn't store values: pass them in values when you start a session, or in each campaign contact. Expansion is single-pass, so a value that contains a placeholder isn't expanded again.

greetingobject

The message the agent speaks when a participant joins. If you omit it, the agent doesn't greet participants automatically.

pipelineobject

The models that power the agent: separate ASR, LLM, and TTS stages. When you pass a pipeline, llm and tts are required.

filler_wordsobject

Short phrases the agent says while it waits for the LLM to respond, such as when it waits for a tool call.

create_tsinteger
Required

The time the agent was created, as a Unix timestamp in seconds.

update_tsinteger
Required

The time the agent was last updated, as a Unix timestamp in seconds.

Authorization

This endpoint requires authentication.

Request examples

Example Request
curl -X GET 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08'

Response example

Example Response
{  "agent_id": "3f6c2a9e-8d1b-4e7a-9c55-0b2f7d1e4a10",  "agent_name": "Customer Support Agent",  "instructions": "You are a support agent for Acme. Be concise.",  "pipeline": {    "mode": "cascaded",    "llm": {      "credential": {        "mode": "byok"      },      "vendor": "openai",      "style": "openai",      "model": "<model_name>"    }  },  "create_ts": 1786543331,  "update_ts": 1787733713}