advanced-reasoning-mcp
AGENTS.md12 starsChanged 6 months agoMITView on GitHub
Operational guide for AI agents using the advanced-reasoning MCP server. This file tells you when and how to call each tool. For human/dev setup, see README.md. A persistent reasoning workspace on top of sequential thinking: - A reasoning loop (advanced_reasoning) with confidence, reasoning-quality, meta-cognition, hypotheses, evidence, revisions, and branches. - A graph memory of your thoughts, organized into named libraries, searchable by TF-IDF relevance. - SystemJSON: structured, searchable documents for reusable workflows, instructions, and domain knowledge. Everything persists to memory_data/…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- .cursor/rules/codegraph.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Keep the returned session_id.
- Distinctive: line 95
Search and node operations always act on the current library.
- Very specific: line 118
Always thread the same session_id through one reasoning chain.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Advanced Reasoning MCP
Operational guide for AI agents using the advanced-reasoning MCP server. This
file tells you when and how to call each tool. For human/dev setup, see
README.md.
What this server gives you
A persistent reasoning workspace on top of sequential thinking:
- A reasoning loop (
advanced_reasoning) with confidence, reasoning-quality, meta-cognition, hypotheses, evidence, revisions, and branches. - A graph memory of your thoughts, organized into named libraries, searchable by TF-IDF relevance.
- SystemJSON: structured, searchable documents for reusable workflows, instructions, and domain knowledge.
Everything persists to memory_data/ on disk and is reloaded on restart, so
memory survives across sessions and conversations.
Mental model
library ──contains──> sessions + memory nodes (graph)
session ──groups──> a connected chain of thoughts toward one goal
node ──links to──> other nodes via builds_on / challenges edges
SystemJSON ──separate──> document store for workflows & reference dataA node ID looks like node_1753683441451_a1b2c3d4. A session ID looks
like session_<ts>_<rand>. You wire the reasoning graph by passing prior node
IDs into builds_on / challenges on later thoughts.
The core workflow
- Pick or create a library for the topic (optional but recommended for
multi-topic work). Default library is
cognitive_memory.create_memory_library { library_name }thenswitch_memory_library, or- just keep working in the current one.
- Create a session for the goal:
create_reasoning_session { goal }. Keep the returnedsession_id. - Reason step by step with
advanced_reasoning, passingsession_idevery call so thoughts persist. Capture the returnednodeIdof each step. - Link thoughts: on later steps, put earlier
nodeIds inbuilds_on(this step extends them) orchallenges(this step contradicts them). - Recall earlier insight anytime with
query_reasoning_memory { query }. - Save reusable procedures/data as SystemJSON for future sessions.
Persistence rule: a thought is stored only if you pass
session_id. Without it,advanced_reasoningstill runs and returns analysis, but nothing is written to memory. When in doubt, pass a session_id.
Tools
advanced_reasoning — the reasoning step
Required: thought, thoughtNumber, totalThoughts, nextThoughtNeeded.
Most useful optionals:
session_id— pass to persist this thought and get related-memory suggestions.confidence(0–1, default 0.5),reasoning_quality(low|medium|high, defaultmedium),meta_thought(reflect on your own reasoning).goal,progress(0–1).hypothesis,test_plan,test_result,evidence[]for hypothesis testing.builds_on[]/challenges[]— node IDs of prior thoughts to link to.isRevision+revisesThought, orbranchFromThought+branchIdfor revisions and alternative branches.
totalThoughts is a moving estimate — raise it as needed; set
nextThoughtNeeded: false on the final step.
Returns: nodeId (store it), edges (which links were made vs. missing IDs),
relatedMemories with their IDs (candidate builds_on targets), memoryStats,
and consistency_note when related thoughts exist.
create_reasoning_session — start a goal-scoped chain
{ goal, library_name? } → returns session_id. Do this before a multi-step
reasoning chain so the chain is grouped and persisted.
query_reasoning_memory — recall
{ query, session_id? }. TF-IDF search over node content in the current
library. Use before reasoning to avoid redoing work; use mid-chain to pull in
prior evidence. Returns nodes with IDs you can then builds_on.
Library management
create_memory_library { library_name }— names: letters/numbers/_/-only.switch_memory_library { library_name }— saves current state first.list_memory_libraries— names, node counts, last modified.get_current_library_info— active library + stats.
Search and node operations always act on the current library. Switch before querying if the knowledge lives elsewhere.
SystemJSON — structured documents
Separate from the memory graph. Use it for things you want to retrieve verbatim: checklists, multi-step workflows, config, domain facts.
create_system_json { name, domain, description, data, tags? }—nameis alphanumeric/_/-; fails if it already exists (no overwrite).get_system_json { name }— exact retrieval.search_system_json { query }— relevance-ranked matches.list_system_json— all documents by name/domain/description.
When to use what
- Exploring/deciding/debugging step by step →
advanced_reasoning(+ session). - "Have I reasoned about this before?" →
query_reasoning_memory. - A reusable recipe, checklist, or stable reference → SystemJSON.
- Separating unrelated projects/domains → distinct libraries.
Conventions & gotchas
- Always thread the same
session_idthrough one reasoning chain. - Pass real node IDs (from prior
nodeIdreturns) inbuilds_on/challenges; unknown IDs come back in themissinglist and create no edge. confidenceof exactly0is respected (it is not coerced to the default).- Names for libraries and SystemJSON must match
^[a-zA-Z0-9_-]+$. - Creates do not overwrite: pick a fresh name or read the existing one first.
- Set
DISABLE_REASONING_LOGGING=trueto silence the formatted stderr trace.
Storage layout
memory_data/
├── cognitive_memory.json # default library (nodes + sessions)
├── {library_name}.json # one file per named library
└── system_json/
└── {name}.json # one file per SystemJSON documentWrites are atomic and serialized, so concurrent auto-saves won't corrupt a file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

