Skip to main content

Integrations API

GET /agent-graphs/{agentId}
Retrieve the complete graph structure for an agent, including all nodes, connections, and configurations.

Headers

x-api-key
string
required
Your API key for authentication
current-workspace-id
string
required
Your workspace ID

Path Parameters

agentId
string
required
The unique identifier of the agent

Response

agentId
string
Unique identifier for the agent
graph
object
The agent’s graph structure
version
string
Version of the agent graph
updatedAt
string
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.