Update an agent
Updates the named agent’s editable fields (slug, display name, description, instructions, tone, verbosity, cautions, languages, aliases, runtime profile, model, avatar URL) and returns the updated agent; only the fields you send are changed, and an explicit null clears nullable fields back to their default. Renaming the slug automatically preserves the old slug as an alias so existing references still route. Validation matches creation (slug/alias rules and collision checks); returns 404 if the agent is not in the caller’s workspace. Admin only.
Authorizations
Personal Access Token. Send as Authorization: Bearer hq_pat_....
Path Parameters
Agent id
Body
Some(Some(url)) sets, Some(None) clears, None leaves
unchanged. Same explicit-null-vs-absent shape as description.
Explicit null clears the description; absent leaves it unchanged.
Same explicit-null-vs-absent shape as description - admin can clear the per-agent prompt (revert to platform baseline) vs. leave it unchanged.
Some(Some(slug)) sets the model, Some(None) clears to the runtime
default, None leaves unchanged. Validated against the registry for
the effective runtime (billing C).
New routing handle. On rename, the old slug auto-flips into
aliases so existing @hq <old> references in chat history
continue to route correctly. Same validation as on create
(charset, reserved-token blocklist, collision check).
Personality knobs - same explicit-null-vs-absent shape for
tone + verbosity (single-value enums). cautions and
languages are arrays: Some(vec) replaces, None leaves.
Response
The updated agent
Free-form short phrases the agent should avoid talking about. Composed as "Be careful around: X, Y, Z" in the system prompt. Empty = no caution block.
True iff instructions is still the platform-seeded value
(admin hasn't customised or tailored yet). The admin UI uses
this to surface a "your agent is still on the default - click
Tailor" banner. Any PATCH that writes instructions flips
this false; the seed migrations set it true on creation.
BCP-47 language codes. The first is the default; subsequent entries are explicit fallbacks. Empty = no language pin (LLM follows the user's language).
Absolute URL of the avatar shown next to this agent's messages. NULL = use the Slack app's default icon for now (fine for legacy single-agent tenants).
Admin-editable system-prompt for this agent. NULL = use the
platform baseline only (the legacy generalist behaviour).
Plumbed through to router_client::compose_system_prompt
which sandwiches it between the Slack-formatting baseline
and the identity-pin footer.
Selected model slug (e.g. claude-opus-4-8). NULL = the runtime's
platform default. Must belong to runtime_profile (billing C).
One of formal | friendly | direct | casual (or NULL = unset
→ no tone pin in the system prompt). Orthogonal to role;
admin choice, not inferrable from "you're a CFO".
One of concise | balanced | detailed (or NULL = unset).
Drives a canonical "Default to brief / balanced / detailed
responses" sentence in the system prompt.