Skip to main content

CLI Commands

openlegion
├── setup                                # Guided setup wizard
├── start [--config PATH] [-d] [--sandbox]  # Start runtime + interactive REPL
├── stop                                 # Stop all containers
├── chat <name> [--port PORT]            # Connect to a running agent
├── status [--port PORT]                 # Show agent status

├── agent
│   ├── add [name]                       # Add a new agent
│   ├── list                             # List configured agents
│   └── remove <name> [--yes]            # Remove an agent

└── channels
    ├── add [telegram|discord]           # Connect a messaging channel
    ├── list                             # Show configured channels
    └── remove <telegram|discord>        # Disconnect a channel

Command Details

openlegion setup

Guided setup wizard that walks you through:
  • Entering your LLM API key
  • Describing your project
  • Choosing a team template (starter, sales, devteam, content)

openlegion start

Launches the mesh host, spins up agent containers, and starts the interactive REPL.
FlagDescription
--config PATHPath to custom config directory
-dRun in background (daemon mode)
--sandboxUse Docker Sandbox microVMs for maximum isolation

openlegion stop

Cleanly shuts down all agent containers and the mesh host.

openlegion chat <name>

Connect to a running agent from a separate terminal. Useful when running in daemon mode.
FlagDescription
--port PORTMesh host port (default: 8420)

openlegion status

Show health and status of all running agents.

openlegion agent add [name]

Add a new agent. If no name is given, prompts interactively for agent configuration.

openlegion agent list

List all configured agents with their roles and models.

openlegion agent remove <name>

Remove an agent from the configuration.
FlagDescription
--yesSkip confirmation prompt

openlegion channels add [telegram|discord]

Connect a messaging channel. Prompts for the bot token.

openlegion channels list

Show all configured channels and their status.

openlegion channels remove <telegram|discord>

Disconnect a channel.

Interactive REPL Commands

When running openlegion start, you’re in the interactive REPL:
CommandDescription
@agent <message>Send message to a specific agent
/use <agent>Switch active agent
/agentsList all running agents
/addAdd a new agent (hot-adds to running system)
/statusShow agent health
/broadcast <msg>Send message to all agents
/costsShow today’s LLM spend
/resetClear conversation with active agent
/quitExit and stop runtime

Team Templates

Templates offered during openlegion setup:
TemplateAgentsDescription
starterassistantSingle general-purpose agent
salesresearcher, qualifier, outreachSales pipeline team
devteampm, engineer, reviewerSoftware development team
contentresearcher, writer, editorContent creation team