Skip to content
Workforce IdentityMarkdown

Let users remove agents

Each user's AI agents page lists the agents allowed to act for them, and removing one ends its access in their name at once.

Dashboard and APIRFC 8693, RFC 7009

Users stay in control of which agents act for them, without asking a realm administrator. On their AI Agents page they see each agent allowed to act for them, with what it may do and until when, and stop any of them. There’s nothing for you to set: the page is in the dashboard for every user.

Before you start:

  • Who can do it: any signed-in user, for agents acting for them. A realm administrator can do it for any user (see As a realm administrator).
  • Where: the user’s own AI Agents page in the dashboard, or the API with their own session.
  • What you need: an agent has been allowed to act for the user (see Let an agent act for a user).
  1. The user opens AI Agents in the dashboard. In the API, with the user’s own session in $CVYUH_SESSION (Call the API):

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/am/me/v1/oauth2/agents \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"
  2. They choose Stop on the agent. In the API, name it by the agent id the list answered:

    Terminal window
    curl -X DELETE https://foobar.cvyuh.com/api/v0/am/me/v1/oauth2/agents/6f1c2a9e-4b7d-4e3a-9c51-2d8f0b7a1e44 \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    The realm answers 204.

  • Its tokens in the user’s name stop at once: at the realm, at introspection and at every gateway, impersonation tokens included.
  • The delegation is deleted, so no new token in the user’s name is issued to that agent.
  • The agent’s own access is untouched. Tokens on its own account still work; to stop the agent itself, see Stop an agent.

The removal is on the user’s trail as AGENT_TAKEN_BACK.

You remove a delegation by deleting the agent’s actsFor link to the user:

Terminal window
curl -X DELETE https://foobar.cvyuh.com/api/v0/am/objects/v1/agent/invoice-agent/relationships/actsFor/maya \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

A removed delegation is deleted. To let the agent act for the user again, a realm administrator writes a new actsFor link, as in Let an agent act for a user.