Mitos

io.github.dovahkiin-v由 GitHub 账号 dovahkiin-v 发布v0.20.0更新于 Oct 24, 2026

Architectural decision memory for LLM-native workflows — markdown for humans, a graph for agents.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

Mitos 是面向 AI 辅助开发的本地架构决策记忆:记录决策与被否决的方案,并在助手做决定前把历史反馈给它。

可以做什么
  • 在决策前检索先例,并附上此前已否决的备选方案及原因
  • 记录已定决策、被否决的路径,以及它与旧决策的取代或修订关系
  • 按语义或精确标识查询决策,也可只检索被否决的选项
  • 以人类可读的 decisions.md 及季度归档为事实来源,图与语义索引可随时重建
  • 审计语料中相互矛盾的决策,并可在 git 提交时要求先执行检查
适用场景
适合助手长期参与同一代码库、反复提出你已否决的方案或与既有设计决策相冲突的场景。尤其适合由 AI 助手持续产生和消费架构决策的独立开发者。
运行要求
以本地进程运行:从 PyPI 安装 mitos-adr 包(pipx),用 Docker 启动监听 7333 端口的本地 Qdrant 容器,并在每台机器上注册一次服务器。需要 Gemini API 密钥用于向量化,强烈建议再提供 Anthropic 密钥用于冲突审计层,密钥通过命令行设置而非 MCP 配置。每个项目需初始化并按名称注册。
安装前请注意
需要 API 密钥(Gemini 必需,Anthropic 建议提供);安装指南要求助手不要经手密钥值,请自行设置。密钥会从环境变量、仓库根目录 .env 或 ~/.config/mitos/.env 读取,测试运行可能动用你的个人密钥并产生费用。它会在项目中写入 decisions.md 与归档,并可安装 git 提交钩子,在未尝试检查前暂缓提交。标注为早期版本。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mitos,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Mitos

[Status: Alpha] [PyPI] [Python 3.13+] [License: Apache-2.0] [MCP Registry]

🔧 Early release — actively developed

When you build software with AI assistants over months, the reasoning behind your decisions gets lost. The assistant forgets why you chose one approach, re-suggests options you already rejected, and your design notes drift out of sync with what was actually decided. Mitos is a memory layer for those decisions: it records each decision, the alternatives you ruled out, and how later decisions replace earlier ones — then feeds that history back to your AI assistant in a compact, trustworthy form.

The result: your AI collaborator stays consistent with the calls you've actually made — it stops contradicting a past decision or re-opening a settled question, and your decision record never silently rots.

Under the hood: markdown for humans (decisions.md and its quarterly archives under decisions/archive/ are the source of truth you can always read and grep), a typed graph for the agents (SQLite + a local Qdrant for semantic recall), and an MCP server so agents check precedent before deciding and record decisions as they make them.

Available on PyPI and the MCP Registry.


Fastest install: hand it to your agent

If you work with an AI coding agent (Claude Code, Cursor, Gemini CLI, …), the easiest path is to let it do the setup. In the project you want mitos in, give your agent:

text
Read https://github.com/dovahkiin-v/mitos/blob/main/SETUP.md and set up mitosfor this project. When done, run `mitos status .` from the project directoryand report the result.

What your agent will end up doing — the same steps a human follows, all in SETUP.md where you can read them first:

  • install the mitos CLI via pipx (from PyPI or this repository);
  • start a local Qdrant container (qdrant/qdrant on port 7333, isolated from any Qdrant you already run);
  • register the MCP server once for the whole machine, if it isn't registered already;
  • initialize the project workspace, which also registers the project by name;
  • ask you to set your API keys yourself (mitos set-key) — a Gemini key (required), and an Anthropic key for the conflict-audit layer (strongly recommended); the setup guide tells agents not to handle key values.

How much your agent asks along the way is governed by your own agent's settings, not by this prompt.

Manual setup

The same steps by hand — full detail in SETUP.md:

  1. Install (once per machine): pipx install mitos-adr
  2. Start Qdrant (once per machine, shared by all projects): docker compose up -d from this repo — mitos runs its own instance on :7333, so it never touches a Qdrant you use for other work.
  3. Register the MCP server (once per machine, recommended for agents): claude mcp add --scope user mitos -- mitos serve. One registration serves every project — see SETUP.md for what it costs, for other harnesses, and for why a leftover per-project .mcp.json entry has to go.
  4. Per project: mitos init from the project root, then mitos set-key --global <your-Gemini-key> (one key covers everything; get it at https://aistudio.google.com/app/apikey). Gemini is the tested embedding provider today; a multi-provider abstraction is on the roadmap.
  5. Verify: mitos status . → READY ✓.

mitos status . is the compass throughout: it says exactly what's done, what's missing, and what to do next for that project. With no project named, mitos status answers the other question — what does this machine have — listing every registered project and checking Qdrant.

Every command names its project. There is no default target: mitos init registers the project by name, and from then on each verb takes -p <name>, -p <absolute path>, or -p . from the project root (agents pass the same thing as a project argument). mitos projects lists what's registered, and mitos unregister <name> removes a registration (the workspace stays as it is). That is what lets one install and one MCP server serve every project on the machine without a call ever landing in the wrong corpus.

How it runs

Mitos is per-project — each project gets its own decision graph and its own Qdrant collections. Day to day, three verbs carry the loop (as MCP tools for agents, with CLI twins):

VerbWhen
surface_decisions (mitos surface)Before deciding — is there precedent? Every hit carries the alternatives that were already rejected and why.
record_decision (mitos record)The moment something is settled — the decision, the rejected paths, and how it relates to prior decisions (supersedes, amends, …).
query_decisions (mitos query)Looking something up by meaning (the MCP tool also by exact handle), or searching only the rejected options.

A few properties worth knowing:

  • The markdown is the source of truth. Every decision lands in decisions.md, and rotation moves committed entries into decisions/archive/; both are human-readable and greppable, and the graph and the search index are derived from them and can always be rebuilt from them (mitos rebuild).
  • A decision's axiom is never edited — it's superseded. The axiom and its mechanisms change only through a later decision that supersedes, corrects or amends it, and state (active / superseded / amended) is computed from those typed relations, so the history of why always survives. Commentary (rejected paths, context, scope) can be fixed in place with mitos amend-commentary.
  • It fails safe. If the search index or the embedding API is down, recording still works and search degrades to an honest text-match over the markdown — nothing blocks, nothing is lost, and degraded output says it's degraded.
  • It audits itself. The corpus sweep (mitos check -p .) finds decisions that silently contradict each other. The commit gate (mitos hook-install -p .) runs on git commit and holds a commit made after decisions were recorded until a check has been attempted, and --staged checks hand-authored entries still pending in decisions.md — see SETUP.md for the commit gate, the staged gate, and the CI and cron recipes.

Explore the rest with mitos --help — the help text doubles as the API reference.

Why it exists

Building software through intensive LLM design reviews produces architectural decisions faster than a person can track. One month of that working style produced close to 900 decision records in a single markdown file — no longer greppable, readable, or manageable by hand. Existing ADR tools are built for human teams logging the occasional decision; mitos is built for a solo developer whose AI assistants generate and consume decisions continuously.

If that's your way of working, project size doesn't matter much — the higher the decision volume, the faster mitos moves from comfort to necessity.

Development

bash
pip install -e '.[test]'MITOS_NO_LIVE_TESTS=1 pytest -m "not packaging" -n auto   # offline suite, parallel (~50s)pytest -m "not packaging"                                 # adds the live tier — serial onlypytest -m packaging                                       # real-install check: fresh venv + pip install

-n auto is safe for the offline suite and not for the live tier: the test-collection sweep is session-scoped, so parallel workers delete each other's Qdrant collections and the affected tests degrade to skips rather than failures.

The *_live.py suites and golden Layer B make real Gemini and Anthropic API calls against your own keys, and need Qdrant on :7333. They skip when no key is resolvable, so a fresh clone runs the fast path by default.

Keys resolve from the environment, a repo-root .env, or ~/.config/mitos/.env — so if you already use mitos, a test run can pick up your personal key and spend against it. Opt out explicitly:

bash
MITOS_NO_LIVE_TESTS=1 PYTHONPATH=. pytest -m "not packaging"

The canonical decision format lives in mitos/format-spec.md. License: Apache 2.0.

来源:README.md,提交 a4f744c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.20.0最新Oct 19, 2026
  2. v0.18.0Sep 18, 2026
  3. v0.17.3Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分