Initialize claude-bridge wiki (Home)
+43
@@ -0,0 +1,43 @@
|
||||
# claude-bridge
|
||||
|
||||
A **subscription-safe bridge** that lets a primary **Claude Code (Opus 4.8, on Pro/Max)**
|
||||
session drive a **secondary Claude agent running a different model** via its own
|
||||
`ANTHROPIC_BASE_URL` — without ever putting a proxy on the primary.
|
||||
|
||||
> Sibling of [`crush-bridge`](https://git.ltms.dev/systems/vms) (Tier 2 → headless Crush
|
||||
> on GX10 DeepSeek). `claude-bridge` keeps the worker a *real Claude Code process* so it
|
||||
> inherits `CLAUDE.md`, hooks, skills, and MCP — just pointed at a cheaper/local model.
|
||||
|
||||
## Leading approach — AgentAPI
|
||||
|
||||
[`coder/agentapi`](https://github.com/coder/agentapi) wraps the Claude Code **CLI** as an
|
||||
HTTP server (terminal emulation): `POST /message`, `GET /messages`, `GET /events` (SSE),
|
||||
`GET /status`. One session per server. **The model is whatever env the wrapped `claude`
|
||||
process is launched with** — so we launch the worker's AgentAPI server with
|
||||
`ANTHROPIC_BASE_URL=https://ollama.ltms.dev` + a bearer token, and the primary Opus
|
||||
session talks to it over HTTP.
|
||||
|
||||
```
|
||||
Opus (Claude Code, subscription, env CLEAN)
|
||||
│ HTTP POST /message ─┐
|
||||
▼ ▼
|
||||
agentapi server ──launches──► claude (ANTHROPIC_BASE_URL=ollama.ltms.dev, worker model)
|
||||
▲ GET /events (SSE) ◄──┘
|
||||
```
|
||||
|
||||
- **Subscription boundary:** the *primary* never sets `ANTHROPIC_BASE_URL` (stays on
|
||||
Pro/Max). Only the *secondary* process is off-subscription.
|
||||
- **Different model:** set per worker process — sidesteps Claude Code's lack of
|
||||
per-subagent provider routing (issue #38698), because the worker isn't a subagent, it's
|
||||
its own configured process.
|
||||
|
||||
## Pages
|
||||
|
||||
- **[[Architecture]]** — process model, the AgentAPI HTTP contract, subscription boundary
|
||||
- **[[Approaches]]** — AgentAPI vs Agent SDK streaming vs bus/tmux (research matrix)
|
||||
- **[[Setup]]** — running the worker AgentAPI server + pointing it at `ollama.ltms.dev`
|
||||
- **[[Operations]]** — health, restart, model swaps, troubleshooting
|
||||
|
||||
## Status
|
||||
|
||||
🟡 Planning — AgentAPI selected as the primary approach (2026-07-08).
|
||||
Reference in New Issue
Block a user