Set agent incognito
Set whether every new task on a custom agent must run incognito. The caller needs update access on the agent.
Enabling (enforced: true) requires Enterprise and the Incognito agents role permission (organization:enforce_agent_incognito), separate from the Incognito tasks permission. Disabling requires only update access, including after a downgrade.
Existing sessions keep their original mode. Incognito does not save message content for history or search, but task metadata and temporary message caches can remain.
Returns the full updated agent, including agent.incognito.enforced. Generic PATCH /agents/{agent_id} rejects top-level incognito with 400 invalid_request.
Authorizations
Path Parameters
ID of a custom agent. Platform agents are not customizable.
Body
Enable or disable incognito enforcement for new tasks.
true
Response
The full updated agent. The example focuses on incognito fields; other agent fields are omitted for readability.
An agent and its whole configuration. Single-agent retrieve, create and update return this shape; the list endpoint does not populate the inlined collections, abilities or version. Collection-specific writes return their own result shapes.