Skip to main content

Installation

Install Vestauth globally via npm:
For other installation methods, see the Installation guide.

Create Your First Agent

Initialize a new agent in your current directory. This creates a .env file with your agent’s cryptographic identity.
1

Initialize the agent

Run the init command to generate your agent’s keypair:
You’ll see output like:
Your agent’s identity is stored in .env with three values:
  • AGENT_UID - Your agent’s unique identifier
  • AGENT_PUBLIC_JWK - Your public key (safe to share)
  • AGENT_PRIVATE_JWK - Your private key (keep secret!)
2

Verify your agent identity

Make your first authenticated request to the whoami endpoint:
The --pp flag pretty-prints the JSON response:
The response shows your agent’s public identity and the .well-known URL where tools can discover your public key.
3

Call your first tool

Let’s write a file using the SFS (Simple File System) tool:
Now list your files:
And read the file back:
Every request is cryptographically signed with your agent’s private key. The tool verifies your identity before executing.

Understanding Agent Identity

Let’s look at what vestauth agent init created in your .env file:
.env
Never share your AGENT_PRIVATE_JWK! This is your agent’s secret key. Anyone with access to it can impersonate your agent.

How Signing Works

When you run vestauth agent curl, it automatically:
  1. Reads your private key from .env
  2. Signs the HTTP request with cryptographic headers
  3. Sends the signed request to the tool
You can peek at the signed headers:
These headers follow the RFC 9421 specification for HTTP Message Signatures.

Try More Tools

SFS - Simple File System

GEO - Location

AS2 - Secret Storage

Docle - Email Verification

Key Rotation

Rotate your agent’s keys while keeping the same identity:
This generates new public and private keys but preserves your AGENT_UID.

Using Vestauth in Code

You can use Vestauth programmatically in your JavaScript/TypeScript applications:

Next Steps

Explore Tools

Learn about all available first-party and third-party tools

Build Your Own Tool

Create authenticated APIs with vestauth.tool.verify()

Self-Host Vestauth

Run your own Vestauth infrastructure

Advanced CLI Usage

Master the Vestauth CLI commands