@openleash/server
v0.3.0
Published
HTTP server for openleash
Readme
@openleash/server
HTTP server for OpenLeash — local-first authorization and proof sidecar for AI agents.
What's included
- Fastify HTTP server on
127.0.0.1:8787 - Authorization endpoint —
POST /v1/authorize - Proof verification —
POST /v1/verify-proof - Agent registration —
POST /v1/agents/register - Admin API — owner management, policy upsert, audit log retrieval
- Middleware — agent signature verification, admin auth, request validation
- Bootstrap — automatic
./data/directory and config initialization
Installation
npm install @openleash/serverUsage
This package is used internally by @openleash/cli. To run the server, use the CLI:
npx openleash startFor agent-side integration, use @openleash/sdk-ts.
API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | /v1/health | Health check |
| GET | /v1/public-keys | Retrieve server public keys |
| POST | /v1/authorize | Request authorization decision |
| POST | /v1/verify-proof | Verify a proof token |
| POST | /v1/agents/registration-challenge | Request registration challenge |
| POST | /v1/agents/register | Register a new agent |
| POST | /v1/admin/owners | Create owner (admin) |
| POST | /v1/admin/policies | Upsert policy (admin) |
| GET | /v1/admin/audit | Retrieve audit log (admin) |
Documentation
See the OpenLeash README for full documentation.
