Danus orchestrates mathematical reasoning agents with fact-graph memory. A main agent (Claude Code) 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.
$ npx -y skills add frenzymath/Danus --agent claude-code
What's inside
Danus orchestrates mathematical reasoning agents with fact-graph memory. A main agent (Claude Code) 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 a strategy loop (a strong reasoning model) decomposes the problem and steers the swarm. 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 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)
strategy/ consult gateway (elaboration โ strong model โ master_guidance)
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
.claude/skills/ main-agent skills: elaboration ยท consult ยท 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 Claude Code rooted at this repo dir; on first run it runs `initialize`.
# --dangerously-skip-permissions lets the main agent operate autonomously (no
# per-action permission 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.
claude --dangerously-skip-permissions
Everything runs on your own keys (BYO). Workers and the verifier run on your codex
backend; the strategy consult runs on a top-tier reasoning model over the gpt_pro
transport (paid), claude_api (the Anthropic API, per-token), or claude_code
(your Claude subscription), or off to skip it.
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-paper
produces 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.
fact_submit; the
verifier is read-only)..claude/
skills/
consult/
SKILL.md
elaboration/
SKILL.md
human-summary/
doctor.sh
examples/
odd-sum/
fact_graph/
facts/
fact_odd_recurrence.md
fact_odd_sum_main.md
fact_square_recurrence.md
PROBLEM.md
README.md
report.md
md2html.js
package.json
render_pdf.sh
SKILL.md
initialize/
SKILL.md
write-paper/
driver/
anchors_stale.sh
compile_verify.sh
latex_git_push.sh
seed_ledger.py
README.md
SKILL.md
templates/
PROJECT_BRIEF.md.template
REVISION_LOG.md.template
.github/
workflows/
ci.yml
.gitignore
.mcp.json
agents/
contracts/
main_agent.md
README.md
verifier.md
worker.md
skills/
human-summary/
REPORT_WRITER_PROMPT.md
verify/
check-referenced-statements/
agents/
openai.yaml
SKILL.md
synthesize-verification-report/
agents/
openai.yaml
SKILL.md
test_verification_schema.py
verify-sequential-statements/
agents/
openai.yaml
SKILL.md
worker/
check_conformance.py
construct-counterexamples/
agents/
openai.yaml
SKILL.md
construct-toy-examples/
agents/
openai.yaml
SKILL.md
direct-proving/
agents/
openai.yaml
SKILL.md
identify-key-failures/
agents/
openai.yaml
SKILL.md
obtain-immediate-conclusions/
agents/
openai.yaml
SKILL.md
propose-subgoal-decomposition-plans/
agents/
openai.yaml
SKILL.md
query-memory/
agents/
openai.yaml
SKILL.md
search-math-results/
agents/
openai.yaml
SKILL.md
verify-proof/
agents/
openai.yaml
SKILL.md
write-paper/
boilerplate/
acknowledgement.md
examples/
paper/
expected_main.tex
project/
fact_graph/
facts/
fact_odd_recurrence.md
fact_odd_sum_main.md
fact_square_recurrence.md
paper/
PROJECT_BRIEF.md
PROBLEM.md
README.md
README.md
roles/
AGENTS.md
PAPER_MATH_VERIFIER_PROMPT.md
PAPER_PLANNER_PROMPT.md
PAPER_REVISER_PROMPT.md
PAPER_SECTION_WRITER_PROMPT.md
PAPER_WRITER_PROMPT.md
REFERENCE_AUDITOR_PROMPT.md
REFERENCE_VERIFIER_PROMPT.md
STYLE_DISTILLER_PROMPT.md
style/
anchors/
README.md
PAPER_STRUCTURE.md
README.md
STYLE_GUIDE.md
ARCHITECTURE.md
bin/
codex
consult
danus
danus-mcp
human-summary-mcp
write-paper-mcp
CITATION.cff
CLAUDE.md
config/
codex.env.example
danus.env.example
latex-git.env.example
danus/
__init__.py
_mcp.py
authoring/
__init__.py
common.py
driver.py
tests/
__init__.py
_fixtures.py
fake_codex.py
test_common.py
test_driver.py
codex.py
core/
__init__.py
_util.py
bm25.py
DATA_MODEL.md
factgraph.py
global_memory.py
glossary_global.json
glossary.py
INTERFACES.md
local_memory.py
README.md
schema.py
tests/
__init__.py
test_core.py
execution/
__init__.py
__main__.py
layout.py
loop.py
README.md
scaffold.py
tests/
__init__.py
conftest.py
test_execution.py
test_loop.py
gateway/
__init__.py
__main__.py
README.md
roles.py
server.py
tests/
__init__.py
test_gateway.py
human_summary/
__init__.py
__main__.py
assemble.py
server.py
tests/
__init__.py
_fixtures.py
test_assemble.py
test_server.py
integrations/
__init__.py
matlas.py
README.md
tests/
__init__.py
test_integrations.py
observability/
__init__.py
__main__.py
app.py
README.md
static/
app.js
index.html
style.css
tests/
__init__.py
test_observability_main.py
test_observability.py
orchestration/
__init__.py
__main__.py
cli.py
README.md
tests/
__init__.py
conftest.py
test_cli_verbs.py
test_orchestration.py
strategy/
__init__.py
__main__.py
cli.py
config.py
ledger.py
README.md
tests/
__init__.py
test_claude_api_transport.py
test_claude_code_transport.py
test_strategy.py
transport.py
tests/
__init__.py
test_codex_env.py
test_codex.py
verify/
__init__.py
__main__.py
launcher.py
prechecks.py
README.md
service.py
tests/
__init__.py
fake_codex.py
test_launcher.py
test_prechecks.py
test_service.py
test_verify.py
write_paper/
__init__.py
__main__.py
assemble.py
paper_chunked.py
paper_math_verify.py
server.py
tests/
__init__.py
_fixtures.py
test_assemble_edge.py
test_assemble.py
test_chunked.py
test_multi_paper.py
test_paper_math_verify.py
test_reform.py
test_server.py
test_subgraph.py
docs/
assets/
agent-tools.png
architecture.png
fact-graph.png
verify-loop.png
cli-and-tools.md
concepts.md
configuration.md
getting-started.md
operating-guide.md
operations.md
security-and-trust.md
examples/
ops/
main-agent-tmux.sh
strategy-loop.sh
watchdog.sh
project/
fact_graph/
facts/
3b0c70d292e73ebe.md
8033e998b558da98.md
glossary.json
README.md
PROBLEM.md
README.md
LICENSE
OPERATOR.md
pyproject.toml
README.md
scripts/
bootstrap.sh
check-codex.sh
doctor.sh
env.sh
install-tex.sh
recover.sh
services.sh
setup-codex.sh
start-dashboard.sh
start-verify.shFAQ
danus is a Claude Code plugin with 17 hand-picked skills for agent orchestration work, indexed on Flowy. Install it with the command on its page. It includes consult, elaboration, human-summary. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.