On this page

Agents

update-agent

Can be held for approval

Change an agent. A partial update: only the fields present in agent change, every omitted field is left as it was. Needs the fabric:orchestrate.write grant.

curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"update-agent","arguments":{"agent_id":"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc","agent":{"prompt":{"template":"Reply with READY.","display_template":"Reply with READY."},"role_description":"probe role"}}}}'
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000178\",\"result\":{\"agent_id\":\"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc\",\"updated\":[\"prompt\",\"role_description\"]}}"
    }
  ],
  "isError": false
}

Parameters

ParameterTypeRequiredNotes
agentobjectRequiredThe fields to change. Must hold at least one editable key; an empty object is refused with 'agent' must include at least one field to update. Any key outside the editable set, including description, name or type, is refused before the call runs, and the refusal lists the set. The keys are listed under Editable keys of agent.
agent_idstringRequiredAgent id from list-agents or create-agent, in full, including the part before the dot. An agent in this project.
Errors
  • UpstreamError (5xx): a prompt passed as a string surfaces here rather than as a ValidationError, because the gateway does not check the shape of that argument.
Show full response

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
}
More details

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.

Editable keys of agent

Only these keys are accepted.

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.

Every tool call works the same way: How every tool call works.