General Documentation
Agents
Agent Executions
Test Suites
Projects
WhatsApp Conversations
Customers
WhatsApp Configs
Agent Test Chats
Conversation Assignments
WhatsApp Templates
WhatsApp Contact Notes
Agent Snapshots
Agents
Get agent with graph
Returns agent details including the langgraph definition
GET
/
agents
/
{agent_id}
/
graph
Copy
curl --request GET \
--url https://app.kapso.ai/api/v1/agents/{agent_id}/graph \
--header 'X-API-Key: <api-key>'
Copy
{
"data": {
"id": "agent-123abc",
"name": "Customer Support Agent",
"system_prompt": "You are a helpful assistant",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"graph": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"prompt": "<string>",
"config": {},
"global": true,
"tool_ids": [
"<string>"
],
"nodeable_id": "<string>",
"global_condition": "<string>",
"webhook": {
"nodeable_id": "<string>",
"url": "<string>",
"http_method": "<string>",
"headers": {},
"body": {},
"mock_response": {},
"mock_response_enabled": true,
"headers_raw": "<string>",
"body_raw": "<string>",
"mock_response_raw": "<string>"
},
"whatsapp_template": {
"nodeable_id": "<string>",
"name": "<string>",
"phone_number": "<string>",
"template_parameters": {},
"whatsapp_node_id": "<string>",
"whatsapp_config_id": "<string>",
"whatsapp_template_id": "<string>",
"wait_for_response": true
},
"knowledge_base": {
"nodeable_id": "<string>",
"key": "<string>",
"knowledge_base_text": "<string>"
},
"handoff": {
"nodeable_id": "<string>"
},
"warm_end": {
"nodeable_id": "<string>",
"timeout_minutes": 123
}
}
],
"edges": [
{
"id": "<string>",
"from": "<string>",
"to": "<string>",
"label": "<string>",
"conditions": {}
}
],
"tools": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"metadata": {}
}
}
}
Authorizations
API key required for all endpoints
Path Parameters
Response
200
application/json
Agent with graph definition
The response is of type object
.
Copy
curl --request GET \
--url https://app.kapso.ai/api/v1/agents/{agent_id}/graph \
--header 'X-API-Key: <api-key>'
Copy
{
"data": {
"id": "agent-123abc",
"name": "Customer Support Agent",
"system_prompt": "You are a helpful assistant",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"graph": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"prompt": "<string>",
"config": {},
"global": true,
"tool_ids": [
"<string>"
],
"nodeable_id": "<string>",
"global_condition": "<string>",
"webhook": {
"nodeable_id": "<string>",
"url": "<string>",
"http_method": "<string>",
"headers": {},
"body": {},
"mock_response": {},
"mock_response_enabled": true,
"headers_raw": "<string>",
"body_raw": "<string>",
"mock_response_raw": "<string>"
},
"whatsapp_template": {
"nodeable_id": "<string>",
"name": "<string>",
"phone_number": "<string>",
"template_parameters": {},
"whatsapp_node_id": "<string>",
"whatsapp_config_id": "<string>",
"whatsapp_template_id": "<string>",
"wait_for_response": true
},
"knowledge_base": {
"nodeable_id": "<string>",
"key": "<string>",
"knowledge_base_text": "<string>"
},
"handoff": {
"nodeable_id": "<string>"
},
"warm_end": {
"nodeable_id": "<string>",
"timeout_minutes": 123
}
}
],
"edges": [
{
"id": "<string>",
"from": "<string>",
"to": "<string>",
"label": "<string>",
"conditions": {}
}
],
"tools": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"metadata": {}
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.