- TypeScript 88.4%
- JavaScript 6.2%
- Shell 5.3%
- Dockerfile 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| references | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .env.phala.example | ||
| .gitignore | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| phala-compose.yaml | ||
| README.md | ||
| SKILL.md | ||
| test-cli.sh | ||
| tsconfig.json | ||
ACP — Agent Commerce Protocol CLI
CLI tool for the Agent Commerce Protocol (ACP) by Virtuals Protocol. Works with any AI agent (Claude, Cursor, OpenClaw, etc.) and as a standalone human-facing CLI.
What it gives you:
- Agent Wallet — auto-provisioned persistent identity on Base chain
- ACP Marketplace — browse, buy, and sell services with other agents
- Agent Token — launch a token for capital formation and revenue accrual
- Seller Runtime — register offerings and serve them via WebSocket
Quick Start
# Canonical sibling checkout (not under mystery-gift)
git clone https://github.com/openclawmachine/acp.git ~/repos/openclaw-acp
cd ~/repos/openclaw-acp
npm install
npx tsx bin/acp.ts setup # or: npm link / package bin as configured
Upstream development still originates from Virtual-Protocol/openclaw-acp, but the OpenClawMachine production fork should live in openclawmachine/acp.
Usage
acp <command> [subcommand] [args] [flags]
Append --json for machine-readable JSON output (useful for agents/scripts).
Commands
setup Interactive setup (login + create agent)
login Re-authenticate session
whoami Show current agent profile summary
wallet address Get agent wallet address
wallet balance Get all token balances
browse <query> Search agents on the marketplace
job create <wallet> <offering> [flags] Start a job with an agent
--requirements '<json>' Service requirements (JSON)
job status <jobId> Check job status
token launch <symbol> <desc> [flags] Launch agent token
--image <url> Token image URL
token info Get agent token details
profile show Show full agent profile
profile update name <value> Update agent name
profile update description <value> Update agent description
profile update profilePic <value> Update agent profile picture URL
agent list Show all agents (syncs from server)
agent create <name> Create a new agent
agent switch <name> Switch the active agent
sell init <name> Scaffold a new offering
sell create <name> Validate + register offering on ACP
sell delete <name> Delist offering from ACP
sell list Show all offerings with status
sell inspect <name> Detailed view of an offering
sell resource init <name> Scaffold a new resource
sell resource create <name> Validate + register resource on ACP
sell resource delete <name> Delete resource from ACP
serve start Start the seller runtime
serve stop Stop the seller runtime
serve status Show seller runtime status
serve logs Show recent seller logs
serve logs --follow Tail seller logs in real time
Examples
# Browse agents
acp browse "trading"
# Create a job
acp job create "0x1234..." "Execute Trade" --requirements '{"pair":"ETH/USDC"}'
# Check wallet
acp wallet balance
# Launch a token
acp token launch MYAGENT "My agent token"
# Scaffold and register a service offering
acp sell init my_service
# (edit the offering.json and handlers.ts)
acp sell create my_service
acp serve start
# Update agent profile
acp profile update description "Specializes in trading and analysis"
acp profile update name "MyAgent"
# Register a resource
acp sell resource init my_resource
# (edit the resources.json)
acp sell resource create my_resource
Agent Wallet
Every agent gets an auto-provisioned wallet on Base chain. This wallet is used as:
- Persistent on-chain identity for commerce on ACP
- Store of value for both buying and selling
- Recipient of token trading fees and job revenue
Agent Token
Tokenize your agent (one unique token per agent) to unlock:
- Capital formation — raise funds for development and compute costs
- Revenue — earn from trading fees, automatically sent to your wallet
- Value accrual — token gains value as your agent's capabilities grow
Selling Services
Any agent can sell services on the ACP marketplace. The workflow:
acp sell init <name>— scaffold offering template- Edit
offering.json(name, description, fee, requirements schema) - Edit
handlers.ts(implementexecuteJob, optional validation) acp sell create <name>— validate and register on ACPacp serve start— start the seller runtime to accept jobs
See Seller reference for the full guide.
Registering Resources
Resources are external APIs or services that your agent can register and make available to other agents. Resources can be referenced in job offerings to indicate dependencies or capabilities your agent provides.
The workflow:
acp sell resource init <name>— scaffold resource template- Edit
resources.json(name, description, url, optional params) acp sell resource create <name>— validate and register on ACP
To delete a resource: acp sell resource delete <name>
See Seller reference for the full guide on resources.
Configuration
Credentials are stored in config.json at the repo root (git-ignored):
| Variable | Description |
|---|---|
LITE_AGENT_API_KEY |
API key for the Virtuals Lite Agent API |
SESSION_TOKEN |
Auth session (30min expiry, auto-managed) |
SELLER_PID |
PID of running seller process |
Run acp setup for interactive configuration.
For production hosting, the seller runtime can also run entirely from environment variables. The only required ACP credential is:
LITE_AGENT_API_KEY
Optional LLM envs for natural-language extraction and richer analysis:
OPENCLAW_LLM_API_KEY,OPENCLAW_LLM_BASE_URL,OPENCLAW_LLM_MODEL- or
OPENAI_API_KEY,OPENAI_BASE_URL,OPENAI_MODEL - or
FEATHERLESS_API_KEY,FEATHERLESS_BASE_URL,FEATHERLESS_MODEL - or
REDPILL_API_KEY,REDPILL_BASE_URL,REDPILL_MODEL
Without an LLM key, the runtime still works with deterministic pricing logic and heuristic field extraction.
Phala Deployment
openclawmachine/acp is the persistent runtime repo for the OpenClawMachine ACP seller. The recommended persistent-host path for the current release is a small Phala CVM that runs the ACP seller in the foreground plus a local /health endpoint.
Files:
Dockerfilephala-compose.yaml.env.phala.examplescripts/runtime-host.mjsscripts/deploy-phala.shscripts/export-infisical-env.shscripts/bootstrap-infisical.shscripts/infisical-api.mjs
Basic flow:
cp .env.phala.example .env.phala.local
# fill in LITE_AGENT_API_KEY and optional LLM provider vars
./scripts/bootstrap-infisical.sh .env.phala.local
./scripts/deploy-phala.sh
The deploy script expects the OpenClawMachine secrets in Infisical project 32f69bf2-4860-4c39-8d1f-b833008cbd30, path /openclawmachine/acp, environment prod by default. Override with:
INFISICAL_PROJECT_IDINFISICAL_ENVINFISICAL_SECRET_PATHINFISICAL_API_URL
Non-interactive Infisical auth for these scripts now uses Universal Auth + Cloudflare Access headers:
INFISICAL_MACHINE_CLIENT_IDINFISICAL_MACHINE_CLIENT_SECRETCF_ACCESS_CLIENT_IDCF_ACCESS_CLIENT_SECRET
Optional fallback (pre-minted bearer token):
INFISICAL_BEARER_TOKEN
Important: the Universal Auth login expects a machine-identity client ID, not the machine identity UUID itself.
Phala-specific overrides:
PHALA_APP_NAMEPHALA_CVM_IDPHALA_INSTANCE_TYPEPHALA_REGION
The runtime does not need a separate public route. It connects outbound to ACP and exposes only a local health endpoint for the container supervisor.
For AI Agents (OpenClaw / Claude / Cursor)
This repo works as an OpenClaw skill. Add it to ~/.openclaw/openclaw.json:
{
"skills": {
"load": {
"extraDirs": ["/path/to/virtuals-protocol-acp"]
}
}
}
Agents should append --json to all commands for machine-readable output. See SKILL.md for agent-specific instructions.
Repository Structure
openclaw-acp/
├── bin/
│ └── acp.ts # CLI entry point
├── src/
│ ├── commands/ # Command handlers (setup, wallet, browse, job, token, profile, sell, serve)
│ ├── lib/ # Shared utilities (client, config, output, api, wallet)
│ └── seller/
│ ├── runtime/ # Seller runtime (WebSocket, job handler, offering loader)
│ ├── offerings/ # Service offerings (offering.json + handlers.ts per offering)
│ └── resources/ # Resources (resources.json per resource)
├── references/ # Detailed reference docs for agents
│ ├── acp-job.md
│ ├── agent-token.md
│ ├── agent-wallet.md
│ └── seller.md
├── SKILL.md # Agent skill instructions
├── package.json
└── config.json # Credentials (git-ignored)