Skip to main content
Once you have created an agent, you can retrieve its configuration, apply partial updates, list all agents in your account, or delete agents you no longer need.

Get an agent

Retrieve the full configuration object for a single agent.
GET https://api.xuna.ai/v1/convai/agents/{agent_id}
agent_id
string
required
The ID of the agent to retrieve.
agent = client.conversational_ai.agents.get(
    agent_id="agent_7101k5zvyjhmfg983brhmhkd98n6"
)
print(agent)
The response contains the full conversation_config object, metadata, and any knowledge base or tool attachments.

Update an agent

Apply a partial update to an existing agent. Only the fields you include in the request body are changed.
PATCH https://api.xuna.ai/v1/convai/agents/{agent_id}
agent_id
string
required
The ID of the agent to update.
conversation_config
object
Partial conversation config. Provide only the fields you want to change.
client.conversational_ai.agents.update(
    agent_id="agent_7101k5zvyjhmfg983brhmhkd98n6",
    conversation_config={
        "agent": {
            "first_message": "Hello! How can I assist you today?",
        }
    },
)
Use PATCH to iterate quickly on your agent’s prompt and voice without recreating it. All existing settings outside the updated fields are preserved.

List agents

Return all agents in your account.
GET https://api.xuna.ai/v1/convai/agents
result = client.conversational_ai.agents.list()
for agent in result.agents:
    print(agent.agent_id, agent.name)
Response:
agents
object[]
required
Array of agent summary objects. Each entry includes agent_id, name, tags, and creation timestamps.
has_more
boolean
required
Indicates whether additional pages of results are available.

Delete an agent

Permanently delete an agent. This action cannot be undone.
DELETE https://api.xuna.ai/v1/convai/agents/{agent_id}
agent_id
string
required
The ID of the agent to delete.
client.conversational_ai.agents.delete(
    agent_id="agent_7101k5zvyjhmfg983brhmhkd98n6"
)
print("Agent deleted.")
Deleting an agent also removes its association with any phone numbers. Assign a different agent to those numbers before deleting if you want inbound calls to continue.