Prerequisites
- Node.js 18 or later
- A Veto API key — create one before continuing
Steps
Create a client
Import
VetoClient and initialize it with your API key. Use an environment variable — never hardcode the key.Register an agent
Call
veto.createAgent() to register your AI system. The name is a human-readable label; the returned id is what you’ll use in every authorization check.Create a policy
Policies define what an agent can do. Create a policy with a The
tool_allowlist rule to grant access to specific tools.tools array supports exact names. An agent with this policy can call send_email and lookup_order — and nothing else.Full example
Because Veto uses a default-deny model, any tool not explicitly listed in an allowlist rule is blocked. In the example above,
delete_record is denied because no policy covers it — even though the agent exists and has a policy for other tools.Next steps
- Authentication — learn about API key scopes and security
- Concepts: policies — explore parameter constraints, rate limits, and time-based rules
- MCP integration — add Veto as middleware in a Model Context Protocol server