agent-brain / agent-brain-plugin
AGENTS.md120 starsChanged 6 months agoMITView on GitHub
Agent-facing instructions for Grok Build, Codex, Cursor, and any host that loads this directory as a Claude-compatible or Agent Plugins 1.0 plugin. This is one plugin with one payload. commands/, agents/, and skills/ are shared by every host. Do not add host-specific copies of a skill. Host manifests point at the shared directories. Give the coding agent a local, project-scoped memory of the docs and code it works on: Plugin root variable in Claude and Grok plugin context: ${CLAUDE_PLUGIN_ROOT}. See…
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 repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- mastering-python-skillSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Search with BM25, vector, hybrid, graph, or multi mode.
- Very specific: line 38
Search before you read. Run agent-brain query "<question>" or the search_documents MCP tool, then open only the files the results name.
- Very specific: line 40
Check agent-brain status before a search.
- Very specific: line 42
Never edit .agent-brain/. It holds server state, indexes, and the API key.
- Very specific: line 43
Do not commit .agent-brain/.
≈ “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: agent-brain plugin
Agent-facing instructions for Grok Build, Codex, Cursor, and any host that loads this directory as a Claude-compatible or Agent Plugins 1.0 plugin.
Host compatibility
| Host | How this plugin loads |
| Claude Code | Native plugin: .claude-plugin/plugin.json, commands/, agents/, skills/ |
| Grok Build | Zero-config Claude plugin load. .grok-plugin/marketplace.json pins marketplace identity |
| Cursor | .cursor-plugin/plugin.json plus .cursor/rules/agent-brain.mdc. agent-brain install-agent --agent cursor writes .cursor/plugins/agent-brain/ |
| Codex | .codex-plugin/plugin.json. agent-brain install-agent --agent codex writes .codex/skills/agent-brain/ and an AGENTS.md block at the project root |
| OpenCode | agent-brain install-agent --agent opencode writes .opencode/plugins/agent-brain/ |
| Agent Plugins 1.0 | Root plugin.json, skills/, and mcp.json |
This is one plugin with one payload. commands/, agents/, and skills/ are shared by every host. Do not add host-specific copies of a skill. Host manifests point at the shared directories.
Mission
Give the coding agent a local, project-scoped memory of the docs and code it works on:
- Index Markdown, PDF, and source code into one corpus per project (
.agent-brain/). - Search with BM25, vector, hybrid, graph, or multi mode.
- Serve the corpus over REST, Unix domain socket, and MCP (stdio or Streamable HTTP with OAuth 2.1).
Component map
- Skills:
skills/using-agent-brain/SKILL.md(search) andskills/configuring-agent-brain/SKILL.md(setup) - Commands:
commands/agent-brain-*.md, one slash command per CLI operation - Agents:
agents/search-assistant.md,agents/research-assistant.md,agents/setup-assistant.md - MCP:
mcp.jsondeclares theagent-brain-mcpstdio server.AGENT_BRAIN_STATE_DIRselects the project - Cursor rules:
.cursor/rules/agent-brain.mdc
Plugin root variable in Claude and Grok plugin context: ${CLAUDE_PLUGIN_ROOT}.
Operating principles
- Search before you read. Run
agent-brain query "<question>"or thesearch_documentsMCP tool, then open only the files the results name. - Pick the mode by question type:
bm25for exact symbols,vectorfor concepts,hybridby default,graphfor callers and relationships,multifor a broad first pass. - Check
agent-brain statusbefore a search. Start the server withagent-brain startfrom the project root when it is down. - Reindex after large file moves:
agent-brain index <folder> --include-code. - Never edit
.agent-brain/. It holds server state, indexes, and the API key. - Do not commit
.agent-brain/. Keep it in.gitignore.
Skill routing
| User language | Skill or command |
| search, find, where is, who calls | using-agent-brain, /agent-brain-search |
| install, set up, configure provider, API key | configuring-agent-brain, /agent-brain-setup |
| index, reindex, add folder | /agent-brain-index, /agent-brain-folders |
| server down, status, jobs | /agent-brain-status, /agent-brain-start, /agent-brain-jobs |
Install
- Claude Code:
claude plugins marketplace add SpillwaveSolutions/agent-brainthenclaude plugins install agent-brain@agent-brain-marketplace - Grok Build: zero-config Claude plugin load
- Cursor, Codex, OpenCode:
agent-brain install-agent --agent <host> --with-mcp
See docs/HOSTS.md in the repository for the manifest each host reads and the MCP config target it writes.
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.

