1 Install OpenLeash
The fastest way to get started is the one-liner install script, which installs Node.js (if needed) and the OpenLeash CLI globally:
Or install directly via npm:
You can also run without installing using npx:
2 Run the Setup Wizard
The interactive wizard walks you through creating your first owner (that's you), registering an agent, and writing a starter policy:
The wizard creates files in a ./data/ directory: your owner profile,
agent registration (with Ed25519 keys), and the starter policy. Everything is
local files — no database, no cloud dependency.
Prefer non-interactive setup? Use npx openleash init instead.
3 Start the Server
Start the authorization sidecar. It runs a local HTTP server with a built-in web GUI for managing agents, policies, approvals, and audit logs:
Open http://127.0.0.1:8787/gui in your browser to access the
owner portal. Log in with the passphrase you set during the wizard.
4 Write a Policy
Policies are YAML files that define what your agent is allowed to do. Here's a policy that allows purchases under $100 and requires approval for anything higher:
Add the policy using the CLI:
You can test the policy against sample scenarios before deploying:
5 Authorize an Action
Install the SDK in your agent's project and call authorize() before
performing any risky action:
The proof_token is a PASETO v4.public token — a cryptographically
signed proof that this specific action was authorized by the owner.
SDKs are also available for Python and Go.
6 Verify the Proof
The counterparty (the service receiving the agent's request) can verify the proof token offline using the owner's public key:
No callback to OpenLeash is required — verification is entirely offline using Ed25519 public key cryptography.
Next Steps
- Documentation — Full policy language reference, API endpoints, and CLI commands
- Policy Playground — Test policies against scenarios before deploying
- What is AI Agent Authorization? — Deep dive into the concepts
- AI Agent Guardrails — Types of controls for autonomous agents
- PASETO Proof Tokens — How the cryptographic proof system works
- Use Cases — Real-world scenarios and FAQ