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
Agent Snapshots
Create a new agent snapshot
Creates a snapshot of an agent at its current state, or with a provided graph structure
POST
/
agents
/
{agent_id}
/
agent_snapshots
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/agents/{agent_id}/agent_snapshots \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"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": {}
}
}'
Copy
{
"data": {
"id": "snapshot-123abc",
"agent_id": "agent-456def",
"name": "Agent Name Snapshot (2023-05-01 14:30)",
"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
Body
application/json
Response
201
application/json
Agent snapshot created successfully
The response is of type object
.
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/agents/{agent_id}/agent_snapshots \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"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": {}
}
}'
Copy
{
"data": {
"id": "snapshot-123abc",
"agent_id": "agent-456def",
"name": "Agent Name Snapshot (2023-05-01 14:30)",
"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.