Skip to main content
POST
/
agent-graphs
/
add-edge
Add Edge to Graph
curl --request POST \
  --url https://api.beamstudio.ai/agent-graphs/add-edge \
  --header 'Content-Type: application/json' \
  --header 'current-workspace-id: <current-workspace-id>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "sourceNodeId": "<string>",
  "targetNodeId": "<string>",
  "agentId": "<string>",
  "agentGraphId": "<string>",
  "isAttachmentDataPulledIn": true,
  "condition": "<string>",
  "groups": [
    {
      "rules": [
        {
          "sourceAgentToolConfigurationOutputParamsId": "<string>",
          "operator": "equals",
          "comparisonValueType": "static",
          "comparisonValue": "<string>",
          "comparisonAgentToolConfigurationOutputParamsId": "<string>",
          "nextRuleOperator": "AND"
        }
      ],
      "nextGroupOperator": "AND"
    }
  ]
}
'
{
  "sourceAgentGraphNodeId": "<string>",
  "targetAgentGraphNodeId": "<string>",
  "isAttachmentDataPulledIn": true,
  "conditionGroups": [
    {
      "agentGraphEdgeId": "<string>",
      "edge": "<unknown>",
      "rules": [
        {
          "agentGraphEdgeConditionGroupId": "<string>",
          "sourceAgentToolConfigurationOutputParamsId": "<string>",
          "operator": "equals",
          "comparisonValueType": "static",
          "group": "<unknown>",
          "sourceOutputParam": {
            "id": "param-123e4567-e89b-12d3-a456-426614174000",
            "agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
            "isArray": false,
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z",
            "paramName": "customerData",
            "position": 1,
            "paramDescription": "The customer data retrieved from the database.",
            "parentId": "<string>",
            "paramPath": "response.data.customer",
            "outputExample": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}",
            "dataType": "string",
            "typeOptions": {}
          },
          "id": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "comparisonValue": "<string>",
          "comparisonAgentToolConfigurationOutputParamsId": "<string>",
          "nextRuleOperator": "AND",
          "comparisonOutputParam": {
            "id": "param-123e4567-e89b-12d3-a456-426614174000",
            "agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
            "isArray": false,
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z",
            "paramName": "customerData",
            "position": 1,
            "paramDescription": "The customer data retrieved from the database.",
            "parentId": "<string>",
            "paramPath": "response.data.customer",
            "outputExample": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}",
            "dataType": "string",
            "typeOptions": {}
          }
        }
      ],
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "nextGroupOperator": "AND"
    }
  ],
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "condition": "<string>"
}

Authorizations

x-api-key
string
header
required

Headers

current-workspace-id
string
required

Body

application/json
sourceNodeId
string
required
targetNodeId
string
required
agentId
string
required
agentGraphId
string
required
isAttachmentDataPulledIn
boolean
required
condition
string
groups
object[]

Response

201 - application/json

Edge added successfully

sourceAgentGraphNodeId
string
required
targetAgentGraphNodeId
string
required
isAttachmentDataPulledIn
boolean
required
conditionGroups
object[]
required
id
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
condition
string