Skip to main content
Flow AgentsVersion: v3

Update Agent

PATCH/agent-studio/agent/versions/{versionId}

Updates a specific agent version by versionId. Supports updating nodes, edges, variables, and configuration.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:agent-studio.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Path Parameters

versionIdstringrequired

Agent version ID to update

Example:v1a2b3c4d5e6f7g8h9i0

Query Parameters

sourcestring

Origin channel attributed to this write for auditing (e.g. public_api, internal)

Example:api

Body

locationIdstringrequired

Location ID for authorization

Example:C2QujeCh8ZnC7al2InWR
versionNamestring

Version name

Example:Customer Support Agent v2
descriptionstring

Description of the version

Example:Updated version with improved customer handling logic
nodesobject[]

Complete array of nodes for the agent workflow. Provide all nodes including unchanged ones.

Example
[
  {
    "nodeId": "node_1",
    "nodeName": "Start",
    "type": "start",
    "isStartNode": true
  },
  {
    "nodeId": "node_2",
    "nodeName": "LLM Node",
    "type": "llm",
    "nodeConfig": {
      "prompt": "How can I help you?",
      "llmProvider": "openai",
      "llmModel": "gpt-4"
    }
  }
]
edgesobject[]

Complete array of edges connecting the nodes. Provide all edges including unchanged ones.

Example
[
  {
    "startNode": "node_1",
    "endNode": "node_2"
  }
]
globalVariablesobject[]

Global variables accessible throughout the agent workflow

Example
[
  {
    "key": "apiKey",
    "type": "string",
    "value": "your-api-key"
  }
]
inputVariablesobject[]

Input variables required from user at execution time

Example
[
  {
    "key": "customerName",
    "type": "string",
    "description": "Customer name for personalization"
  }
]
runtimeVariablesobject[]

Runtime variables generated during agent execution

Example
[
  {
    "key": "sessionId",
    "type": "string",
    "description": "Current session identifier"
  }
]
globalConfigobject

Global configuration including prompts and settings

Example
{
  "globalPrompt": {
    "currentPrompt": "You are a helpful customer support assistant.",
    "history": []
  }
}
userIdstring

User ID performing the update

Example:usr_abc123def456
userNamestring

User name performing the update

Example:John Doe

Response

Version updated successfully

successbooleanrequired

Success status

Example:true
messagestringrequired

Response message

Example:Agent updated successfully
dataobjectrequired

Updated agent or version data