A headless CLI client for the Agent Client Protocol (ACP), enabling AI agents and orchestrators to communicate with coding agents via structured protocol commands instead of PTY scraping. Current stable version: 0.5.3 (alpha). Released frequently with breaking changes expected until stabilization. Supports persistent multi-turn sessions, named sessions, prompt queueing, cooperative cancellation, soft-close lifecycle, crash reconnect, fire-and-forget mode, config files, session inspect/history, and experimental TypeScript-based workflows. Key differentiator: agent-to-agent communication over CLI without ANSI parsing, with compatibility for multiple ACP-compatible agents (Codex, Claude, OpenClaw ACP). Requires Node.js >=22.12.0.
npm install acpxVerified import paths — ran on the pinned version, not inferred.
Demonstrates creating a persistent session, sending prompts, named sessions for parallel work, fire-and-forget mode, and soft-close lifecycle.
Pin exact version in package.json and monitor changelog for breaking changes.
Wrap flow definitions with defineFlow().
Use the fully qualified agent name or check adapter registry with acpx config.
Upgrade Node.js to v22.12.0 or higher.
Call session.delete() instead of session.close() to remove persisted history.
Use with caution; follow the runtime embedding API changes in changelog.
Replace 'const acpx = require("acpx")' with 'import acpx from "acpx"' in an ESM context, or use dynamic import: `const acpx = await import('acpx')`.Switch to ESM by adding 'type': 'module' in package.json or use dynamic import.
Wrap your flow object with `defineFlow(flow)` from 'acpx/runtime'.
Check available agents with `acpx config show` or provide full path via --agent option.