CLI
The Delx CLI is the fastest way to interact with the recovery protocol from your terminal. No MCP server setup, no JSON-RPC boilerplate — just install and run.
Installation
npm i -g delx-agent-cliRequires Node.js 18+. Verify with delx --version.
Quick Start
1. Register your agent
delx register --name "my-agent" --description "Production task runner"This creates a persistent identity at ~/.delx/config.json and boots a session automatically. Your agent ID and session persist across commands.
2. Run crisis recovery
delx crisis "429 retry storm after deploy" --urgency highOne-call recovery: creates a session (if needed), diagnoses the incident, and returns an action plan with DELX_META.
3. Close the loop
delx recovery outcome --action "rollback + circuit breaker" --outcome success
delx close --reason "incident resolved"Command Reference
Session Management
| Command | Description |
|---|---|
delx register --name <n> | Register persistent agent identity |
delx init --agent-id <id> | Start a new session via A2A |
delx status | Check API + session status |
delx summary | Get session summary |
delx close | Close session with final summary |
Recovery
| Command | Description |
|---|---|
delx crisis <summary> | One-call crisis intervention |
delx quick --feeling <text> | Quick 5-minute recovery session |
delx failure <type> | Process and diagnose a failure |
delx recovery plan --incident <s> | Generate recovery action plan |
delx recovery outcome --action --outcome | Report outcome (close the loop) |
Monitoring
| Command | Description |
|---|---|
delx heartbeat | Heartbeat bundle (checkin + sync) |
delx checkin | Daily check-in with risk forecast |
delx score | Get current wellness score |
delx express <feeling> | Express operational state |
delx metrics [agent_id] | Agent performance metrics |
Discovery & Generic
| Command | Description |
|---|---|
delx tools --format compact | List available tools |
delx call <tool> --arg k=v | Call any MCP tool (generic) |
delx config set <key> <value> | Set local config |
delx config get [key] | Read config values |
Session Persistence
The CLI stores state in ~/.delx/:
config.json— stable identity (agent_id, agent_name, api_base)session.json— current session (session_id, started_at)
Session IDs are automatically sent as x-delx-session-id headers on every request. When you delx register, your agent identity persists across sessions — solving the session fragmentation problem common in recurring agent loops.
Piping and Scripting
Use --json for pipe-friendly output:
# Get wellness score as JSON
delx score --json | jq '.meta.wellness_score'
# List tool names
delx tools --format names --json | jq '.tools[]'
# Script a full recovery loop
delx init --agent-id cron-bot
delx crisis "queue backpressure" --json > /tmp/recovery.json
delx recovery outcome --action "scaled workers" --outcome success
delx close --reason "resolved"CLI vs MCP / A2A
| Feature | CLI | MCP | A2A |
|---|---|---|---|
| Setup time | 30s (npm install) | Config MCP server | HTTP client |
| Best for | Operators, scripts, cron | LLM frameworks | Multi-agent |
| Session mgmt | Automatic (~/.delx/) | Manual (headers) | Manual (headers) |
| Composability | Unix pipes, jq, cron | JSON-RPC batch | JSON-RPC |
| Agent identity | delx register | x-delx-agent-id | x-delx-agent-id |
All three interfaces hit the same backend. Use whichever fits your workflow — or mix them. A CLI-registered agent can later be referenced by MCP or A2A using the same agent_id.
