System requirements
- TypeScript/JavaScript
- Python
- Node.js: 18.0.0 or higher
- Package manager: npm, yarn, or pnpm
- TypeScript (optional): 5.3.0 or higher
Install the SDK
- npm
- yarn
- pnpm
- pip
Initialize your project
Runveto init to create the Veto configuration structure in your project:
Directory structure explained
veto.config.yaml
Main configuration file. Defines validation mode, logging level, and rule directories.
rules/ directory
Contains YAML rule files. You can organize rules by domain (e.g.,
financial.yaml, devops.yaml, security.yaml).Initialize options
You can customize the initialization with flags:Force overwrite
Overwrite existing Veto configuration:Use a policy pack
Start with a built-in policy pack:Policy packs are pre-configured rule sets for common use cases. You can customize them after initialization.
Specify directory
Initialize in a specific directory:Verify installation
Check that Veto is installed correctly:- TypeScript
- Python
Create a test file Run it:
test-veto.ts:CLI commands
The Veto CLI provides interactive and headless commands:Interactive Studio
Launch the full-screen terminal UI:Policy generation
Generate policy YAML from natural language:Guard check
Test a tool call against your rules:Coverage scan
Check which tools have rules:Policy diff
Compare policy versions:See the CLI reference for the complete list of commands and options.
Docker installation
Run Veto in a containerized environment:Environment variables
Veto uses environment variables for configuration:| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY | OpenAI API key for semantic validation | No |
ANTHROPIC_API_KEY | Anthropic API key for semantic validation | No |
GEMINI_API_KEY / GOOGLE_API_KEY | Google Gemini API key | No |
VETO_API_KEY | Veto Cloud API key | No |
VETO_PROJECT_ID | Veto Cloud project ID | No |
VETO_CONFIG_PATH | Custom path to veto.config.yaml | No |
VETO_MODE | Override mode from config (strict / log) | No |
Update Veto
Keep Veto up to date:- npm
- pip
Troubleshooting
Veto.init() throws 'No veto directory found'
Veto.init() throws 'No veto directory found'
Make sure you’ve run
veto init in your project root. Veto looks for ./veto/veto.config.yaml relative to your current working directory.You can specify a custom path:Module not found errors (TypeScript)
Module not found errors (TypeScript)
Ensure your Veto uses ESM imports. If using Node.js, add
tsconfig.json has:"type": "module" to your package.json.Python import errors
Python import errors
Make sure you’re using Python 3.10 or higher:If you’re using virtual environments, ensure Veto is installed in the active environment:
Rules not loading
Rules not loading
Check your Verify your rule files are valid YAML:
veto.config.yaml:Next steps
Quickstart
Build your first guarded agent in 5 minutes
Configuration
Deep dive into veto.config.yaml options
Writing rules
Learn the rule YAML syntax
Examples
Real-world integrations with popular frameworks

