Set agent incognito
Set whether every new task on a custom agent must run incognito. The caller needs update access on the agent.
PATCH
cURL
Who can turn enforcement on, and what happens to existing sessions?
Who can turn enforcement on, and what happens to existing sessions?
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
A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.
Body
application/json
Response
The full updated agent. The example focuses on incognito fields; other agent fields are omitted for readability.