update-agent
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
| Parameter | Type | Required | Notes |
|---|---|---|---|
agent | object | Required | The 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_id | string | Required | Agent id from list-agents or create-agent, in full, including the part before the dot. An agent in this project. |
Errors
UpstreamError(5xx): apromptpassed as a string surfaces here rather than as aValidationError, 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.
| Key | Type | Notes |
|---|---|---|
title | string | The agent's display name. This is create-agent's name, renamed on the update side. |
role | string | |
role_description | string | |
prompt | object | Not 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. |
llm | object | {"model": "mdl_..."}. This is create-agent's flat model, renamed and nested. |
skills | array | This is create-agent's skill_ids, renamed. |
context | array | |
has_knowledge_base | boolean | |
is_preview_mode_enabled | boolean | |
context_required | boolean | |
context_target_agent_ids | array | |
triggers | array | |
conditions | array | |
context_access | object | The 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_prompt | string | The 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_agent | boolean | skilled_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_task | boolean | skilled_agent only. The console's "Restrict to active user's data only" checkbox. |
registration_id | string | interop_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.