Skip to main content
POST
/
agent-graphs
/
add-node
Add Node to Graph
curl --request POST \
  --url https://api.beamstudio.ai/agent-graphs/add-node \
  --header 'Content-Type: application/json' \
  --header 'current-workspace-id: <current-workspace-id>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "node": {
    "isAttachmentDataPulledIn": true,
    "evaluationCriteria": [
      "<string>"
    ],
    "objective": "<string>",
    "onError": "STOP",
    "isEvaluationEnabled": false,
    "autoRetryLimitWhenAccuracyIsLow": 1,
    "enableAutoRetryWhenAccuracyIsLow": false,
    "enableAutoRetryWhenFailure": false,
    "autoRetryWhenAccuracyLessThan": 80,
    "autoRetryCountWhenFailure": 1,
    "autoRetryWaitTimeWhenFailureInMs": 1000,
    "nodeType": "executionNode",
    "nodeConfigurations": {
      "conditionType": "llm_based",
      "llmModel": "<string>",
      "fallbackModels": "<string>",
      "waitType": "time_based",
      "timeToWaitValue": 123,
      "timeToWaitUnit": "minutes",
      "linkedAgentGraphNodeId": "<string>",
      "rule": "<string>",
      "conditions": [
        {
          "operator": "AND",
          "conditions": [
            {
              "condition": "is",
              "operator": "AND",
              "property": "<string>",
              "value": "<string>"
            }
          ]
        }
      ],
      "timeoutType": "no_timeout",
      "timeoutValue": 123,
      "timeoutUnit": "minutes",
      "onTimeout": "continue"
    },
    "autoRetryDescription": null,
    "enableAutoRetryDescription": false,
    "toolConfiguration": {
      "toolFunctionName": "<string>",
      "toolName": "<string>",
      "prompt": "<string>",
      "inputParams": [
        {
          "paramName": "customerId",
          "fillType": "ai_fill",
          "position": 1,
          "question": "What is the customer ID?",
          "linkParams": {
            "toolId": "<string>",
            "toolFunctionName": "<string>",
            "outputParam": "<string>",
            "outputId": "<string>"
          },
          "linkParamOutputId": "<string>",
          "paramDescription": "The unique identifier for the customer record.",
          "paramTip": "Enter the 8-digit customer ID from their account.",
          "staticValue": "default_value",
          "required": true,
          "dataType": "string",
          "isArray": false,
          "typeOptions": {},
          "outputExample": "CUST-12345678",
          "reloadProps": false,
          "remoteOptions": false,
          "options": [
            {
              "label": "<string>",
              "value": "<string>"
            }
          ],
          "linkedOutputParamRulesData": {
            "linkedParamConfigurations": {
              "conditionType": "llm_based"
            },
            "rules": [
              {
                "elementKey": "<string>",
                "operator": "equals",
                "comparisonValueType": "static",
                "comparisonValue": "<string>",
                "nextRuleOperator": "AND"
              }
            ],
            "linkedParamRulePrompt": "<string>"
          }
        }
      ],
      "outputParams": [
        {
          "position": 123,
          "paramName": "<string>",
          "paramDescription": "<string>",
          "id": "<string>",
          "agentToolConfigurationId": "<string>",
          "dataType": "string",
          "isArray": true,
          "typeOptions": {},
          "parentId": "<string>",
          "paramPath": "<string>",
          "outputExample": "<string>"
        }
      ],
      "shortDescription": "<string>",
      "description": "<string>",
      "isAvailableToWorkspace": true,
      "iconSrc": "<string>",
      "preferredModel": "<string>",
      "fallbackModels": "DEEP_SEEK,BEDROCK_CLAUDE_3_7_SONNET",
      "requiresConsent": true,
      "isMemoryTool": true,
      "isBackgroundTool": true,
      "memoryLookupInstruction": "<string>",
      "isBatchExecutionEnabled": true,
      "dynamicPropsId": "<string>",
      "integrationProviderId": "<string>",
      "code": "<string>",
      "codeLanguage": "<string>"
    },
    "id": "<string>",
    "customId": "<string>",
    "isExitNode": false,
    "xCoordinate": 123,
    "yCoordinate": 123
  },
  "agentId": "<string>",
  "graphId": "<string>"
}
'
{
  "id": "<string>",
  "customId": "<string>",
  "objective": "<string>",
  "evaluationCriteria": [
    "<string>"
  ],
  "isEntryNode": true,
  "isExitNode": true,
  "isEvaluationEnabled": true,
  "autoRetryWhenAccuracyLessThan": 123,
  "autoRetryLimitWhenAccuracyIsLow": 123,
  "enableAutoRetryWhenAccuracyIsLow": true,
  "enableAutoRetryWhenFailure": true,
  "autoRetryDescription": null,
  "enableAutoRetryDescription": false,
  "autoRetryCountWhenFailure": 123,
  "autoRetryWaitTimeWhenFailureInMs": 123,
  "isAttachmentDataPulledIn": true,
  "isEdited": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "toolConfiguration": {
    "id": "<string>",
    "toolFunctionName": "<string>",
    "toolName": "<string>",
    "requiresConsent": true,
    "isMemoryTool": true,
    "isBackgroundTool": true,
    "isBatchExecutionEnabled": true,
    "inputParams": [
      {
        "id": "param-123e4567-e89b-12d3-a456-426614174000",
        "paramName": "customerId",
        "fillType": "ai_fill",
        "agentToolConfigurationId": "config-123e4567-e89b-12d3-a456-426614174000",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "linkOutputParam": {
          "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": {}
        },
        "linkedOutputParamRules": [
          {
            "elementKey": "<string>",
            "agentToolConfigurationInputParamsId": "<string>",
            "operator": "equals",
            "comparisonValueType": "static",
            "id": "<string>",
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z",
            "comparisonValue": "<string>",
            "nextRuleOperator": "AND"
          }
        ],
        "position": 1,
        "question": "What is the customer ID?",
        "linkParamOutputId": "<string>",
        "paramDescription": "The unique identifier for the customer record.",
        "paramTip": "Enter the 8-digit customer ID from their account.",
        "staticValue": "default_value",
        "required": true,
        "dataType": "string",
        "outputExample": "CUST-12345678",
        "reloadProps": false,
        "remoteOptions": false,
        "options": [
          {
            "label": "<string>",
            "value": "<string>"
          }
        ],
        "linkedParamRulePrompt": "<string>",
        "ruleConditionConfig": {
          "conditionType": "llm_based"
        }
      }
    ],
    "outputParams": [
      {
        "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": {}
      }
    ],
    "iconSrc": "<string>",
    "description": "<string>",
    "memoryLookupInstruction": "<string>",
    "accuracyScore": 123,
    "integrationProviderId": "<string>",
    "dynamicPropsId": "<string>",
    "fallbackModels": "<string>",
    "code": "<string>",
    "codeLanguage": "<string>",
    "originalTool": {
      "toolName": "<string>",
      "toolFunctionName": "<string>",
      "allowWaiting": true,
      "iconSrc": "<string>",
      "type": "<string>",
      "prompt": "<string>",
      "description": "<string>",
      "preferredModel": "<string>",
      "meta": {},
      "integrationId": "<string>",
      "isIntegrationRequired": true,
      "isIntegrationConnected": true,
      "integration": {
        "systemIntegrationProvider": "<string>",
        "systemIntegrationIdentifier": "<string>",
        "customAuthParameters": {}
      },
      "inputParams": [
        {
          "paramName": "customerId",
          "fillType": "ai_fill",
          "position": 1,
          "question": "What is the customer ID?",
          "linkParams": {
            "toolId": "<string>",
            "toolFunctionName": "<string>",
            "outputParam": "<string>",
            "outputId": "<string>"
          },
          "linkParamOutputId": "<string>",
          "paramDescription": "The unique identifier for the customer record.",
          "paramTip": "Enter the 8-digit customer ID from their account.",
          "staticValue": "default_value",
          "required": true,
          "dataType": "string",
          "isArray": false,
          "typeOptions": {},
          "outputExample": "CUST-12345678",
          "reloadProps": false,
          "remoteOptions": false,
          "options": [
            {
              "label": "<string>",
              "value": "<string>"
            }
          ],
          "linkedOutputParamRulesData": {
            "linkedParamConfigurations": {
              "conditionType": "llm_based"
            },
            "rules": [
              {
                "elementKey": "<string>",
                "operator": "equals",
                "comparisonValueType": "static",
                "comparisonValue": "<string>",
                "nextRuleOperator": "AND"
              }
            ],
            "linkedParamRulePrompt": "<string>"
          }
        }
      ],
      "outputParams": [
        {
          "position": 123,
          "paramName": "<string>",
          "paramDescription": "<string>",
          "id": "<string>",
          "agentToolConfigurationId": "<string>",
          "dataType": "string",
          "isArray": true,
          "typeOptions": {},
          "parentId": "<string>",
          "paramPath": "<string>",
          "outputExample": "<string>"
        }
      ]
    },
    "preferredModel": "<string>"
  },
  "childEdges": [
    {
      "id": "<string>",
      "sourceAgentGraphNodeId": "<string>",
      "targetAgentGraphNodeId": "<string>",
      "isAttachmentDataPulledIn": true,
      "conditionGroups": [
        {
          "agentGraphEdgeId": "<string>",
          "edge": {
            "sourceAgentGraphNodeId": "<string>",
            "targetAgentGraphNodeId": "<string>",
            "isAttachmentDataPulledIn": true,
            "conditionGroups": "<array>",
            "id": "<string>",
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z",
            "condition": "<string>"
          },
          "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"
        }
      ],
      "condition": "<string>"
    }
  ],
  "parentEdges": [
    {
      "id": "<string>",
      "sourceAgentGraphNodeId": "<string>",
      "targetAgentGraphNodeId": "<string>",
      "isAttachmentDataPulledIn": true,
      "conditionGroups": [
        {
          "agentGraphEdgeId": "<string>",
          "edge": {
            "sourceAgentGraphNodeId": "<string>",
            "targetAgentGraphNodeId": "<string>",
            "isAttachmentDataPulledIn": true,
            "conditionGroups": "<array>",
            "id": "<string>",
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z",
            "condition": "<string>"
          },
          "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"
        }
      ],
      "condition": "<string>"
    }
  ],
  "xCoordinate": 123,
  "yCoordinate": 123,
  "onError": "CONTINUE",
  "nodeType": "executionNode",
  "nodeConfigurations": {
    "conditionType": "llm_based",
    "llmModel": "<string>",
    "fallbackModels": "<string>",
    "waitType": "time_based",
    "timeToWaitValue": 123,
    "timeToWaitUnit": "minutes",
    "linkedAgentGraphNodeId": "<string>",
    "rule": "<string>",
    "conditions": [
      {
        "operator": "AND",
        "conditions": [
          {
            "condition": "is",
            "operator": "AND",
            "property": "<string>",
            "value": "<string>"
          }
        ]
      }
    ],
    "timeoutType": "no_timeout",
    "timeoutValue": 123,
    "timeoutUnit": "minutes",
    "onTimeout": "continue"
  }
}

Authorizations

x-api-key
string
header
required

Headers

current-workspace-id
string
required

Body

application/json
node
object
required
agentId
string
required
graphId
string
required

Response

201 - application/json

Node added successfully

id
string
required
customId
string
required
objective
string
required
evaluationCriteria
string[]
required
isEntryNode
boolean
required
isExitNode
boolean
required
isEvaluationEnabled
boolean
required
autoRetryWhenAccuracyLessThan
number
required
autoRetryLimitWhenAccuracyIsLow
number
required
enableAutoRetryWhenAccuracyIsLow
boolean
required
enableAutoRetryWhenFailure
boolean
required
autoRetryDescription
string
required
enableAutoRetryDescription
boolean
default:false
required
autoRetryCountWhenFailure
number
required
autoRetryWaitTimeWhenFailureInMs
number
required
isAttachmentDataPulledIn
boolean
required
isEdited
boolean
required
createdAt
string<date-time>
required
toolConfiguration
object
required
childEdges
object[]
required
parentEdges
object[]
required
xCoordinate
number
yCoordinate
number
onError
enum<string>
Available options:
CONTINUE,
STOP
nodeType
enum<string>
Available options:
executionNode,
conditionNode,
waitingNode,
entryNode,
exitNode
nodeConfigurations
object