@lumorapp/baton
v0.1.5
Published
Pass the work between AI coding agents. A relay + launcher for any agent CLI.
Maintainers
Readme
Baton
Pass the work between AI coding agents. A multi-agent launcher, relay, and terminal workspace for pairs of AI agents.
⚡ A Lumora Project. Tap here to visit Lumora (lumorapp.app).
Baton launches two coding agents side-by-side (left and right panes) in a single terminal. The agents collaborate on your project, share context, and pass tasks to each other over a local relay protocol.
Highlights
- Dual-Agent Terminal Workspace: Two agents working together in split tmux panes.
- In-Project Isolation: Every project has its own
.baton/folder for plans (.baton/plans/), walkthroughs (.baton/walkthroughs/), isolated memory, and chat sessions. - Code Diffs in Chat: View file changes inline with colored diffs (
- deletedlines in red,+ addedlines in green). - Thinking Display: Clean, compact thought indicator (
Thought for 4s ▸). View full reasoning anytime withctrl+o(transcript view) or toggle inline visibility with/thinking. - Undo Support (
/undo): Instantly revert the last file edit or write made by an agent. - Safe by Default: Shell commands and file modifications ask for confirmation (
Yes / No). Agent-to-agent communication commands (baton inbox,baton send, etc.) run automatically without interruption. Pass--yesto bypass all prompts. - Non-Blocking Execution: Asynchronous tool runner ensures timers, thinking indicators, and keystrokes never freeze during long-running commands.
Installation & Setup
Install via npm
npm install -g @lumorapp/batonOr run instantly without installing:
npx @lumorapp/batonOr Install from Source
git clone https://github.com/msgamecoder/baton.git
cd baton
npm install -g .First Run
From any project directory:
baton- Terminal & Dependency Check: Detects your environment and installs multiplexer tools into
~/.baton/binif missing. - Interactive Setup: Select your model provider (OpenCode Go, DeepSeek, Claude, OpenAI, Ollama, etc.) with arrow keys and enter your API key.
- Launch: Splits into dual panes with your agents ready to build.
Running Options
baton # Launch or attach to dual-agent session
baton --yes # Run with full auto-approve (bypass tool confirmation prompts)
baton chat # Launch single-agent full-screen interactive UI
baton ask "prompt" # One-shot headless task
baton kill # Stop running agents and the background relay daemonThe Interface

Baton runs a full-screen terminal interface powered by OpenTUI:
█▄▄ ▄▀█ ▀█▀ █▀█ █▄ █
█▄█ █▀█ █ █▄█ █ ▀█
alex · OpenCode Go · deepseek-v4.1-flash · v0.1.0
you › change the accent color to green
baton
EDIT styles.css +2 -2
└ edited /home/mxgamecoder/test/styles.css +2 -2
- --accent: #ff6fb5;
- --glow: #8a7bff;
+ --accent: #4ade80;
+ --glow: #16a34a;
Thought for 3s ▸ (ctrl+o or /thinking to view)
I updated the accent colors to emerald green across styles.css.
┌─ message ─────────────────────────────────────────────────────────────────┐
│ Ask anything... / commands @ files │
└───────────────────────────────────────────────────────────────────────────┘
20260913-231440 · BUILD · 12 msgs · 17.6k tokensKeybindings & Shortcuts
- Enter: Send message.
ctrl+o: Open full-screen conversation transcript (scrollable history, full thinking/reasoning blocks, complete error logs).- Esc: Interrupt thinking/generation or close overlays.
/: Open command picker.@: File picker / attachment.
Project Structure (.baton/)
When working inside a project, Baton automatically initializes .baton/ (and adds it to .gitignore):
my-project/
├── .baton/
│ ├── plans/ # Implementation plans generated by agents
│ ├── walkthroughs/ # Walkthroughs, changelogs, and summaries
│ ├── chats/ # Project-isolated conversation sessions
│ └── memory.json # Facts remembered specifically for this project
├── src/
└── package.jsonSessions and memory are scoped per project, ensuring facts or chat logs from one project never leak into another.
Slash Commands
Type / or a command name in the message input:
| Command | Description |
|---------|-------------|
| /undo | Revert the last file change (edit_file / write_file) made by the agent |
| /thinking | Toggle inline thinking visibility (collapsed badge vs full inline display) |
| /plan | Switch to plan mode (read-only exploration, no file modifications) |
| /build | Switch to build mode (full tool execution) |
| /sessions | Switch or resume saved sessions for this project (ctrl+d to delete) |
| /new | Start a fresh session in the current project |
| /compact | Summarize conversation history to free context window |
| /model | Switch model on the fly |
| /provider | Switch or connect a new provider (OpenAI, Anthropic, DeepSeek, custom API) |
| /cost | View token usage and estimated cost for the current session |
| /send | Send a relay handoff message to the teammate agent |
| /inbox | Check messages received from the teammate agent |
| /clear | Clear the current conversation transcript |
| /quit | Exit Baton |
Model Providers
Baton supports:
- Recommended: Command Code, OpenCode Go, OpenCode Zen, Claude (Anthropic).
- Frontier Models: OpenAI (GPT-4o), Google Gemini, xAI (Grok), Mistral.
- Open & Fast: DeepSeek (Chat & Reasoner), Kimi (Moonshot), Groq, Together AI, Fireworks AI, SiliconFlow, Alibaba Qwen.
- Local (No API Key): Ollama, LM Studio, vLLM.
- Gateways & Custom: OpenRouter, LiteLLM, Vercel AI Gateway, or any custom OpenAI/Anthropic-compatible endpoint.
Provider configuration:
baton providers # List providers and key statuses
baton key <provider> <api-key> # Save API key (stored in ~/.baton/keys.json, chmod 600)
baton models --provider <provider> # Fetch available models live from providerMulti-Agent Relay
The two agents coordinate through a structured relay protocol:
handoff: Pass an actionable task to the teammate with expected outcomes.done: Notify that a delegated task was finished and verified.fyi: Share observations, findings, or port discoveries without transferring turn ownership.
The daemon ensures no runaway loops (max hop count) and isolates relay messages strictly to the working project.
Configuration (~/.baton/config.json)
{
"agents": [
{ "name": "alex", "provider": "opencode-go", "model": "deepseek-v4.1-flash", "role": "left" },
{ "name": "nova", "provider": "opencode-go", "model": "deepseek-v4.1-flash", "role": "right" }
],
"defaultProvider": "opencode-go",
"defaultModel": "deepseek-v4.1-flash",
"autoApprove": false,
"port": 7331,
"maxHop": 8
}License
MIT
