A CLI coding agent, tuned by experiment — and honest about the results.
Karl Code is an agent-first coding workspace that runs in your terminal. It understands your codebase, reads and modifies files, runs shell commands, searches code, and delegates complex tasks to specialized subagents. What makes this repository unusual is the evaluation record: every fine-tune, context, and cloud-arm experiment is committed alongside its data — win or lose.
Note
The CLI command is karl-code. The PyPI package is karl-code. The project was formerly known as mistral-vibe and has been renamed to Karl Code.
| When | Experiment | Result |
|---|---|---|
| Aug 2026 | Phase-3 QLoRA fine-tune ("v3") vs production baseline v2 — missions battery | v3 lost: 1/0/4 vs v2's 1/2/2. Production default stayed on v2. |
| Aug 2026 | QLoRA 16-task strategy eval | v3 scored 14.00 — tied v2 per-task. The fine-tune added nothing; post-mortem committed. |
| Aug 2026 | GLM-5-Turbo cloud arm — missions battery | 4 success / 1 partial — beat both local arms (v2: 1/2/2, v3: 1/0/4) at $0.12/run. |
| Aug 2026 | v2 at 32K context vs 8K | Grade profile identical. More context didn't help; the v3 regression is weights-attributable. |
| Ongoing | Qwen3.5-9B rebase + DPO strategy design | Champion-challenger gates, frozen evals, replay mix, regression gates — training stays gated behind the eval harness. |
Lessons that fall out:
- A fine-tune is not automatically better. The QLoRA model we spent days building lost to its own baseline. The eval gate caught it before it shipped.
- The harness is the product. Every claim above reproduces from this repo — mission batteries with transcripts live in
evals/, corpus and splits with stats indata/finetuning/. - Cloud and local arms trade wins. Cheap routing between them beats loyalty to either.
- Multiple LLM backends — Mistral, Z.AI (GLM models), Anthropic, Google Vertex, generic OpenAI-compatible endpoints, and local llama.cpp
- Rich terminal UI — Built with Textual: autocompletion, themes, syntax highlighting, multi-line editing
- Tool-driven — File I/O, ripgrep search, stateful bash, web fetch/search, and more
- Subagent delegation — Spawn isolated worker sessions for parallel exploration, implementation, testing, and verification
- Skills system — Extensible via the Agent Skills specification; ships with 70+ built-in skills
- IDE integration — Works with editors supporting Agent Client Protocol (VS Code, Zed)
- Planning & orchestration — Multi-agent planning council, dependency graphs, retry logic, and verification
- MCP support — Connect external Model Context Protocol servers to extend available tools
- Voice mode — Dictate prompts with real-time transcription (experimental)
- Evaluation-first tuning — Fine-tuning datasets, eval harnesses, and mission batteries are first-class repo citizens, not afterthoughts
Requires Python 3.12+ and an API key for at least one supported provider (Mistral, Z.AI, Anthropic, etc.).
# uv (recommended)
uv tool install karl-code
# or pip
pip install karl-code
karl-code --versionRun karl-code --setup to configure providers, and karl-code doctor for built-in diagnostics (config validity, API connectivity, MCP reachability, system dependencies).
docs/finetuning-pipeline.md— the fine-tuning pipeline end to enddocs/rebase-dpo-design.md— Qwen3.5-9B rebase + DPO strategy, with the rulings that shaped itdocs/agent-dispatch-protocol.md/docs/dispatch-protocol.md— structured dispatch for autonomous agent operationdocs/coverage-baseline.md— test coverage baselineevals/— mission batteries with transcripts; start with the most recentmissions_*directoriesdata/finetuning/— tool-call corpus, strategy/specialized splits, dataset stats
Apache-2.0. This project is a derivative work of Mistral AI's Vibe (mistral-vibe); upstream portions are Copyright 2025 Mistral AI. Derivative and additional code is Copyright 2026 Darien Hardin. Both are licensed under the Apache License, Version 2.0 — see NOTICE for attribution details.