The open source AI coding agent multiplexer
Detect all installed AI coding agents on your machine, combine them in a unified terminal REPL, and hot-swap models mid-conversation without losing context, files, or execution state.
How thwip Works
A unified multiplexing pipeline that turns fragmented agents and models into one cohesive, resilient terminal development environment.
-
[*]
1. Zero-Config Discovery
On startup, thwip automatically scans your machine for installed CLI binaries (claude, agy, gemini, codex, aider, ollama), IDE installations (Cursor, Windsurf, VS Code), and existing credentials in ~/.claude.json, ~/.gemini/config.json, and environment variables.
-
[*]
2. Unified Cross-Provider State
Conversations are preserved in a standardized message format. When you switch between Claude, Gemini, OpenAI, DeepSeek, or Ollama, the complete history, user prompts, tool outputs, and reasoning steps migrate seamlessly.
-
[*]
3. Shared Universal Tool Engine
Every active agent gets direct, safe access to the same local capabilities: reading files, structured regex editing, creating files, running shell commands, executing sandboxed tests, and committing Git operations.
-
[*]
4. Mid-Session Model Hot-Swapping
Switch models at any point during your workflow using
/switch <agent> <model>or the interactiveCtrl+Spicker without starting a new session or losing modified workspace files. -
[*]
5. Automatic 429 Rate Limit Failover
When an API returns an HTTP 429 rate limit or quota exhaustion error, thwip intercepts the failure, preserves the turn, and offers an immediate one-key fallback to a ready secondary provider.
-
[*]
6. Offline & Local Ollama Support
Full integration with local Ollama daemons. Code completely offline with DeepSeek-R1, Qwen, or Llama models with zero API keys and zero cost.
Architecture & Protocols
Engineered for high availability, zero context loss, and deterministic tool execution.
Supported Providers & Models
Native adapter layer supporting the world's leading coding models.
| Provider | Default Models | Auto-Discovery Location | Context Limit | Tools Supported |
|---|---|---|---|---|
| Anthropic | claude-sonnet-4, claude-opus-4, claude-3-5-haiku |
~/.claude.json, ANTHROPIC_API_KEY |
200K tokens | Chat, Edit, Run, Term, Git |
| Google Gemini | gemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flash |
~/.gemini/config.json, GEMINI_API_KEY |
1M+ tokens | Chat, Edit, Run, Term, Git |
| OpenAI | gpt-4.5-preview, gpt-4o, o3-mini, o1 |
~/.config/openai/, OPENAI_API_KEY |
128K-200K tokens | Chat, Edit, Run, Term, Git |
| DeepSeek | deepseek-chat, deepseek-reasoner (R1) |
DEEPSEEK_API_KEY, ~/.thwip/config.toml |
64K tokens | Chat, Edit, Run, Term, Git |
| Groq | llama-3.3-70b-versatile, deepseek-r1-distill-llama-70b |
GROQ_API_KEY, ~/.thwip/config.toml |
128K tokens | Chat, Edit, Run, Term, Git |
| Ollama (Local) | deepseek-r1:latest, qwen2.5-coder:32b, llama3.3 |
http://localhost:11434 (Auto-detected) |
Local GPU/VRAM | Chat, Edit, Run, Term, Git |
| OpenRouter | anthropic/claude-3.5-sonnet, meta-llama/llama-3.3-70b |
OPENROUTER_API_KEY, ~/.thwip/config.toml |
Provider-dependent | Chat, Edit, Run, Term, Git |
Interactive Navigation & Commands
Full reference of slash commands and keyboard shortcuts inside the thwip REPL.
| Command / Shortcut | Arguments | Description | Example |
|---|---|---|---|
/switch |
<agent> [model] |
Hot-swaps active agent and model mid-conversation with zero lost context | /switch google gemini-2.5-pro |
/agents |
None | Lists all discovered local agents, configured API keys, and active status | /agents |
/models |
[agent] |
Displays available models, context window limits, and pricing for a provider | /models openai |
/about or /guide |
None | Opens the in-depth system guide and navigation manual inside the terminal | /about |
/limits |
None | Inspects live session tokens, cumulative costs, and rate limit quotas | /limits |
/tools |
None | Lists available universal tools (read, edit, write, run, bash, git) | /tools |
/history |
None | Shows conversation turn summary and token breakdown across all models | /history |
/session save |
<name> |
Persists the current conversation history and file changes to disk | /session save refactor-auth |
/session load |
<name> |
Restores a saved session and resumes context from where you left off | /session load refactor-auth |
/clear |
None | Clears current conversation memory and resets session tokens | /clear |
Ctrl + S |
Hotkey | Interactive agent and model switch prompt popup | Hotkey |
Ctrl + T |
Hotkey | Live agent status, token counters, and active provider info | Hotkey |
Ctrl + C |
Hotkey | Interrupt active streaming response or tool execution | Hotkey |
/exit or /quit |
None | Exits the thwip terminal multiplexer | /exit |