Flow-safe routing for AI agents and model CLIs
AI 에이전트와 모델 CLI를 리밋에 막히지 않게 흘려보내는 로컬 라우터
Architecture · MVP · Usage Model · References
| Language | Start here | Summary |
|---|---|---|
| 한국어 | README.ko.md | 레리삐 라우터의 비전, MVP, CLI 흐름을 한국어로 봅니다. |
| English | README.en.md | Read the project overview, architecture links, and MVP scope in English. |
Letitbe Router is a local-first routing layer that combines semantic intent routing with adaptive usage-aware scheduling.
It is designed to route work across Codex CLI, Gemini CLI, and Claude Code CLI while avoiding overloading any single provider or limit window.
Design-first MVP. The repository now includes the first offline v0.1 router scaffold:
python3.12 -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"
.venv/bin/python -m letitbe_router.cli smoke
.venv/bin/python -m letitbe_router.cli route "fix pytest and update code"The packaged CLI entrypoint is available as lr after editable install. For machine-wide local use, the current recommended setup is a dedicated venv plus a ~/.local/bin/lr wrapper.
python3.12 -m venv ~/.local/share/letitbe-router-venv
~/.local/share/letitbe-router-venv/bin/python -m pip install -U git+https://github.com/misolove/letitbe-router.git
cat > ~/.local/bin/lr <<'SH'
#!/usr/bin/env sh
exec "$HOME/.local/share/letitbe-router-venv/bin/lr" "$@"
SH
chmod +x ~/.local/bin/lrlr smoke
lr route "review this architecture for risks"
lr run "Reply exactly: LTR_OK" --agent claude-code --timeout 120
lr chat "안녕" --agent claude-code --timeout 120Use lr run for task routing and lr chat for general prompts. If routing returns no match, lr run can opt into a safe fallback:
lr run "hi" --fallback-agent claude-code --timeout 120lr run and lr chat execute the selected CLI agent in a conservative non-interactive mode:
codex-cli:codex exec --sandbox read-only --skip-git-repo-check ...gemini-cli:gemini --prompt ... --approval-mode planclaude-code:claude --print ... --permission-mode plan --max-turns 3
Use --dry-run to inspect the selected command before execution.
lr run "fix pytest and update code" --dry-runConfiguration-first integration scaffolds are available without mutating external tools:
lr config path
lr config sample
lr config init
lr adapter list
lr adapter render hermesThe JSON config can enable or adjust agent templates for hermes-agent, opencode, openclaw, codex-cli, claude-code, and gemini-cli. Disabled templates are included for future opt-in integration; lr adapter render ... prints dry-run snippets only.
lr serve exposes a minimal OpenAI-compatible API surface for tools that can point at a custom base URL:
lr tui --once
lr serve --host 127.0.0.1 --port 20128 --timeout 120
lr daemon start --host 127.0.0.1 --port 20128 --dry-run
lr daemon status
lr daemon stop
lr status --base-url http://127.0.0.1:20128
curl http://127.0.0.1:20128/v1/models
curl http://127.0.0.1:20128/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"lr/claude-code","messages":[{"role":"user","content":"Reply exactly: LTR_OK"}]}'Prefer lr or lr/auto for routed execution and lr/<agent> for direct adapter selection. Backward-compatible aliases (letitbe-router, agent/<agent>) are still accepted. Supported now: GET /health, GET /v1/models, and non-streaming POST /v1/chat/completions. stream=true is intentionally rejected until streaming is implemented.