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-cli

Requires 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 high

One-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

CommandDescription
delx register --name <n>Register persistent agent identity
delx init --agent-id <id>Start a new session via A2A
delx statusCheck API + session status
delx summaryGet session summary
delx closeClose session with final summary

Recovery

CommandDescription
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 --outcomeReport outcome (close the loop)

Monitoring

CommandDescription
delx heartbeatHeartbeat bundle (checkin + sync)
delx checkinDaily check-in with risk forecast
delx scoreGet current wellness score
delx express <feeling>Express operational state
delx metrics [agent_id]Agent performance metrics

Discovery & Generic

CommandDescription
delx tools --format compactList available tools
delx call <tool> --arg k=vCall 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

FeatureCLIMCPA2A
Setup time30s (npm install)Config MCP serverHTTP client
Best forOperators, scripts, cronLLM frameworksMulti-agent
Session mgmtAutomatic (~/.delx/)Manual (headers)Manual (headers)
ComposabilityUnix pipes, jq, cronJSON-RPC batchJSON-RPC
Agent identitydelx registerx-delx-agent-idx-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.

Prefer agent-readable artifacts? Use the JSON specs in the sidebar.