Skip to content

The openagents command

openagents is the command-line program that comes with Coder. Use it to run Coder from a script, chat from a script, change settings, work with plugins, and connect phones to a computer without a screen. It installs with Coder; see Download and install.

Every command takes --json for machine-readable output and --help for its syntax. openagents doctor shows which identities, stores, and relays it uses.

Chat

openagents chat "How do I connect a phone?"     # a new thread
openagents chat --thread ID "And on Android?"   # continue a thread
echo "What is the Gym?" | openagents chat -     # the message from stdin
openagents chat threads                         # your threads, newest first
openagents chat read --thread ID                # a whole thread
openagents chat export --thread ID              # a thread as a trajectory file
openagents chat send "Plan the budget" --project finances   # a new chat in a project

--project starts the chat inside one of your projects on openagents.com (by its name, repository, or id), as starting a chat in that project on the website does. OpenAgents answers it there, the reply streams here, and the chat shows in the project on the website and the phone, and in openagents projects threads finances.

The reply streams to standard output, and everything else (the thread ID, offers, suggestions) goes to standard error, so reply=$(openagents chat "…") captures only the reply.

When a message is coding work, Coder runs on this computer at once, in the Git checkout you run the command in, and its steps stream to the terminal.

openagents chat send --no-run "add a test for slugify"   # only offer Coder
openagents chat run-coder --thread ID                     # accept the offer later
openagents chat follow --thread ID                        # watch a run
openagents chat answer --thread ID "yes, use the smaller fix"
openagents chat stop --thread ID
openagents chat work --issues 101,102                     # work GitHub issues

Ctrl-C stops following a run; the run keeps going. See Coder and Work on a GitHub issue.

When the Mac app (or another host) runs on this computer, these are the same threads it shows. Without one, the command keeps its threads in ~/.openagents/chat/, and they move into the host's store the first time a host runs. --scratch uses a throwaway identity and thread.

Coder

openagents coder runs Coder's chat without the screen, and manages its models, plugins, agents, and saved chats:

openagents coder chat -p "Explain this folder." --session first   # a chat
openagents coder delegate --to codex --task "Review the last commit"
openagents coder models list
openagents coder plugins list
openagents coder sessions list

See Coder from scripts.

Settings

openagents settings show
openagents settings set coder.start ask_first
openagents settings unset coder.start

Every key is in the settings reference.

Projects and GitHub boards

Your projects on openagents.com (the Projects list on the website) are openagents projects. GitHub Project boards are a different thing, under openagents board:

openagents projects list                       # your openagents.com projects
openagents projects show finances              # one project and its chats
openagents projects files list finances        # its files and notes
openagents board list --project 22 --status Todo   # a GitHub board's items
openagents board move 101 --status "In Progress"   # move an issue on its boards

Coder runs the openagents installed beside it, so its commands always match the Coder you run.

Plugins

openagents plugin list                          # published plugins
openagents plugin run DIR --in PROJECT --request "..."
openagents plugin test init                     # write tests with us
openagents plugin test run .                    # test with and without
openagents plugin test publish REPORT           # add a result to the Gym
openagents plugin test check RESULT_ID          # rerun someone's result
openagents plugin defaults sync                 # the plugins Coder uses for everyone

See Plugins and the guides after it.

Models

Call any model on the OpenAgents API with your key in OPENAGENTS_API_KEY:

openagents inference google/gemini-3.8-flash "Say hello."
openagents inference openagents/chat --input "Tell me a story." --stream
openagents inference openagents/fast --json '{"input": "Hi", "temperature": 0.2}'
openagents inference models                     # every model and its price
openagents inference rates                      # the rate card

--format json prints the whole answer and --format events each streamed event. With no key, --pay x402 --max-msat N pays for one request from your wallet (Pay per request).

Connect

For a computer without the Mac app, or to script pairing. The host must be running.

openagents connect invite            # a QR code for the phone, in the terminal
openagents connect devices           # the phones that can reach this computer
openagents connect remove DEVICE     # cut a phone off now
openagents connect status            # this computer's host at a glance
openagents connect --ssh me@box      # set up a computer you reach over SSH

connect --ssh installs openagents on the other computer, starts its host, and pairs it with this one. Set up SSH key login first.

On Windows, connect and a few other commands say they need macOS or Linux.

More

The command also covers the Verse, XP, keys, relays, a Lightning wallet for agents, and more. openagents --help lists every group, and the full reference is on GitHub. openagents mcp serve offers the command to other agents over MCP.

Next: Chat.