Skip to content

Repository files navigation

Agent Smith

From ticket to PR. Every run shows its cost. Every change comes with the reasoning the agent followed.

Agent Smith

License: MIT .NET 8 Docker

Docs · Releases · Blog


Agent Smith is an open source AI coding agent. You drop a ticket into your tracker, and a pull request shows up on your repo, with the ticket already updated to point at it. That's the whole loop.

I built it because most AI coding tools stop at a suggestion in your editor and call it a day. I wanted to close the loop — actual PR, in the actual repo, the ticket actually moved to resolved. Plus a paper trail so six months later I can answer "why did we pick path A over B in this fix" without guessing.

Lifecycle: ticket → orchestrator → sandboxes → pull requests → resolved

What it does

You drop a ticket into your tracker. Agent Smith reads it, clones every repo in the project into its own sandbox (each with its own toolchain — a .NET repo gets dotnet/sdk:8.0, a Node repo gets node:20, a Python worker gets python:3.12), writes the code, runs the tests, opens one pull request per repo with the changes cross-linked, and writes the ticket back as resolved with every PR URL in the comment.

The reasoning the agent followed lands on disk in .agentsmith/runs/{run-id}/ — a plan.md, a result.md with token usage and dollar cost, and a decisions.md for the non-obvious choices. Read it six months later when you've forgotten why.

The loop under the hood

Seen from the inside, every coding run is one control loop. The ticket gets sized into a dollar-and-token budget at admission, the plan gets ratified before a line of code changes, and the loop keeps going only while it makes real forward progress. The exit is a verification cross-checked against the real committed diff — a run can't report green without a matching change.

The coding master control loop: admit, plan, the execute loop, land

Component names on the stages map one-to-one to the C# types that own them. The lifecycle page walks through every stage.

The dashboard

A live mission-control view of every run — what's waiting on you, what's in flight, and what finished today, each with its dollar cost and the story of how it got there.

Agent Smith dashboard — runs overview

When a run hits a decision it shouldn't make alone, it pauses and asks. Your answer resumes it immediately — no tokens burning while it waits. Every run keeps a five-beat story (ticket → plan → build → verify → outcome) you can open:

Run detail — the story of a run

Configuration is a picked-not-typed catalog: agents, trackers, repos and connections wired into projects, so a project can never reference something that doesn't exist.

Configuration studio, the project wiring

What it works with

Trackers AI providers Hosting
Azure DevOps Boards Anthropic Claude CLI single-binary
Jira OpenAI Docker Compose
GitHub Issues Azure OpenAI Kubernetes
GitLab Issues Google Gemini
Ollama (local)
OpenAI-compatible (Groq, vLLM, LM Studio, …)

The skills — the role definitions for what an architect / reviewer / security analyst does in a run — are developed in a separate repo, and every release ships with its catalog embedded. The binary you download carries the exact skills it was tested with; there is nothing to pin and nothing to fetch on first run. A skills: block in the config is only for overriding that (skills development, air-gap mirrors).

Built by the method it teaches

Agent Smith bootstraps an .agentsmith/ directory into your repo: context, phase specs, a decision log, a memory of what it learned. That is the product. It is also how this repository got written, over six months, by me and one language model. The numbers below are the receipts.

610 completed phases, each specified before a line of code existed
2,587 recorded decisions, each naming the alternative it beat
244,753 lines of C# across 3,044 files in 31 projects
3,760 automated tests, gating every single commit
~500 h of human time, roughly 50 minutes per completed phase

Two things did the actual steering. Ten coding principles turned into architecture tests that fail a build, and every one of them has a concrete thing that went wrong behind it. Then a blocking commit hook that lets a phase commit through once the build, all 3,760 tests, four CLI dry runs and every harness preset come back green. CI would have told me about a break afterwards. The hook stops the commit from existing, and the model has no way to wave itself through.

The coding-principles.md I built this project under is the same file Agent Smith injects into its own agents at runtime. The methodology and the product turned out to be the same thing.

The full account, including what didn't work: the skill catalog going from 95 down to 12, the plan generator I retired, the metric that quietly read zero for months, and how every figure above was counted.

Install

# Linux (x64)
curl -sL https://github.com/holgerleichsenring/agent-smith/releases/latest/download/agent-smith-linux-x64 \
  -o /usr/local/bin/agent-smith && chmod +x /usr/local/bin/agent-smith

# macOS (Apple Silicon)
curl -sL https://github.com/holgerleichsenring/agent-smith/releases/latest/download/agent-smith-osx-arm64 \
  -o /usr/local/bin/agent-smith && chmod +x /usr/local/bin/agent-smith

# Docker (long-running server)
docker pull holgerleichsenring/agent-smith-server:latest

Every platform (Linux x64 / ARM64, macOS Intel / Apple Silicon, Windows) is on the releases page. The install guide walks through CLI / Docker / Kubernetes setups.

First run

Prove the loop before you connect anything. The only credential the demo needs is an LLM key:

export OPENAI_API_KEY=sk-...
agent-smith demo

That materializes a small sample project with a seeded bug, runs the real fix-bug pipeline against it, and leaves you a local commit plus the diff. No tracker, no Docker, no Redis — if this works, the loop works.

For your real systems, drop an agentsmith.yml in a working directory:

agents:
  default-openai:
    type: openai
    models:
      primary: { model: gpt-4.1 }

repos:
  todolist:
    type: github
    url: https://github.com/acme-org/todolist
    auth: github_token

trackers:
  acme-issues:
    type: github
    organization: acme-org
    auth: github_token

projects:
  todolist:
    agent: default-openai
    tracker: acme-issues
    repos: [todolist]

secrets:
  openai_api_key: ${OPENAI_API_KEY}
  github_token:   ${GITHUB_TOKEN}

Set the secrets, let the doctor check the wiring, fix a ticket:

export OPENAI_API_KEY=sk-...
export GITHUB_TOKEN=ghp_...

agent-smith doctor
agent-smith fix --ticket 54 --project todolist

doctor actually probes everything — it calls the LLM, authenticates against the tracker, spawns a throwaway sandbox — and names what's broken with a fix hint, before a run spends tokens on it. The first-run page shows the end-to-end output.

More than fix-bug

fix-bug is the headline because it's the one most people show up for. The rest of the box:

  • add-feature — same flow plus generated tests and docs.
  • pr-review — reviews a PR diff and posts line-anchored findings as comments; re-review on push replaces them.
  • security-scan — multi-role code security review, including git-history secrets.
  • api-security-scan — Nuclei + Spectral + an AI panel against a live API.
  • legal-analysis — contract review with five legal specialists.
  • mad-discussion — multi-agent design discussion when you want to argue something out.
  • init-project — bootstraps .agentsmith/context.yaml per repo in a project.
  • autonomous — open-ended operator-driven loop.
  • skill-manager — author / lint / validate skills.

Same orchestrator, different roles. You can define your own in agentsmith.yml too — see the pipeline reference.

And two things that took the longest to get right, so I'll name them here: before a run writes code it negotiates the expectation with you — what must be true afterwards, ratified on the ticket, and that ratified block is what the PR gets reviewed against. And when a run has a question, it checkpoints and waits — days if needed — without holding a pod. A ticket too thin to work from gets asked, not guessed at. There's also a chat side to this (spec dialogue): discuss the work in Slack or Teams, and it drafts the phases and files the tickets.

Where the docs are

  • Get it running — install + first run (demo, doctor).
  • Connect your stuff — tracker + repos + AI provider, with a copy-pasteable YAML per system.
  • Trigger it — webhooks, polling, labels, CLI.
  • Host it — CLI, Docker Compose, Kubernetes with honest capacity quotas.
  • How it works — the spec-first methodology, the expectation contract, the spec dialogue.
  • Dashboard — watch runs live: every step, every LLM call with its cost and cached share, a cancel button that means it.

License

MIT. Copyright (c) 2026 Holger Leichsenring.

If you find Agent Smith useful, say hi on the blog or drop an issue.

About

Self-hosted AI coding agent · ticket → code → PR

Topics

Resources

Stars

23 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages