Skip to main content
client.agentVault().sessions.revoke() revokes a session. Revoke a session when its agent finishes, even if the agent fails. The proxy stops attaching credentials to the session’s requests within one poll interval. If the agent can run longer than the client’s access token lasts, log in again before you revoke the session, because the SDK doesn’t renew the access token on its own. Set ttl close to how long the agent runs, so that the session expires soon after the agent finishes even if revoking the session fails.

Parameters

string
required
The ID of the session.

Returns

Omit<AgentVaultSession, "accessBundle" | "services">
The revoked session, without its access bundle and inline services (call get for them).