🔨  Work in Progress — RefractIQ v0.1 is an active alpha. Feedback welcome on GitHub Issues.
⚡ Open Source  ·  Self-Hosted  ·  MIT License

Build software with a team
of AI models.

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.

Get started View on GitHub
6
Agent Roles
5+
AI Providers
243
Tests Passing
MIT
License

Structured artifacts.
Orchestrator-controlled.

Agents never chat freely. Each stage produces a JSON artifact that the next stage consumes. The orchestrator controls every handoff.

📥
Intake
requirements.json
🏗️
Architect
architecture.json
📋
Tasks
task-list.json
⚒️
Builder
code-diff
🧪
Test
test-result.json
🔍
Reviewer
review.json
🔧
Repair
patch (×3 max)
📄
Doc
final-report.md

Built for people who pay
for multiple AI subscriptions.

RefractIQ makes your existing subscriptions work together — not separately.

🎯

Cross-Provider Routing

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.

💰

Token Optimization

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.

🔒

Secure by Design

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.

🗄️

Local Persistence

Every run is tracked in a local SQLite database — provider, model, tokens, USD cost, duration — per stage. RefractIQ report shows a full cost breakdown.

🌐

Web Dashboard

Next.js dashboard with run history, per-stage cost tables, and provider status. Served by a Hono API. RefractIQ serve starts it locally.

🐳

Docker Self-Hosting

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.

Connect what you already have.

Your API keys. Your subscriptions. RefractIQ routes tasks to the cheapest capable model automatically.

Anthropic Claude
OpenAI / GPT
Google Gemini
OpenRouter
Ollama (local)
Any OpenAI-compatible

Not another coding assistant.
The orchestration layer.

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

Read the full comparison →

From zero to running
in under 5 minutes.

1

Clone and install

Node.js 20+ and pnpm 9+ required.

2

Add your API keys

Copy .env.example to .env and fill in at least one provider key.

3

Initialize and build

Run RefractIQ init then RefractIQ providers add to register a provider.

4

Build something

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

Built in public.
MIT licensed.

Star the repo, open an issue, submit a PR. All contributions welcome.