Skip to main content
Version: 1.0.0-beta

Agent Command

The agent command allows you to manage, configure, and interact with ElizaOS agents. Use this command to list, get information, start, stop, and update your agents.

Global Options

These options can be used with any agent subcommand:

  • -r, --remote-url <url>: Specify the URL of the remote agent runtime. Overrides the AGENT_RUNTIME_URL environment variable.

Usage

Install the CLI first (npm install -g @elizaos/cli@beta)

elizaos agent <action> [options]

Actions

ActionDescription
list, lsList available agents
get, gGet detailed information about a specific agent
start, sStart an agent using a character definition
stop, stStop a running agent
remove, rmRemove an agent
setUpdate agent configuration

Options

The available options vary by action:

OptionAction(s)DescriptionRequired
-n, --name <name>get,stop,remove,setAgent id, name, or index number from listYes
-n, --name <n>startCharacter name to start the agent withNo
-j, --jsonlist, getOutput as JSONNo
-j, --json <json>startCharacter JSON stringNo
--path <path>startLocal path to character JSON fileNo
--remote-character <url>startRemote URL to character JSON fileNo
-c, --config <json>setAgent configuration as JSON stringNo
-f, --file <path>setPath to agent configuration JSON fileNo
-o, --output <file>getOutput to file (default: {name}.json)No

Usage Examples

# List all agents with their status
elizaos agent list

# List in JSON format
elizaos agent list --json

# Get detailed information about an agent
elizaos agent get --name customer-support

# Save agent configuration to file
elizaos agent get --name customer-support --json --output ./my-agent.json

Agent Configuration

ElizaOS agents are configured through a combination of:

  • Agent definition file
  • Knowledge files
  • Runtime configuration options

A typical agent definition looks like:

{
"id": "customer-support",
"name": "Customer Support Bot",
"description": "Helps customers with common questions and issues",
"character": {
"persona": "You are a friendly and knowledgeable customer support agent.",
"goals": ["Resolve customer issues efficiently", "Provide accurate information"],
"constraints": [
"Never share private customer information",
"Escalate complex issues to human agents"
]
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.7
},
"knowledge": [
"./knowledge/shared/company-info.md",
"./knowledge/customer-support/faq.md",
"./knowledge/customer-support/policies.md"
],
"services": {
"discord": { "enabled": true, "channels": ["support"] },
"web": { "enabled": true }
}
}

FAQ

How do I fix "Agent not found" errors?

Check available agents using elizaos agent list and try using the agent ID directly with elizaos agent get --name agent_123456.

What should I do if I encounter configuration errors?

Validate your JSON syntax using a proper JSON validator and check the structure against the expected schema in the agent configuration example.

How do I resolve connection issues with the agent runtime?

First check if the runtime is running with elizaos start. If using a different address than the default (http://localhost:3000), set the AGENT_RUNTIME_URL environment variable: AGENT_RUNTIME_URL=http://my-server:3000 elizaos agent list.

  • create: Create a new project with agents
  • start: Start your project with agents
  • dev: Run your project in development mode
  • env: Configure environment variables