
Open-source security for AI coding agents: record, detect and block at the tool boundary, with a verifiable audit trail in the SIEM you already run.
Open-source security for AI coding agents.
Agentmetry records tool events reported by supported agent hooks and wrapped stdio MCP servers. It flags risky sequences, can block calls at supported hooks when you enable blocking, and keeps a verifiable audit trail you can forward to your SIEM.
Quick start · Docs · Schema · FAQ · Issues · Contributing · Sponsor
Ninety seconds, recorded from real agentmetry demo and agentmetry benchmark output on 0.9.4.
Watch it on agentmetry.ai.
Public alpha. Capture, sequence detection, and SIEM forwarding work. APIs and hook payloads can still change.
Security engineers and developers who want a record of what a coding agent did at the tool boundary: which agent, which session, which call, in what order.
It is a sensor. The open-source package is not a console. agentmetry dashboard reads the trail on this machine. Fleet questions are answered in the SIEM you forward to. A hosted fleet console is allowed for Agentmetry Enterprise. It exists as a prototype that runs on localhost and is not offered as a hosted service. The sensor never needs that service to record or to forward. See open-core split.
It does not see an unmanaged browser chat, an IDE with hooks off, or an MCP server reached over HTTP instead of the stdio proxy. That is CASB or gateway territory.
Python 3.11 or newer. No server and no config file.
pip install agentmetry && agentmetry demo
agentmetry doctor
agentmetry benchmark
To see the demo without installing anything, uvx agentmetry demo (with
uv) or pipx run agentmetry demo runs it from a
throwaway environment.
agentmetry demo replays a session through the real ingest path into a temp directory it deletes: a private-key read, a cloud key that DLP matches without storing the value, then a URL fetch. The sequence fires one critical credential-exfil. It then edits that finding and shows verify fail, re-hashes the file the way someone with the whole machine could, and shows verify pass again with a different chain head. That last step is what agentmetry anchor is for. Nothing is kept and nothing leaves the machine.
agentmetry doctor checks the install and exits 0 when nothing is broken. Warnings are expected on a fresh install: no trail yet, the orchestrator is not running, autostart is not registered.
agentmetry benchmark replays the detection corpus through the real rule engine and exits non-zero on a miss or a false positive. The figures it prints are below.
To check what the agents on this machine are about to depend on, before anything runs:
agentmetry scan # MCP servers your agents launch, and AGENTS.md / CLAUDE.md files left in Downloads or on the Desktop
agentmetry scan ~/.claude/skills # skills, rules and CLAUDE.md files: text that instructs the model instead of describing a tool
agentmetry scan npm:NAME # one package name, before you install it
agentmetry scan --preflight ./repo # startup hooks, project MCP and setup declarations
agentmetry scan --wheel ./example-1.0-py3-none-any.whl # Python startup declarations
It reads files and nothing else: it never starts a server or fetches a package. It exits 1 on a finding, and "no findings" means these checks found nothing, never that something is safe. The checks and their limits are in docs/scanner.md.
agentmetry demo --scenario hf replays the HF July 2026 patterns (credential-read-then-cloud-api and remote-staging-then-execute). --scenario all runs both.
An installed package keeps its trail, indexes, and API token in the user data directory: %LOCALAPPDATA%\Agentmetry on Windows, ~/.local/share/agentmetry on Linux, ~/Library/Application Support/Agentmetry on macOS. A git checkout keeps apps/orchestrator/data. AGENTMETRY_DATA_DIR overrides both. doctor prints the directory in use.
To record a real agent, then look at it:
agentmetry hooks install
agentmetry start
agentmetry dashboard
agentmetry dashboard opens a one-time sign-in link. The browser does not hold the API token.