Multi-Agent Registry 🤖
Unified detection, configuration, plugin, and chat history discovery registry for AI coding agent CLIs.
multi_agent_registry gives any tool a single place to ask "which AI coding agents are installed on this machine, where do they keep their config/plugins, and where did they leave their chat history?" — instead of every consumer re-implementing per-agent path guessing.
Installation
pip install multi-agent-registry
# or using uv
uv add multi-agent-registry
The PyPI distribution name is multi-agent-registry; the importable module name is multi_agent_registry:
import multi_agent_registry
Features
- Multi-Agent CLI Detection: A registry of 15 agent CLIs — Claude Code, Antigravity (
agy), OpenCode, GitHub Copilot, Grok Build, Cursor, Windsurf, Aider, Codex, Continue, Cline, Roo Code, Goose, ShellGPT, and Open Interpreter — with binary name, description, and config paths for each. - Installation & MCP Inspection:
inspect_agent_cli()/inspect_all_agent_clis()check whether each agent's binary is onPATH, whether it's registered as an MCP server, and whether a plugin is installed for it. - Chat Log Discovery:
discover_agent_chats()scans the on-disk chat log locations for agents that expose them (currently Claude Code, Antigravity, OpenCode, Aider, Cline, and Roo Code), with recursive-glob patterns pruned to skipnode_modules/.venv/.git/.gwtfor speed. - Chat Inspection Helpers:
get_chat_workspace()andget_chat_last_active()read each agent's own on-disk format to resolve which project a chat belongs to and when it was truly last active (not just file mtime). - Plugin Enable/Disable State: Per-agent plugin opt-out, persisted to
~/.config/task-agent/config.json, for tools that install agent-specific plugins/skills.
Quickstart
from multi_agent_registry import get_agent_cli_registry, discover_agent_chats, get_chat_workspace
# What agents does this machine have?
for agent_id, info in get_agent_cli_registry().items():
print(agent_id, info.name, info.binary)
# Where has Claude Code been chatting, and about which projects?
for chat in discover_agent_chats(agent_id="claude"):
workspace = get_chat_workspace(chat)
print(chat.path, "->", workspace)
API Reference
Registry & detection
from multi_agent_registry import AgentCLIInfo, get_agent_cli_registry, inspect_agent_cli, inspect_all_agent_clis
registry: dict[str, AgentCLIInfo] = get_agent_cli_registry()
info = registry["claude"]
info.id, info.name, info.binary, info.description
info.config_paths # list[Path] of possible config file locations
info.mcp_support, info.mcp_command_example
info.plugin_support, info.plugin_path, info.skills_path, info.plugin_template
info.chat_log_patterns # list[str] glob patterns, [] if not yet supported
info.chat_parser_type # "json" | "jsonl" | "markdown"
status = inspect_agent_cli("claude") # dict: installed, mcp_registered, plugin_installed, ...
all_status = inspect_all_agent_clis() # same, for every registered agent
Chat discovery
from multi_agent_registry import DiscoveredChat, discover_agent_chats
from pathlib import Path
# All chats for one agent, scanned globally (patterns rooted at ~ or /)
# or within specific project roots (patterns relative to a project).
chats: list[DiscoveredChat] = discover_agent_chats(
agent_id="aider", # omit to scan every agent
search_roots=[Path.home() / "repos"], # only used for project-relative patterns
)
# chat.agent_id, chat.path, chat.parser_type
Agents currently wired up for chat discovery: claude, agy (Antigravity), opencode, aider, cline, roo. The rest are registered for detection/config/plugin purposes but don't yet have chat_log_patterns populated — contributions welcome.
Chat inspection
from multi_agent_registry import get_chat_workspace, get_chat_last_active
get_chat_workspace(chat) # -> Path | None, the project dir the chat belongs to
get_chat_last_active(chat) # -> datetime | None, true last-message time (jsonl only for now);
# callers should fall back to file mtime when None
Global command allowlist
Every agent expresses "run this without asking" in its own dialect, in a global
config file that is not the MCP config_paths entry. permissions.py holds one
canonical list plus a renderer per dialect.
The list itself is plain text, one command per line, in
src/multi_agent_registry/allowlist/ — one file per tier. Edit them in any editor;
there are no CRUD commands to learn.
src/multi_agent_registry/allowlist/
inspect.txt # read-only; mutates nothing
build.txt # runs project-defined code (make, pytest)
network.txt # network egress (curl) -- opt-in
# inspect.txt
=pwd # leading "=" means the bare command only
=date
ls # no sigil: the command plus any arguments
git log
The tier is the filename, so it never repeats on a line. # starts a comment,
blank lines are ignored. Only inspect and build are granted by default.
That = is the one piece of syntax, and it exists because the dialects disagree
about matching semantics rather than just spelling: args="any" becomes Claude's
Bash(git log:*), OpenCode's {"git log": "allow", "git log *": "allow"} pair,
and Gemini's commandPrefix entry. Without it every renderer would have to guess
prefix-vs-exact, and they would guess differently.
from multi_agent_registry import (
load_allowlist, render_for_agent, diff_all_permissions,
)
render_for_agent("claude") # ['Bash(pwd)', 'Bash(ls:*)', 'Bash(git log:*)', ...]
render_for_agent("agy") # ['command(pwd)', 'command(ls)', ...]
for d in diff_all_permissions():
print(d.agent_id, d.surface.scope, len(d.missing))
| Agent | Global surface | Dialect |
|---|---|---|
claude |
~/.claude/settings.json → permissions.allow |
Bash(git log:*) |
agy |
~/.gemini/antigravity-cli/settings.json → permissions.allow |
command(git log) |
opencode |
~/.config/opencode/opencode.json → top-level permission.bash |
{"git log *": "allow"} |
gemini |
~/.gemini/policies/*.toml → commandPrefix |
["git log"] |
grok |
~/.grok/config.toml → [permission] allow |
Bash(git log:*) (also reads Claude's settings) |
copilot |
~/.copilot/permissions-config.json — per-directory only |
no global form |
The allowlist pipeline
Four stages. Each writes to its own place, so no stage can destroy another's work.
scrape -> normalize -> (you edit) -> push
mar permissions scrape # 1. harvest what every agent already allows
mar permissions normalize # 2. collapse into the canonical inter-lingua
mar permissions normalize --merge # append candidates to review.txt for triage
$EDITOR ~/.config/multi-agent-registry/allowlist/*.txt
mar permissions push # 4. dry run: what each agent would gain
mar permissions push --apply # merge it in, after a backup
1. Scrape reads every agent's allow rules — global and project-level, across
every repo — into one raw file per agent at
~/.local/share/multi-agent-registry/scraped/<agent>.txt. Machine-written, and
overwritten on each scrape. deny and ask rules are never harvested; pulling a
deny rule into an allowlist would silently invert it.
2. Normalize parses each native entry back into the canonical form (the inverse
of the renderers) and collapses it to its command head — so
git --no-pager log -n 10 --oneline --graph --all becomes git log. That is where
the list gets short enough to read.
Anything whose generalization would widen a grant goes to the review tier,
which is not in DEFAULT_TIERS and is never pushed: ssh host "<cmd>",
path-qualified binaries, compound commands. You promote them by hand.
3. You edit. Candidates land in review.txt; move lines into inspect.txt,
build.txt, or network.txt to grant them. Normalization only ever appends, so
a re-scrape cannot clobber an edit.
4. Push renders canonical entries in each agent's own dialect and merges them in — union, never replace, after a timestamped backup. Hand-added entries survive. Dry run by default.
Two layers of canonical list, and the split matters:
| Layer | Path | For |
|---|---|---|
| Shipped | src/multi_agent_registry/allowlist/ |
generic, safe, public |
| Machine-local | ~/.config/multi-agent-registry/allowlist/ |
anything with a hostname, IP, username, or personal path |
The overlay exists because the shipped directory goes into the wheel and onto PyPI.
A scraped ssh nuc01 in there would be permanent and public.
Inspect and diff from the CLI:
mar permissions # every agent, what's missing vs. canonical
mar permissions --agent claude # one agent
mar permissions --agent agy --render # emit that agent's native block
mar permissions --network # include the opt-in network tier
mar permissions is read-only — it never writes to an agent's config.
Notes for tools built on this library
- Absolute/home-relative
chat_log_patterns(e.g.~/.claude/projects/**/*.jsonl) are scanned once, globally —search_roots/project_dironly affects patterns relative to a project (e.g. Aider's**/.aider.chat.history.md). discover_agent_chats()shells out tofindfor bare recursive-filename patterns (pruning noise directories natively) rather thanglob.glob(recursive=True), which must fully traverse a tree before filtering — orders of magnitude faster on large repo trees.- Permission surfaces are tracked separately from
config_paths: for Claude Code the allowlist is in~/.claude/settings.jsonwhileconfig_pathspoints at~/.claude.json, and Copilot's real config root is~/.copilot/, not~/.config/github-copilot/. - Antigravity's
unsandboxed(x)is a strictly wider grant thancommand(x)— it escapes the terminal sandbox. Renderers emit onlycommand(x), but the diff treats an existingunsandboxed(x)as already covering it rather than pushing a redundant grant. get_chat_workspace()/get_chat_last_active()read each agent's actual on-disk message format (e.g. scanning forward past Claude Code's leading metadata-only jsonl lines for the firstcwd/timestamp) rather than assuming a fixed line/file layout.
Metadata
Release files for multi-agent-registry 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| multi_agent_registry-0.6.2.tar.gz | 47.3 kB | With provenance | Details for multi_agent_registry-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| multi_agent_registry-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for multi_agent_registry-0.6.2-py3-none-any.whl |
Total release size: 88.4 kB
Release files / multi_agent_registry-0.6.2.tar.gz
| Download URL | multi_agent_registry-0.6.2.tar.gz |
|---|---|
| Size | 47.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ff6c2829dfc726ae09962ed9a251ccdc75446f4635a82697a809849026ad1d3
|
|
BLAKE2b-256 checksum How to use checksums |
7e15375c6a1bd93c879bb2316b8b82921b95ee78fe765ab04e686cea87f513ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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 Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / multi_agent_registry-0.6.2-py3-none-any.whl
| Download URL | multi_agent_registry-0.6.2-py3-none-any.whl |
|---|---|
| Size | 41.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f7cd03ddece4df1093a411bc3fe4dec4b1e2a01d6d99ce5787b43e3738d1d2d
|
|
BLAKE2b-256 checksum How to use checksums |
cb78307e34516548fa4c58784a9daef03330e9eae259ade4750dbd8d9ce96bb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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 Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for multi-agent-registry 0.6.2
Provenance
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for multi_agent_registry-0.6.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.