Skip to main content
POST
Update Agent
Updates an existing agent. Graph mutation is action-based: send ordered operations (create_node, update_node, delete_node, create_connection, delete_connection). Node positions are always backend-managed (auto-layout).

Request

You can also call the same operation with PATCH /agent/{agent_id}/update.

Body Parameters

At least one of name, description, visibility, or operations is required.

Operation Types (Detailed)

create_node

Backend behavior: creates a new node, assigns a persisted agent_node_id, and returns mapping details in created_nodes. You cannot supply agent_node_id in create_node; use returned IDs for later operations. temp_ref_id is only valid within the current update request. It is never saved and cannot be reused in future update calls.

update_node

delete_node

Backend behavior: also removes connections where this node is source or target.

create_connection

Rules:
  • Provide exactly one source reference (source_agent_node_id or source_temp_ref_id).
  • Provide exactly one target reference (target_agent_node_id or target_temp_ref_id).
  • source_temp_ref_id and target_temp_ref_id must reference a temp_ref_id created by an earlier create_node operation in the same request.
Mutation execution is atomic: if any operation fails validation or persistence, no graph changes are saved. Error messages include the operation step (for example, Operation 3: ...) to make retries deterministic.

delete_connection

To rewire a connection, send delete_connection then create_connection in the same operations array; execution order is preserved and applied atomically.

Response

Validation Error Response

When parameter validation fails, the API returns all detected issues in one response: