usage

Agent Integration

Connect your coding agents to one local memory, so each of them starts from the same context instead of asking you to explain it again.

Updated

How it works

Docmancer installs Markdown skills or instructions that teach agents to recall, add, and inspect local memory, and to query indexed documentation when needed. The packaged local stdio MCP is a separate transport over the same local services.

Agents on the same machine share the same local memory index and durable records when they use the same Docmancer home.

Use docmancer agent install <agent> to connect an agent and docmancer agent refresh to rebuild the bounded projections delivered to already-installed agents. Use docmancer agent remove <agent> --hooks or --capture-hooks to remove those hook integrations independently.

docmancer setup does the initial discovery, indexing, and connection in one confirmed step. Later combination happens during explicit sync, lifecycle capture, and the local app's background jobs; run docmancer agent refresh when you want to refresh installed agent surfaces explicitly.

Install for a specific agent

docmancer agent install claude-code

Supported agents and where each skill lands:

AgentSkill / instructions location
Claude Code~/.claude/skills/docmancer/SKILL.md and ~/.claude/skills/docmancer-memory/SKILL.md, plus a managed block in ~/.claude/CLAUDE.md
Cursor~/.cursor/skills/docmancer/SKILL.md + an AGENTS.md block when needed
Cline~/.cline/skills/docmancer/SKILL.md
Codex~/.codex/skills/docmancer/SKILL.md (also mirrored to ~/.agents/skills/docmancer/SKILL.md for compatibility)
Codex App~/.codex/skills/docmancer/SKILL.md (Codex app variant)
Codex Desktop~/.codex/skills/docmancer/SKILL.md (Codex desktop variant)
Gemini~/.gemini/skills/docmancer/SKILL.md
GitHub Copilot~/.copilot/copilot-instructions.md (user) or .github/copilot-instructions.md (with --project)
OpenCode~/.config/opencode/skills/docmancer/SKILL.md
Claude Desktop~/.docmancer/exports/claude-desktop/docmancer.zip: upload via Customize > Skills

Project-local installation

Install the skill or instructions file in the current project instead of globally. Supported for Claude Code, Gemini, Cline, and GitHub Copilot:

docmancer agent install claude-code --project
docmancer agent install gemini --project
docmancer agent install cline --project
docmancer agent install github-copilot --project

This writes the file under .claude/skills/ (or .gemini/skills/, .cline/skills/, or .github/copilot-instructions.md) in your project directory. Useful when different projects need different Docmancer configurations, or when you want the file committed to version control.

Automatic recall with hooks

For Claude Code and Codex, Docmancer goes beyond skill files and puts relevant memory into context automatically. Confirmed docmancer setup installs these hooks for both agents. Adding --hooks to an explicit install does the same thing on its own: local SessionStart and UserPromptSubmit hooks that run a fast query against the local index and return only the top relevant source-attributed entries.

docmancer agent install claude-code --hooks
docmancer agent install codex --hooks

The hook path is local, project-aware, and bounded. It includes matching project and global memory while excluding unrelated projects. Weak matches, malformed input, and timeouts stay silent. Codex may require review and trust through /hooks.

Remove hooks without touching the skill files:

docmancer agent remove claude-code --hooks
docmancer agent remove codex --hooks

Capture is installed and removed independently of recall, so --hooks never changes it in either direction:

docmancer agent install claude-code --capture-hooks
docmancer agent install codex --capture-hooks
docmancer agent remove claude-code --capture-hooks
docmancer agent remove codex --capture-hooks

Capture stores the extracted durable conclusions rather than raw transcripts. See Automatic memory for the events and extraction rules.

Install all agents at once

Use the setup command to detect and install for every agent present on the machine:

docmancer setup --all

Verify installation

Check which agent skills are installed and healthy:

docmancer status

Local MCP

MCP is an alternative transport over the same local services, not a second memory store. Install the extra, then write the client config:

pipx install "docmancer[mcp]"
docmancer mcp install claude-code
docmancer mcp install codex
docmancer mcp install claude-desktop
docmancer mcp doctor

The server exposes grounded ask_memory, canonical-memory reads and pinning, hash-guarded write, edit, move, duplicate, trash, and restore, memory and docs search, common memory, delivery and projection inspection, and the decision timeline. Mutating tools carry explicit annotations and confirmation boundaries.