Open-source, self-hosted AI software-team orchestrator. Routes each agent role to the cheapest capable model across all your providers. Structured artifact handoffs. Transparent cost per step.
Agents never chat freely. Each stage produces a JSON artifact that the next stage consumes. The orchestrator controls every handoff.
RefractIQ makes your existing subscriptions work together — not separately.
Each agent role runs on the cheapest capable model across all your registered providers. Intake on Gemini Flash, Architecture on Claude Sonnet, Review on a different provider for a genuine second opinion.
Context engine scores file relevance and sends only what's needed. Diff-only review. Compressed repair loops. Prompt cache layout for Anthropic and OpenAI. Budget limits at call, stage, and run level.
API keys never touch config files or SQLite. Secret redaction on all log output. Sandboxed command runner with an allowlist. Path traversal prevention on all file operations.
Every run is tracked in a local SQLite database — provider, model, tokens, USD cost,
duration — per stage. RefractIQ report shows a full cost breakdown.
Next.js dashboard with run history, per-stage cost tables, and provider status. Served
by a Hono API. RefractIQ serve starts it locally.
One docker compose up starts the API and web dashboard. CLI runs as a
one-off container. Named volume persists your run history across restarts.
Your API keys. Your subscriptions. RefractIQ routes tasks to the cheapest capable model automatically.
RefractIQ sits between your providers and your project — routing work, tracking cost, and structuring handoffs so each model does what it's cheapest and best at.
| RefractIQ | Claude Code / Codex | Aider | OpenHands | LangGraph/CrewAI | |
|---|---|---|---|---|---|
| Multi-provider routing | ✅ All providers | ❌ Vendor-locked | ⚠️ Limited | ⚠️ Some | Depends |
| Structured role handoffs | ✅ JSON artifacts | ❌ Single agent | ⚠️ 2-model | ⚠️ Single agent | Framework |
| Per-step cost tracking | ✅ Per stage | ❌ | ❌ | ⚠️ Partial | Depends |
| Context pruning | ✅ File scoring | ❌ Full context | ⚠️ | ⚠️ | Depends |
| Self-hosted dashboard | ✅ Docker + Next.js | ❌ | ❌ | ⚠️ Cloud | ❌ |
| Ready-to-run product | ✅ One command | ✅ | ✅ | ✅ | ❌ Build it yourself |
Node.js 20+ and pnpm 9+ required.
Copy .env.example to .env and fill in at least one
provider key.
Run RefractIQ init then RefractIQ providers add to
register a provider.
Give RefractIQ a project idea and watch the pipeline run.
# Clone and install git clone https://github.com/saiz123/RefractIQ cd RefractIQ pnpm install && pnpm build # Add your API keys cp .env.example .env # Edit .env with your keys # Initialize node apps/cli/dist/bin/cli.js init node apps/cli/dist/bin/cli.js providers add node apps/cli/dist/bin/cli.js doctor # Build a project node apps/cli/dist/bin/cli.js build \ "a CLI that reverses a string" # View cost breakdown node apps/cli/dist/bin/cli.js report # Launch web dashboard node apps/cli/dist/bin/cli.js serve
Star the repo, open an issue, submit a PR. All contributions welcome.