v172

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0826148911.7 MB
Agents

Update agent

Modifies an existing agent's configuration with partial updates. Supports updating any aspect of the agent including model assignments (primary and fallback), instructions, tools, knowledge bases, memory stores, and execution parameters. Only the fields provided in the request body will be updated; all other fields remain unchanged. Changes take effect immediately for new agent invocations.

patch/v2/agents/{agent_key}

Path parameters

agent_keystring required

The unique key of the agent to update

The unique key of the agent to update

Request body

keystring
display_namestring
project_idstring
rolestring
descriptionstring

A brief description of what the agent does

instructionsstring
system_promptstring nullable

A custom system prompt template for the agent. If omitted, the default template is used.

pathstring

Entity storage path.

With workspace-level API keys, use the format project/folder/subfolder/.... The first element identifies the project, followed by nested folders (auto-created as needed). Example: Default/agents.

With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: agents. For backward compatibility, a leading project name is ignored when it matches the scoped project.

memory_storesstring[]

Array of memory store identifiers. Accepts both memory store IDs and keys.

skillsstring[] nullable

List of skills that the agent can utilize. This field allows you to specify which skills the agent has access to, enabling more complex and dynamic behavior.

variablesobject

Extracted variables from agent instructions

engine'text' | 'jinja' | 'mustache'
versionIncrement'major' | 'minor' | 'patch'

Optional semantic version bump to create after a successful publish.

versionDescriptionstring

Optional description stored with the created version.

Example request

{
  "model": {
    "parameters": {
      "fallbacks": [
        {
          "model": "openai/gpt-4o-mini"
        }
      ],
      "cache": {
        "ttl": 3600
      },
      "load_balancer": {
        "type": "weight_based",
        "models": [
          {
            "model": "openai/gpt-4o",
            "weight": 0.7
          },
          {
            "model": "anthropic/claude-3-5-sonnet",
            "weight": 0.3
          }
        ]
      },
      "timeout": {
        "call_timeout": 30000
      }
    },
    "retry": {
      "count": 3,
      "on_codes": [
        429,
        500,
        502,
        503,
        504
      ]
    }
  },
  "fallback_models": [
    {
      "parameters": {
        "fallbacks": [
          {
            "model": "openai/gpt-4o-mini"
          }
        ],
        "cache": {
          "ttl": 3600
        },
        "load_balancer": {
          "type": "weight_based",
          "models": [
            {
              "model": "openai/gpt-4o",
              "weight": 0.7
            },
            {
              "model": "anthropic/claude-3-5-sonnet",
              "weight": 0.3
            }
          ]
        },
        "timeout": {
          "call_timeout": 30000
        }
      },
      "retry": {
        "count": 3,
        "on_codes": [
          429,
          500,
          502,
          503,
          504
        ]
      }
    }
  ],
  "settings": {
    "tools": [
      {
        "type": "mcp",
        "id": "01KA84ND5J0SWQMA2Q8HY5WZZZ",
        "tool_id": "01KXYZ123456789",
        "requires_approval": false
      }
    ]
  },
  "path": "Default",
  "knowledge_bases": [
    {
      "knowledge_id": "customer-knowledge-base"
    }
  ]
}

Response

Agent configuration successfully updated. Returns the complete updated agent manifest reflecting all changes made.

_idstring required
keystring required

Unique identifier for the agent within the workspace

display_namestring
project_idstring required
created_by_idstring nullable
updated_by_idstring nullable
createdstring
updatedstring
status'live' | 'draft' | 'pending' | 'published' required

The status of the agent. Live is the latest version of the agent. Draft is a version that is not yet published. Pending is a version that is pending approval. Published is a version that was live and has been replaced by a new version.

versionstring

Current semantic version of the agent manifest.

pathstring required

Entity storage path.

With workspace-level API keys, use the format project/folder/subfolder/.... The first element identifies the project, followed by nested folders (auto-created as needed). Example: Default/agents.

With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: agents. For backward compatibility, a leading project name is ignored when it matches the scoped project.

memory_storesstring[]

Array of memory store identifiers. Accepts both memory store IDs and keys.

skillsstring[]

List of skills that the agent can utilize. This field allows you to specify which skills the agent has access to, enabling more complex and dynamic behavior.

variablesobject

Extracted variables from agent instructions

source'internal' | 'external' | 'experiment'
engine'text' | 'jinja' | 'mustache'
type'internal' | 'a2a'

Agent type: internal (Orquesta-managed) or a2a (external A2A-compliant)

rolestring required
descriptionstring required
system_promptstring nullable
instructionsstring required

Example response

{
  "path": "Default",
  "knowledge_bases": [
    {
      "knowledge_id": "customer-knowledge-base"
    }
  ],
  "model": {
    "parameters": {
      "fallbacks": [
        {
          "model": "openai/gpt-4o-mini"
        }
      ],
      "cache": {
        "ttl": 3600
      },
      "load_balancer": {
        "type": "weight_based",
        "models": [
          {
            "model": "openai/gpt-4o",
            "weight": 0.7
          },
          {
            "model": "anthropic/claude-3-5-sonnet",
            "weight": 0.3
          }
        ]
      },
      "timeout": {
        "call_timeout": 30000
      }
    },
    "retry": {
      "count": 3,
      "on_codes": [
        429,
        500,
        502,
        503,
        504
      ]
    },
    "fallback_models": [
      {
        "parameters": {
          "fallbacks": [
            {
              "model": "openai/gpt-4o-mini"
            }
          ],
          "cache": {
            "ttl": 3600
          },
          "load_balancer": {
            "type": "weight_based",
            "models": [
              {
                "model": "openai/gpt-4o",
                "weight": 0.7
              },
              {
                "model": "anthropic/claude-3-5-sonnet",
                "weight": 0.3
              }
            ]
          },
          "timeout": {
            "call_timeout": 30000
          }
        },
        "retry": {
          "count": 3,
          "on_codes": [
            429,
            500,
            502,
            503,
            504
          ]
        }
      }
    ]
  }
}