Danus 是一个面向研究级数学问题的多智能体系统。它用事实图组织长程研究:主协调者掌握全局,多个工作者并行探索,独立检查者逐项把关,通过检查的结论和它们的依赖关系则保存在事实图中。这样,一项研究可以跨越许多轮探索继续向前,而不必把所有内容塞进一次对话。
Danus 值得继续研究,因为这套方法已经做出了可以核对的成果。
Danus 论文报告了六个研究级案例,横跨代数几何、奇点理论和组合数学。此后,本分支又被用于得到反驳 Yau–Tian–Donaldson 猜想的主要结果;相关论文明确记录了生成式 AI 的作用,其中包括 Danus。
在其中一次长程研究中,七个工作者约运行五天,事实图保存了 3,157 个已验证事实和 8,616 条依赖边,最深依赖链为 54 层;其中 664 个事实支撑最终定理,其余内容保留了更广的搜索和没有进入最终证明的路线。技术报告记录了这些案例的过程、人类介入和局限。
这些数字的意义不在于“生成得多”,而在于多条路线可以同时向前推进,局部结果经过检查后再累积,失败和绕路不会自动混进最终论证。
只是增加智能体数量,不会自然得到更好的研究。没有共同且可检查的记录,工作者会重复尝试、互相覆盖,还可能把未经检查的中间结论当成前提。
Danus 把职责分开:主协调者只负责全局路线,工作者提交具体结论和论证,独立检查者判断它们是否站得住,事实图只保存通过检查且依赖有效的结论。这套分工由工具权限和唯一写入路径执行,不是一句“请仔细检查”的提示词。
Danus 的成果说明这条路值得继续走。但要在它上面继续建设,还必须回答一些基础问题:未经检查的结论能否绕过规则,有缺口的论证能否被挡住,拒绝后能否修复,依赖失效后会发生什么,以及这套方法中哪些部分可以离开数学继续使用。
因此,我们没有一开始就重写 Danus,而是先用小而明确的案例攻击现有规则,看看哪些约束真的经得起检验。
这一轮验证和最小内核设计审查已经完成。其中几项任务直接决定了我们是否有理由继续建设:
- 权限隔离: 主协调者没有事实提交权,缺失或未知身份会被拒绝;分权因此不只是口头规定。
- 错误拒绝与修复: 修复发现的依赖检查缺陷后,复测中的空洞论证、明显错误、隐藏缺口、未支持前提和无效前驱均未成为有效事实;其中一项拒绝还根据原因完成了修复和重新提交。
- 从空项目跑到最终结果: 玩具案例和两个扩展案例都真实经过工作者、检查、事实写入和前后依赖;整条链不只在单元测试里成立。
- 检查通过不等于进入事实图: 内容即使通过检查,只要声明的依赖不存在,仍然不会成为事实。这项结果决定了下一版内核必须把“判断正确”和“接受为可依赖记录”分开。
- 撤销和换模型复核: 污染记录可以撤销,失效依赖不能继续支撑新记录;两个扩展案例还交给另一种模型做了独立只读复核。
这些结果支持我们进入下一步,但它们仍只是记录版本、配置和有限案例下的证据。
这轮研究把稳定部分收敛为三类记录和一个入口:Submission 记录一次提交,Receipt 记录检查判断和最终是否接受,AcceptedRecord 代表真正可以被后续依赖的内容,evaluate_and_admit 则是先检查、再决定是否接受的唯一入口。
下一阶段的重点是把这个最小内核实现出来,迁移现有记录,并为拒绝、修复、接受失败、依赖失效和撤销建立回归测试。然后再用一个小型非数学案例,检验它是否真的不依赖数学语义。
更远的目标是让同一个核心支持不同的协调者入口。Codex 与 Claude Code 的统一、部署和平台工程不会夹带进当前阶段。
- 模型检查不是形式化证明,Danus 的原始案例也包含人类指导、纠错和最终检查。
- 本仓库检验的是底层规则,没有重做或重新审查上述六个研究级成果。
- 最小内核目前只完成了设计审查,尚未实现,也没有经过非数学领域验证。
- Danus 论文:系统设计和六个研究级案例。
- Danus 技术报告:案例过程、人类介入和能力边界。
- Yau–Tian–Donaldson 猜想反例论文:使用 Danus 的后续研究成果。
- 研究计划:本仓库的研究问题、范围和判断标准。
- 证据台账:实验实际发生了什么,以及结论受哪些限制。
- 最小内核设计:三类记录、一个入口和证据映射。
- 系统结构:现有 Danus 各层的职责和约束。
🚀✨ News: This branch is the version that solved YTD. 🎉
Danus orchestrates mathematical reasoning agents with fact-graph memory. A main agent (codex) steers a swarm of autonomous codex workers that prove; a cold-start verifier is the sole authority on correctness: a result becomes real only once it passes. Verified results accumulate in a content-addressed fact graph — the system's only source of truth — and the main agent decomposes the problem and steers the swarm, reasoning itself (optionally via exploratory codex subagents). When you have the answer, Danus renders it into a human report or a publishable LaTeX paper.
Danus builds on the worker–verifier core of our earlier system Rethlas (arXiv:2604.03789). The paper and the technical report tell the full story: the system, six research-level case studies it resolved, and what we learned along the way.
See ARCHITECTURE.md for the layered design and the map of every module.
The workers and the verifier always run on codex. On this branch the main
agent (the orchestrator) also runs on codex, so you install nothing beyond
codex — no Claude Code. It reasons directly between rounds (optionally spawning
exploratory codex subagents) and authors its own master_guidance; there is no
external strategy-consult step. Runtime: AGENTS.md + .codex/config.toml +
.agents/skills/.
A separate main branch runs the
orchestrator on Claude Code instead (Fable as the orchestrator model, an
external strategy consult, and a CLAUDE.md + .mcp.json + .claude/skills/
runtime). It shares the same worker–verifier proof core. Use main if you
specifically want the Claude Code orchestrator.
The design follows a strict separation of powers: the main agent performs the global planning and coordination, the workers carry out the detailed proof search, the verifier is the sole authority on correctness, and the fact graph holds every verified result and is the system's only source of truth.
Each kind of agent carries out its role through its own skills and its own
role-gated set of tools, so the separation is enforced by construction, not by
prompts: the main agent has no fact_submit (the agent that steers the search
structurally cannot introduce unverified mathematics into the fact graph), and
the verifier writes nothing at all.
Every claim enters truth through one cycle:
A worker typically focuses on one claim at a time — a lemma, a counterexample, a toy example — rather than an entire proof. It repeatedly submits the claim with a supporting proof and revises it under the verifier's feedback until it passes, at which point the claim enters the fact graph as a fact, with the facts its proof depends on as its incoming edges. The verifier is stateless: a fresh instance judges each submission and retains nothing afterwards. Because each worker draws on only the facts it needs for its current claim and submits one fact at a time, the working context stays small even as the proof grows to many pages — and many workers' contributions accumulate into one shared structure.
The graph below is the fact graph of a real research run: 3,157 verified facts and 8,616 dependency edges, in dependency chains up to 54 facts deep (nodes darken and grow with dependency depth). The search was far broader than the proof it left behind: 664 facts form the supporting closure of the final theorem, and the clusters are separate lines of attack — among them conditional scaffolding that the final proof never cites, and an independent re-derivation of one of its bounds.
danus/ the engine (installable Python package)
core/ truth layer: content-addressed fact graph + typed memory + schema
gateway/ role-gated MCP server — the only door to the truth stores
verify/ cold-start proof-verifier HTTP service (the sole write-gate)
execution/ worker swarm: the autonomous per-worker round loop + scaffolding
orchestration/ the `danus` CLI verbs (list/new/assign/start/status/stop)
integrations/ arXiv theorem search
observability/ read-only dashboard
authoring/ shared one-shot isolated-codex driver for the two renderers below
write_paper/ write-paper MCP service (fact graph → publishable LaTeX paper)
human_summary/ human-summary MCP service (fact graph → progress-report PDF)
agents/ codex agent contracts (main/worker/verifier) + worker & verify skills
.agents/skills/ main-agent skills: elaboration · human-summary · initialize · write-paper
bin/ scripts/ config/ runtime layer (wrappers, bootstrap/services/doctor, env templates)
docs/ human docs: getting started · concepts · operating guide · security & trust · …
examples/ unattended-ops examples + a toy project
# 1. provision the toolchain (Node + venv + codex CLI) into runtime/
bash scripts/bootstrap.sh
# 2. configure — copy the templates and fill in YOUR keys (never committed)
cp config/danus.env.example config/danus.env
cp config/codex.env.example config/codex.env # BYO OpenAI-compatible endpoint + key
# 3. health check + bring up the verify service (REQUIRED for any proving)
bash scripts/doctor.sh
bash scripts/services.sh up verify
# 4. connect codex rooted at this repo dir; on first run it runs `initialize`.
# --dangerously-bypass-approvals-and-sandbox lets the main agent operate
# autonomously (no per-action approval prompts). That is the intended mode, but
# it means the agent acts with your shell privileges — run Danus on an isolated,
# disposable host, and read docs/security-and-trust.md first.
codex --dangerously-bypass-approvals-and-sandboxTo see the complete worker → verifier → fact-graph chain on a two-fact theorem, run the one-command tiny example.
Everything runs on your own keys (BYO). Workers and the verifier run on your codex
backend. The main agent steers by reasoning itself between rounds — optionally
spawning exploratory codex subagents — and publishes its own periodic direction
to the swarm as master_guidance.
Notes
-
Settle the stopping condition with the main agent before you start. By default the main agent keeps the swarm running until every target is proved and stops it on its own once they are (a hard or slow problem is not a reason to stop). Talk through what "done" means for your problem at the outset, so the swarm does not keep spending tokens past the point you cared about.
-
Give the writing system a few exemplar papers. Out of the box,
write-paperproduces a complete, compilable paper, but the prose can read like a stack of verified facts. In our experience the single highest-leverage fix is to provide a few papers of your own as exemplars when you ask for the write-up — the writer imitates them, and readability improves substantially.
- Three memory tiers, one correctness boundary: only the verifier-gated fact graph is truth; global memory is awareness.
- Permission is enforced by the MCP role table (main cannot
fact_submit; the verifier is read-only). - Content-addressed, cascade-revocable facts; the verifier is the sole write-gate.
- The finished paper is itself re-verified as written (a dedicated paper-math verifier reads the whole document) before delivery, on top of the per-fact verification.



