Loki Mode
Generates Docker Compose stacks with healthchecks, dependency wiring, and environment configurability for multi-service applications, enabling containerized deployment.
Integration with Google Gemini CLI (deprecated) for autonomous coding, allowing the use of Google's AI models within Loki Mode.
Loki Mode
Your agent says done. Loki proves it: an autonomous coding agent that turns a task or issue into a verified pull request with a signed receipt you can check yourself.
Website | Install guide | User guide | CLI reference | Changelog
The npm badge above tracks the current release; see CHANGELOG.md for release notes.
CLI reference: docs/CLI-REFERENCE.md (generated from the command registry).
Install
npm install -g loki-modeThe npm package installs the Bun runtime the engine needs as an optional dependency. Other ways in: bun install -g loki-mode, brew tap asklokesh/tap && brew install loki-mode, or docker pull asklokesh/loki-mode:latest (Docker guide). Upgrade with loki self-update.
Want to see a result before you install or spend anything?
npx loki-mode tour # prints a real receipt from a past build: no key, no spend, no networkRelated MCP server: Gravitas-Core-MCP
First run
Loki needs a model. An ANTHROPIC_API_KEY is enough, or an installed and logged-in Claude Code CLI.
export ANTHROPIC_API_KEY=sk-...
cd your-repo
loki doctor # names anything missing, exit 0 when ready
loki quick "fix the login redirect loop" # one small task, no PR
loki "add rate limiting to /api/login" # build, verify, seal a receipt, open a PR
loki owner/repo#123 # same, from a GitHub, GitLab or Jira issueloki "<task>", loki owner/repo#N and loki quick "<task>" run on the Loki 10 engine by default. Add --no-pr to build and verify without opening a pull request, --max-cost <usd> to cap spend (default $100 with an API key, no dollar cap on a subscription), and --provider <name> to pick another coding CLI.
What you get
Every run starts from a delivery contract derived from your task, writes checks from the task alone before touching code, implements, verifies, and ends in exactly one outcome: VERIFIED, ALREADY_SATISFIED, FAILED, BUDGET_STOP, BLOCKED or STALLED (exit codes). If the contract cannot be satisfied as written, the run stops and asks one question instead of guessing.
A pull request written for a quick review: what the issue asked, what changed, how it was tested, and what was NOT PROVEN. A run that did not verify opens a draft.
A signed receipt at
.loki/runs/<run-id>/receipt.json, signed with a local Ed25519 key created on first run.
loki verify # newest run; or: loki verify <run-id>loki verify re-hashes the receipt, checks its signature and checks it against the run's event log. It prints VERIFIED (exit 0), TAMPERED (1), UNCHECKED (2) or UNSIGNED (3). On another machine, export the public key with loki keys export and pass it with loki verify --pubkey <file>. A receipt claims only what its checks ran, and lists what they did not; signing proves who produced it, not that the code is bug-free. Details: docs/SIGNED-RECEIPTS.md.
A finished run prints a short summary:
Outcome: VERIFIED
PR: https://github.com/owner/repo/pull/1
Receipt: sha256:2f9a41c7e0b3...
NOT PROVEN: full suite, app boot, council, security scan
Cost: $0.42 (claude, 212k tokens)
Time: 4m12s (intake 11s, plan 20s, implement 3m10s, verify 31s)Core commands
Command | What it does |
| Build a task, verify it, seal a receipt, open a PR ( |
| The same, from a GitHub, GitLab or Jira issue (issue URLs work too) |
| One small task, no PR |
| Status of the latest run, or of a given run |
| Check a receipt's hash, signature and event log |
| Resume a BLOCKED run with your answer ( |
| Check prerequisites, providers and login |
| Start the Control Plane (see below) |
| Open the Control Plane UI, starting it if needed |
| Show a sample receipt offline |
| Everything else; |
Full reference: docs/CLI-REFERENCE.md. Engine guide, provider table and model routing: docs/v10/GUIDE.md.
Control Plane
A local UI and API for all your runs: outcomes, receipts, costs, and an answer box for BLOCKED runs. It is on by default (LOKI_CONTROL=0 turns it off) and listens on 127.0.0.1 only.
loki control serve # http://127.0.0.1:47821 (--port N, --db PATH)
loki control backfill . # load existing ./.loki/runs
loki control status # reachable? how many runs?While it is running, runs on this machine ship to it automatically. Guides: docs/v10/CONTROL-PLANE.md, container, Helm and ECS, migrating from the old dashboard.
Requirements
loki doctor enforces this list.
Required:
A model:
ANTHROPIC_API_KEY, or a provider CLI such as Claude Code (claude). Cline, Codex, Aider and opencode are supported as experimental providers.Python 3.8+ (
python3)Node.js 20+ (
node)jqGit 2.x (
git)curl
Recommended:
Bun 1.3+ (
bun) on your PATH (the npm package also bundles it).Docker, to run Loki from the published image.
macOS and Linux are supported.
More
Installation, environment variables, exit codes, known issues, privacy and telemetry
Agent Change Receipt format: docs/AGENT-CHANGE-RECEIPT.md
Issue to PR from GitHub Actions, no hosted service: docs/examples/loki-issue-to-pr.yml.example
Jira and Linear intake: docs/trackers.md. Two-way Slack: docs/slack.md. Multi-repo runs: docs/WORKSPACES.md
MCP: the bundled server exposes 47 tools over stdio (
loki mcp), including starting a run, reading its status and verifying its receipt.Claude Code plugin:
claude plugin marketplace add asklokesh/loki-mode, thenclaude plugin install loki-mode@loki-mode. The same marketplace ships loki-seal, a Stop hook that refuses "done" when tests newly fail or were weakened.Architecture: docs/ARCHITECTURE.md. Upgrading: UPGRADING.md
Contributing
git clone https://github.com/asklokesh/loki-mode.git && cd loki-mode
npm install && npm testSee CONTRIBUTING.md, TESTING.md and the Code of Conduct.
License
Business Source License 1.1. Free for personal, internal, academic and non-commercial use; it converts to Apache 2.0 on March 19, 2030. Contact founder@autonomi.dev for other arrangements.
Loki Mode is built by Autonomi.
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared control plane for AI coding agents — tasks, memory, decisions, file locks. 12 tools.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Package intelligence MCP for AI agents — 22 tools, 19 ecosystems, AGPL SDK, free.
The project brain for AI coding agents — memory, decisions, sprints, knowledge base via MCP.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn autonomous AI development agent that enables full-stack coding, automated verification, RAG-powered code search, and quality assurance through MCP tools. Supports Gemini CLI, Claude Code CLI, with features like parallel verification, security scanning, and spec-driven development.5-
- AlicenseBqualityCmaintenanceProduction-grade, autonomous Model Context Protocol (MCP) server that elevates AI models from stateless code generators into persistent, self-verifying software engineers.211MIT
- AlicenseAqualityCmaintenanceA task-based AI orchestrator that bridges AI models (Gemini, Claude, OpenAI) with local environments, operating as an interactive CLI and an MCP server for structured autonomous development.220 npmMIT
- AlicenseAqualityAmaintenanceAn autonomous, extensible LLM build orchestrator. Give it a repo and a goal; it decomposes the goal into tasks, edits code, and gates every change on build/tests/lint, reverting regressions. Polygot, cost-aware model selection, pluggable via entry points. Ships as an MCP server so any client can drive it in plain English.1587 PyPI5AGPL 3.0