Integrations API
GET /agent-graphs/{agentId}
Retrieve the complete graph structure for an agent, including all nodes, connections, and configurations.
Your API key for authentication
Path Parameters
The unique identifier of the agent
Response
Unique identifier for the agent
The agent’s graph structure
Array of nodes in the agent flow
Unique identifier for the node
Node type (e.g., “prompt”, “integration”, “condition”, “tool”)
Node-specific configuration
Visual position in the graph editor
Array of connections between nodes
Unique identifier for the edge
Optional condition for this edge
Version of the agent graph
ISO 8601 timestamp of when the graph was last updated
Example Request
curl -X GET https://api.beamstudio.ai/agent-graphs/agent_123456 \
-H "x-api-key: your-api-key" \
-H "current-workspace-id: your-workspace-id"
Example Response
{
"agentId": "agent_123456",
"graph": {
"nodes": [
{
"id": "node_1",
"type": "prompt",
"config": {
"prompt": "Process customer inquiry: {{input.message}}",
"model": "gpt-4"
},
"position": { "x": 100, "y": 100 }
},
{
"id": "node_2",
"type": "integration",
"config": {
"integration": "zendesk",
"action": "create_ticket"
},
"position": { "x": 300, "y": 100 }
}
],
"edges": [
{
"id": "edge_1",
"source": "node_1",
"target": "node_2",
"condition": null
}
]
},
"version": "1.2.0",
"updatedAt": "2024-03-20T14:30:00Z"
}
Use Cases
Agent Visualization
Use graph data to visualize agent workflows in your own application.
Debugging
Inspect agent structure to understand execution flow and troubleshoot issues.
Version Control
Track changes to agent graphs over time by comparing versions.
Analytics
Analyze agent complexity and structure for optimization opportunities.