Skip to main content

Overview

Agent commands let you create cryptographic identities and use them to call authenticated tools.

agent init

Create a new agent identity with a public/private keypair.
Output:

Options

string
default:"api.vestauth.com"
Override the agent API hostname. Defaults to AGENT_HOSTNAME environment variable, then api.vestauth.com.When no scheme is provided, https:// is assumed. For local non-TLS endpoints, pass http://... explicitly.

Examples

Generated Files

Creates a .env file with:
Never share your AGENT_PRIVATE_JWK. This is used to sign requests and proves your identity.

agent curl

Run curl as an authenticated agent. Automatically signs requests with your agent identity.
Example:
Output:

Options

string
default:"web-bot-auth"
Signature tag value. Standard value is web-bot-auth.
string
Custom nonce value. By default, a cryptographically random nonce is generated for each request.
boolean
Pretty-print JSON output with indentation.Alias: --pretty-print

Examples

How It Works

agent curl wraps the standard curl command and automatically injects signed headers:
  • Signature: The cryptographic signature
  • Signature-Input: Signature metadata (created, expires, keyid, algorithm, nonce)
  • Signature-Agent: Agent identity and discovery URL
  • Content-Type: application/json (when not specified)
  • Request method defaults to POST (when not specified)
All other curl options work normally.

agent headers

Generate signed headers for a request without making the request. Useful for debugging or integrating with other HTTP clients.
Example:
Output:

Arguments

string
required
HTTP method: GET, POST, PUT, DELETE, etc.
string
required
Full URI including scheme and authority (e.g., https://api.vestauth.com/whoami)

Options

string
Override agent UID. Defaults to AGENT_UID or AGENT_ID environment variable.Alias: --id
string
Override private JWK for signing. Defaults to AGENT_PRIVATE_JWK environment variable.Must be a valid JSON Web Key in Ed25519 format.
string
default:"web-bot-auth"
Signature tag value.
string
Custom nonce value. By default, a cryptographically random nonce is generated.
boolean
Pretty-print JSON output.Alias: --pretty-print

Examples


agent rotate

Rotate your agent’s keypair. Generates new AGENT_PRIVATE_JWK and AGENT_PUBLIC_JWK while keeping the same AGENT_UID.
Output:

Options

string
Agent UID to rotate keys for. Defaults to AGENT_UID or AGENT_ID environment variable.Alias: --id
string
Current private JWK (used for signing the rotation request). Defaults to AGENT_PRIVATE_JWK.
string
Agent API hostname for rotation request.
string
default:"web-bot-auth"
Signature tag value.
string
Custom nonce value.
boolean
Pretty-print output.Alias: --pretty-print

Use Cases

  • Security best practice: Rotate keys regularly
  • Key compromise: Immediately rotate if private key is leaked
  • Key migration: Update to new cryptographic parameters

What Happens

  1. Generates new Ed25519 keypair
  2. Signs rotation request with current private key
  3. Updates .env file with new keys
  4. Keeps same AGENT_UID
Tools can cache public keys, so it may take time for the rotation to propagate. The old key should be considered invalid immediately.

Environment Variables

Agent commands read these environment variables from .env: