pip install agent-doc==0.35.427 Copy PIP instructions
Interactive document sessions with AI agents.
Grok Build is supported through agent: grok, including managed interactive sessions and headless runs. Install its shared skill and MCP connection with agent-doc skill install --harness grok. See Grok Build setup.
Alpha Software — actively developed; APIs and frontmatter format may change between versions.
Supervisor freshness warnings are pane-local and refresh on binary-state changes, including child-preserving upgrades, without changing the child's turn title. Automatic editor layout sync retains proof of outgoing pane assignments across tab switches; layout-reuse invalidation does not erase controller ownership. Renaming a managed document preserves its live pane when the session identity has one unambiguous old-path owner, and editor routes await newer layout state that still covers the routed document instead of racing it with republication.
Single-user only. agent-doc operates on the local filesystem with no access control. Use a private git repository. See the Security section for details.
curl -fsSL https://raw.githubusercontent.com/btakita/agent-doc/main/install.sh | sh Alternatives:
# From PyPI pip install agent-doc # From a local source checkout cargo install --path src/agent-doc --force # Or from inside src/agent-doc cargo install --path . --force The PyPI package is a small, platform-independent bootstrap. On its first run it downloads the executable and FFI library for that exact package version from the matching GitHub Release, verifies the release's SHA256SUMS, and caches the two files under the user cache directory. Later runs work from that versioned cache.
The Rust workspace is an implementation detail: every agent-doc Cargo package is marked publish = false. New releases ship through GitHub Releases and PyPI; older crates.io uploads remain as immutable historical artifacts.
# 1. Initialize project (creates .agent-doc/ and installs SKILL.md) agent-doc init # 2. Scaffold a session document agent-doc init session.md "My Topic" # 3. Claim the document to the current tmux pane agent-doc claim session.md # Or provision a distinct pane in this project's current tmux session agent-doc claim another-session.md --new-pane # Or name the document agent-doc.md and start it without a file argument agent-doc init agent-doc.md "My Topic" agent-doc start # 4. Route hotkey triggers to the correct tmux pane agent-doc route --dispatch-only --plain-trigger --wait-for-ready 60 session.md # 5. Run: diff, send to agent, write response back agent-doc run session.md The typical edit cycle: write in your editor, trigger agent-doc route --dispatch-only --plain-trigger --wait-for-ready 60 via a hotkey, and agent-doc dispatches the plain agent-doc reopen into the right pane. Route observes Lazily current/typing state before it admits document work, and editor-triggered routing gives slow-starting supervisors a longer readiness window before surfacing a startup error. During that readiness window, route owns the pane input window, so supervisor queue drains and context-reset /clear / /new recovery wait instead of interleaving into the composer. That editor path always stays a bounded reopen send; it does not restart Codex just because the previous prompt was /clear.
For Coder, JetBrains Gateway, and VS Code Remote SSH setup, including terminal host precedence and headless failure behavior, see the Coder workspace terminal runbook.
agent-doc has a broad feature surface because the README doubles as a user guide and capability ledger. The reader-facing overview is grouped by workflow layer here; the exhaustive feature catalog is kept near the bottom so installation, architecture, editor setup, and security stay easy to scan.
flowchart LR user["User edits session document"] editor["Editor plugin or CLI"] route["route / sync / start / claim"] controller["Project controller\nactor + lease state"] tmux["tmux supervisor pane"] harness["Agent harness\nClaude / Codex / OpenCode"] preflight["preflight / plan\nrecover, diff, classify"] response["Agent response\npatch blocks"] finalize["finalize / write --commit\nstrict closeout"] sessionCheck["session-check\ninternal closeout guard / explicit diagnostic"] subgraph DocumentState["Document state"] doc["Markdown session document\nfrontmatter + components"] baseline["Snapshots + baselines"] capture["Durable captures"] cycle["Cycle state"] end subgraph BinaryCore["Rust binary core"] diff["diff + prompt contract"] template["template patch engine"] merge["CRDT / 3-way merge"] ipc["IPC-first editor patches"] git["selective git commit"] hooks["hooks + ops log"] end user --> editor --> route --> controller --> tmux --> harness editor --> preflight preflight --> diff --> harness harness --> response --> finalize finalize --> template --> merge --> ipc --> doc finalize --> git --> sessionCheck sessionCheck --> hooks doc baseline preflight --> cycle response --> capture diff --> doc template --> doc git --> baseline The binary owns all deterministic behavior: component parsing, patch application, CRDT merge, snapshot management, git operations, tmux routing, and IPC writes. The bundled skill / AGENTS instructions are the non-deterministic orchestrator layer — they read the diff, generate responses, and decide what to write.
For how concurrent agent writes and live editor keystrokes merge without splicing content across unrelated regions of the document, see Document Node-Merge Architecture.
See CLAUDE.md for the full module layout, stream mode details, and release process.
Large specs now split behind stable entrypoint files instead of growing indefinitely. For command behavior, start at specs/07-commands.md, which indexes the focused sibling specs for core commands, tmux/session behavior, closeout, and orchestration. For the authoring rule behind that split, see runbooks/split-spec-files.md. That runbook applies across agent-doc-managed harness instruction surfaces, while custom root instruction files stay opt-in unless they still match the generated baseline.
agent-doc plugin install jetbrains When multiple JetBrains IDE data roots exist, select the target explicitly for automation:
agent-doc plugin install vscode Or install from the VS Code Marketplace. Add a task with "command": "agent-doc run ${file}" and bind it to a keybinding.
Install editors/zed as a Zed dev extension. It starts the supplemental agent-doc zed-lsp server alongside Zed's normal Markdown support. Only buffers with valid, non-empty agent_doc_session frontmatter enter agent-doc mode; ordinary Markdown buffers are a strict no-op. See editors/zed/README.md.
nnoremap as :!agent-doc run % :e Domain Ontology agent-doc extends the existence kernel vocabulary with domain-specific terms.
Layout-owned provisioning stages new panes off-screen until the current layout places them. A late startup cannot add a third visible pane to a two-editor layout or select its intermediate window; existing sessions remain alive.
Codex Stop recovery uses the shared queue eligibility policy. A deferred review item cannot reopen a committed response merely because its queue line remains; eligible manual prompts still require document writeback.
agent-doc is designed for single-user, local operation. All session data (documents, snapshots, exchange history) is stored on the local filesystem and committed to a git repository.
Planned: Collaborative security for web/networked deployments (multi-user access control, session isolation, content scanning, compartmented access patterns).
This catalog is intentionally detailed. It records user-visible capabilities and workflow invariants that are useful for operators, release notes, and implementation audits, but it is no longer part of the first-screen README overview.
Licensed under either of MIT or Apache-2.0 at your option.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.




