Multi-engine workflows¶
This tutorial shows you how to use different agents for different tasks and set up defaults so you don't have to think about it.
What you'll learn: Engine directives, persistent defaults, and when to use which agent.
Why multiple engines?¶
Different agents have different strengths:
| Agent | Good at |
|---|---|
| Codex | Fast edits, shell commands, quick fixes |
| Claude Code | Complex refactors, architecture, long context |
| OpenCode | Open-source alternative, local models |
| Pi | Conversational, explanations |
You might want Codex for quick tasks and Claude for deep work—without manually specifying every time.
1. One-off engine selection¶
Prefix any message with /<engine>:
You
/claude refactor this module to use dependency injection
You
/codex add a --verbose flag to the CLI
You
/pi explain how the event loop works in this codebase
The engine only applies to that message. The response will have a resume line for that engine:
Takopi
done · claude · 8s
claude --resume abc123
When you reply, Takopi sees claude --resume and automatically uses Claude—you don't need to repeat /claude.
2. Engine + project + branch¶
Directives combine. Order doesn't matter:
You
/claude /happy-gadgets @feat/di refactor to use dependency injection
Or:
You
/happy-gadgets @feat/di /claude refactor to use dependency injection
Both do the same thing: run Claude in the happy-gadgets project on the feat/di branch.
Directives are only parsed at the start
Everything after the first non-directive word is the prompt. /claude fix /this/path uses Claude with prompt "fix /this/path"—it doesn't try to parse /this as a directive.
3. Set a default engine for a chat¶
Use /agent set to change the default for the current scope:
You
/agent set claude
Response:
Takopi
chat default agent set to claude
Now all new conversations in this chat use Claude (unless you explicitly override with /codex).
Check the current default:
You
/agent
Example response:
Takopi
agent: claude (chat default)
defaults: topic: none, chat: claude, project: none, global: codex
available: codex, claude, opencode, pi
Clear it:
You
/agent clear
Response:
Takopi
chat default agent cleared.
4. Defaults in topics¶
If you use Telegram forum topics, /agent set applies per-topic:
You
topic: Backend work
/agent set claude
You
topic: Quick fixes
/agent set codex
Each topic remembers its own default.
5. Per-project defaults¶
Set a default engine in your project config:
[projects.happy-gadgets]
path = "~/dev/happy-gadgets"
default_engine = "claude"
Now /happy-gadgets tasks default to Claude, even if your global default is Codex.
6. Selection precedence¶
When Takopi picks an engine, it checks (highest to lowest):
- Resume line — replying to
claude --resume ...uses Claude - Explicit directive —
/codex ...uses Codex - Topic default —
/agent setin this forum topic - Chat default —
/agent setin this chat - Project default —
default_enginein project config - Global default —
default_engineat the top oftakopi.toml
This means: resume lines always win, then explicit directives, then the most specific default applies.
7. Practical patterns¶
Pattern: Quick questions vs. deep work
# Global default for quick stuff
default_engine = "codex"
# Project default for complex codebase
[projects.backend]
path = "~/dev/backend"
default_engine = "claude"
Simple messages go to Codex. /backend messages go to Claude.
Pattern: Topic per engine
Create forum topics like "Claude work" and "Codex tasks", then /agent set in each:
You
topic: Claude deep-dives
/agent set claude
You
topic: Quick Codex fixes
/agent set codex
Drag tasks to the right topic and the engine follows.
Pattern: Override for specific tasks
Even with defaults, you can always override:
You
/codex just add a print statement here
Works regardless of what the default is.
Recap¶
| Want to... | Do this |
|---|---|
| Use an engine once | /claude ... or /codex ... |
| Set default for chat | /agent set claude |
| Set default for topic | /agent set ... in the topic |
| Set default for project | default_engine = "..." in config |
| Set global default | default_engine = "..." at top of config |
| Check current default | /agent |
| Clear default | /agent clear |
You're done!¶
That's the end of the tutorials. You now know how to:
- ✅ Install and configure Takopi
- ✅ Send tasks and continue conversations
- ✅ Cancel runs mid-flight
- ✅ Target repos and branches from chat
- ✅ Use multiple engines effectively
Where to go next¶
Want to do something specific?
- Enable forum topics for organized threads
- Transfer files between Telegram and your repo
- Use voice notes to dictate tasks
- Schedule tasks to run later
Want to understand the internals?
- Architecture — how the pieces fit together
- Routing and sessions — how context resolution works
- Specification — normative behavior contracts
Need exact syntax?