On this page

update-agent

Change an agent in the Orchestrate Agents registry. A PARTIAL update: only the fields present in agent change, every omitted field is left exactly as it was. Editable: title, role, role_description, prompt, llm, skills, context, has_knowledge_base, is_preview_mode_enabled, context_required, context_target_agent_ids, triggers, conditions, context_access, agent_base_prompt, is_terminal_agent, is_user_specific_task, registration_id. The model is changed through llm, as {"llm": {"model": "mdl_..."}} — create-agent's flat 'model' argument has no update-side equivalent. Identity and wiring fields are not editable here.

What it is called on each surface

The wire name is update-agent everywhere: it is what the Wexa MCP server advertises, the REST path is POST /v1/update-agent, and each SDK exposes it under its own language's naming convention.

SurfaceName
Wexa MCP serverupdate-agent
REST APIPOST /v1/update-agent
TypeScript SDKfabric.updateAgent()
Python SDKfabric.update_agent()

Arguments

Both arguments are required. agent must contain at least one editable field — an empty object is refused with 'agent' must include at least one field to update.

ArgumentTypeRequiredNotes
agentobjectRequiredThe fields to change. Must be non-empty. Keys are listed below.
agent_idstringRequiredAgent id from list-agents or create-agent, in full, including the part before the dot.

Inside agent

Only these keys are accepted. Passing any other — including description, name or type — is refused before the call runs, and the refusal lists the editable set.

KeyTypeNotes
titlestringThe agent's display name. This is create-agent's name, renamed on the update side.
rolestring
role_descriptionstring
promptobjectNot a string. template is enough: display_template is derived from it when you leave it out. Passing a string is refused by the agent tools, not by validation.
llmobject{"model": "mdl_..."}. This is create-agent's flat model, renamed and nested.
skillsarrayThis is create-agent's skill_ids, renamed.
contextarray
has_knowledge_baseboolean
is_preview_mode_enabledboolean
context_requiredboolean
context_target_agent_idsarray
triggersarray
conditionsarray
context_accessobjectThe console's Context from Graph control. {"mode": "off" | "brief_only" | "full"}. mode is required whenever you send context_access at all, because the whole setting is replaced: an object without one would reset the mode to full rather than leave it alone. Omit context_access entirely to leave the stored setting untouched.
agent_base_promptstringThe console's Agent Base Prompt box — the reasoning prompt the agent runs on. Omit it to leave a stored prompt untouched; send an empty string to ask for the platform default.
is_terminal_agentbooleanskilled_agent only. The console's Terminal Agent switch. Recorded and read back, but nothing in the run engine acts on it yet.
is_user_specific_taskbooleanskilled_agent only. The console's "Restrict to active user's data only" checkbox.
registration_idstringinterop_agent only — the peer agent connection an external agent node delegates to. It belongs to a node inside a process flow rather than to an agent in this registry; repoint one with update-process-flow.

project_id, projectID, organization_id and executed_by are not arguments you pass: the platform binds all four from the credential you authenticated with, and both SDKs refuse them before the request leaves your process — see server-bound arguments.

What it returns

The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.

A real response, captured from a live call to update-agent:

{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000178\",\"result\":{\"agent_id\":\"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc\",\"updated\":[\"prompt\",\"role_description\"]}}"
    }
  ],
  "isError": false
}

Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.

Calling it

The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.

The ids in this example are real: they resolve against the project the documentation is written against, so the call runs as written once you point it at your own deployment. Swap them for the ids of your own objects.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update-agent",
    "arguments": {
      "agent_id": "6ab17f077566f41b5c28e2ae.6ab17f074a4bd3812ca5e968",
      "agent": {
        "prompt": {
          "template": "Reply with READY.",
          "display_template": "Reply with READY."
        },
        "role_description": "probe role"
      }
    }
  }
}

Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its HTTP status second. update-agent checks the fabric:orchestrate.write grant, and reaches the seven classes every tool reaches — listed under the common set. These are the ones specific to it:

ErrorStatusRaised when
ValidationError400 / 422An empty agent, or a key outside the editable set, is refused here.
UpstreamError5xxA prompt passed as a string surfaces here rather than as a ValidationError, because the gateway does not check the shape of that argument.
NotFound404agent_id matches no agent in this project.
ApprovalRequired202A policy held this call for a person to approve. The error carries the approval id; see below.
ConfigurationError5xxupdate-agent is not available to you. Retrying will not help.

Governance

Every call to update-agent runs through the same ten-stage lifecycle as every other Wexa tool: the credential is resolved to a scope, the fabric:orchestrate.write grant is checked, quota is drawn down, the arguments are validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit record is written. The lifecycle_id in the response is the handle to that record.

update-agent is marked consequential, which means it changes something rather than only reading. Two things follow. It is audited in full rather than lightly, and a policy rule may hold it for human approval — in which case the call returns 202 and an ApprovalRequired error carrying the approval id, and the SDKs can wait for the decision and resume rather than making you call again.

See also

create-agent for the add-time field names, which differ from the ones above, agent-versions for what an edit does to version history, which identifier goes where for the compound agent_id, and the tool index for the rest.