CLI Reference

Complete reference for ID Agents interactive CLI commands

CLI Reference#

The ID Agents interactive CLI is the primary interface for managing agents. Start it with npm run id-agents and use the commands below to deploy, communicate with, and manage your agents.

Starting the CLI#

npm run id-agents

With a custom port:

npm run id-agents -- --port 5000

Or via environment variable:

MANAGER_PORT=5000 npm run id-agents

Commands#

/deploy#

Deploy agents from a YAML configuration file.

/deploy <config>

Examples:

/deploy configs/my-team.yaml
/deploy configs/production.yaml

This reads the config file, creates agent processes, assigns ports, and starts each agent's REST-AP server.

/agents#

List all running agents with their names, ports, and status.

/agents

/agents rebuild#

Rebuild all agents. This restarts every agent process.

/agents rebuild

/agent rebuild#

Rebuild a single agent by name.

/agent <name> rebuild

Example:

/agent coder rebuild

/ask#

Send a message to an agent. The conversation session is maintained across multiple /ask calls.

/ask <agent> <message>

Examples:

/ask coder Write a hello world function in TypeScript
/ask researcher Find the latest papers on transformer architectures

/ask * (Broadcast)#

Send a message to all agents at once.

/ask * <message>

Example:

/ask * What is your current status?

/hey#

Alias for /ask. Works identically.

/hey <agent> <message>

/news#

Check recent messages and responses from an agent.

/news <agent>

Use the -l flag to see full message content:

/news -l <agent>

/clear#

Clear the conversation session with an agent (start fresh). If no agent is specified, clears all sessions.

/clear [agent]

Examples:

/clear coder
/clear

/delete#

Delete an agent and stop its process.

/delete <agent>

Example:

/delete researcher

/register#

Register an agent onchain via ID Chain. Requires ID_REGISTRAR_PRIVATE_KEY to be set.

/register <agent>

Example:

/register coder

This assigns the agent a permanent ENS-based identity like x.agent-15.sep.xid.eth.

/status#

Show the status of the manager and all agents.

/status

/help#

Display the help screen with all available commands.

/help

/quit#

Exit the interactive CLI. Agent processes are stopped.

/quit

Remote API#

All CLI commands can also be executed programmatically via the /remote HTTP endpoint:

curl -X POST http://localhost:4100/remote \
  -H "Content-Type: application/json" \
  -d '{"command":"/agents"}'

Available remote commands:

CommandDescription
/agent <name> rebuildRebuild a single agent
/agentsList all agents
/agents rebuildRebuild all agents
/ask <name> <message>Send message to agent
/clear [agent]Clear session
/delete <name>Delete agent
/deploy <config>Deploy from YAML config
/news [-l] <name>Check recent messages
/register <name>Register agent onchain
/statusShow status

If ID_CONTROL_API_KEY is set, include it in the X-API-Key header for remote requests.

Development Commands#

These npm scripts are available for development:

npm run build           # Compile TypeScript
npm run dev             # Development mode with hot reload
npm run id-agents       # Start the interactive CLI
npm test                # Run tests