Skip to content

misolove/letitbe-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

letitbe-router

Flow-safe routing for AI agents and model CLIs
AI 에이전트와 모델 CLI를 리밋에 막히지 않게 흘려보내는 로컬 라우터


한국어로 보기   ·   Read in English



Architecture  ·  MVP  ·  Usage Model  ·  References



status: design-first license: MIT local-first

Quick language select

Language Start here Summary
한국어 README.ko.md 레리삐 라우터의 비전, MVP, CLI 흐름을 한국어로 봅니다.
English README.en.md Read the project overview, architecture links, and MVP scope in English.

What is this?

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.

Reading order

  1. 한국어 소개 or English overview
  2. Architecture
  3. MVP Plan
  4. Usage and Limit Model
  5. Reference Repository Notes

Current status

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/lr
lr 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 120

Use 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 120

lr 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 plan
  • claude-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-run

Configuration-first integration scaffolds are available without mutating external tools:

lr config path
lr config sample
lr config init
lr adapter list
lr adapter render hermes

The 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.

About

Letitbe Router: semantic routing plus adaptive limit-aware scheduling for AI agents and models

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages