Skip to main content
An agent is the identity Veto uses to look up policies and make authorization decisions. Before Veto can authorize any tool call, the system making that call must be registered as an agent.

What an agent is

An agent represents a single AI system, bot, or automated process — for example, a customer support bot, a code review assistant, or a data pipeline worker. When you register an agent, Veto assigns it a unique ID. You pass that ID to every authorize() call so Veto knows which policies apply.

Agent fields

FieldTypeDescription
idstring (UUID)Unique identifier for the agent. Pass this to authorize().
namestringHuman-readable name for the agent.
descriptionstring | nullOptional description of the agent’s purpose.
statusAgentStatusCurrent status of the agent. See below.
createdAtstringISO 8601 timestamp of when the agent was created.
updatedAtstringISO 8601 timestamp of the last update.

Agent status

The status field controls whether Veto processes authorization requests for an agent.
StatusBehavior
activeThe agent is operational. Authorization requests are evaluated against its policies.
suspendedThe agent is temporarily blocked. All authorization requests are denied.
revokedThe agent is permanently blocked. All authorization requests are denied.
Use suspended for temporary holds — for example, when investigating unusual activity. Use revoked when an agent should never be authorized again.

Managing agents with the SDK

Create an agent

const agent = await veto.createAgent({
  name: "support-bot",
  description: "Customer support agent",
});

console.log(agent.id); // "a1b2c3d4-..."

List all agents

const agents = await veto.listAgents();

Get a specific agent

const agent = await veto.getAgent("agent-uuid");

Delete an agent

await veto.deleteAgent("agent-uuid");
Deleting an agent is permanent. It cascades and removes all policies and audit log entries associated with that agent.

Using the agent ID in authorization

The id returned when you create an agent is the value you pass to veto.authorize():
const result = await veto.authorize(agent.id, "file.read", { path: "/home/user/doc.txt" });
Store the agent ID wherever you initialize your AI system so it’s available at authorization time.