Skip to content
Fame edited this page Aug 5, 2026 · 2 revisions

Savant Code

A terminal-native multi-agent AI coding assistant that audits every change before it touches your repo.

Built with TypeScript/Bun, governed by the ECHO Protocol, and designed for local-first use with Ollama or any OpenAI-compatible provider.


Why Savant Code?

Most coding agents work as a single model guessing at your code. They generate changes, maybe run a linter, and hope for the best. When they fail, they fail silently — or worse, they fail confidently.

Savant Code takes a different approach. It uses 9 specialized agents with strict separation of duties to audit every change before it reaches your files.

The core insight: Code quality isn't a model problem, it's a configuration problem. Models will keep getting smarter, but they'll also keep failing in unexpected ways because unexpected failure modes are fundamental to non-deterministic systems. The solution isn't waiting for GPT-6 — it's engineering a harness that catches mistakes structurally.


Quick Start

npm install -g savant-code
cd your-project
savant-code

If Ollama is installed and running, it is detected automatically:

ollama serve
savant-code

The 9 Agents

Savant Code deploys 9 specialized agents, each with a distinct role and restricted tool permissions:

Agent Role What It Does
Savant Orchestrator Routes work, enforces protocol, spawns agents
Detective RED Phase Discovers bugs and issues with evidence before code is written
Forge GREEN Phase Implements code changes from a converged plan
Verifier AUDIT Phase Independent double-audit after implementation
Thinker Planning Deep sequential reasoning for complex problems
Scout Explore Explores codebases to gather context
Researcher Research Web search and documentation lookup
Recorder FID Lifecycle Manages FID creation, tracking, and archiving
Scribe Documentation Session summaries and knowledge capture

Each agent has exactly the tools it needs — no more. Detective gets read-only access. Forge gets write access. Thinker gets sequential thinking. No agent has more power than its role allows.


The ECHO Perfection Loop

Every code change follows a strict pipeline:

  1. RED — Identify ALL failures and issues with evidence (Detective phase)
  2. GREEN — Fix with minimal, surgical changes (Forge phase)
  3. AUDIT — Independent verification by a separate agent (Verifier phase)
  4. SELF-CORRECT — Fix any blockers found during audit
  5. COMPLETE — Document results, archive tracking (Recorder phase)

No code is written without a plan. No plan is accepted without audit. No audit passes without evidence. This isn't optional — it's enforced by the protocol.


Key Features

  • Multi-agent orchestration — 9 canonical agents coordinate through ECHO with explicit separation of duties
  • Tool permission boundaries — Each agent gets exactly the tools it needs via strict allowlist filtering
  • Context compaction — 4-layer progressive auto-compaction keeps sessions running through large codebases
  • Checkpoint & Rewind — Persistent per-turn edit checkpoints with /rewind modes for code, conversation, both, or session fork
  • Fail-closed streaming — Incomplete or malformed tool calls are rejected, not coerced
  • Provider flexibility — Works with Ollama (local-first), OpenCode Go, OpenRouter, NVIDIA NIM, CommandCode, or any OpenAI-compatible API
  • Deep research — Multi-query web research with concurrency control, URL dedup, and domain scoring
  • GitHub integration — Read-only PR/issue/CI review via official MCP server
  • Database helper — 4 native tools with adapter-enforced safety (read-only by default, LIMIT injection, SQL redaction)
  • HTML export — Fully self-contained branded HTML reports of conversations

Technical Stack

  • Runtime: TypeScript/Bun
  • Agent System: ECHO Protocol v0.2.0
  • License: Apache 2.0 (fully open source)
  • Architecture: Monorepo with shared packages

Links

Clone this wiki locally