Short answer: AFK Guard is a command-line tool for people who run AI agents. Release 0.1.0 has three core commands, scan, canary and mcp-check, plus two extras, inject-check and dashboard. It needs Python 3.9+ and only the standard library. It makes no outbound network calls: the optional canary webhook only points at a listener you run yourself (canary listen binds to 127.0.0.1 by default).
Install
pip install afk-guard
afk-guard --helpTo pin this release: pip install afk-guard==0.1.0
Links: afk-guard 0.1.0 on PyPI · source on GitHub · v0.1.0 release notes.
What it does
scan: finds leaked credentials in files and directories using regex rules plus entropy. Values are redacted in all output: you see a[REDACTED]label, the rule name, a coarse length bucket and a short location fingerprint, never any characters of the credential.canary: plants fake, tempting credentials in a directory you name and watches whether anything touches them. It keeps a local log. An optional webhook callback (--callback-url) can point at a listener you run yourself withcanary listen. No signups and no vendor contact.mcp-check: checks OpenClaw and MCP client configs (Cursor, Codex, OpenClaw, genericmcpServersJSON or TOML) against a bundled advisory list taken from the AFK Cyber Desk feed.--pin-staterecords a pin and a content hash for each server and reports drift when that set changes.
Also included
inject-check: screens a text file or stdin for instruction patterns such as ignore-previous, marker file writes and tool-call requests. It is offline and deterministic, and it does not block anything.dashboard: writes one local HTML file (inline CSS and SVG, no network) from scan, canary, mcp-check or inject-check JSON.--exampleoutput is badged as example data.
Try it
afk-guard scan ~/projects --counts-only
afk-guard canary plant ./sandbox --kinds aws,github,env
afk-guard mcp-check ./repo --no-discover --pin-state .afk/mcp-pins.json
afk-guard inject-check ./untrusted/page.txt
afk-guard dashboard --example -o afk-guard-dashboard.htmlExit codes are CI-friendly: scan returns 1 when it finds a real credential, mcp-check returns 1 on an advisory hit or pin drift, and inject-check returns 1 when severity is high.
What it will not do
- A clean result does not mean you are safe. It means these rules found nothing in the files they looked at.
inject-checkonly matches a fixed list of instruction patterns. - It cannot see credentials in places it does not read, such as password managers, browser stores, memory or remote systems.
- It does not delete files, rotate credentials or rewrite your MCP configs. Rotate real credentials yourself.
- Entropy findings are guesses. Expect false positives on hashes, test data and minified code.
- Canary “accessed” uses file access time, which many systems disable. Treat it as low confidence unless a log or callback confirms it.
- It is not a certification and not a firewall.
About the advisory data
The bundled list in mcp-check comes from the AFK Cyber Desk feed. Titles, dates, CVE ids and source links are copied by id. Package names and fixed versions were transcribed by hand and are not independently verified, so where no fixed version is known the result says “check version”, never “safe”. Follow the source link before acting. This is described in the project README.
Stay in the loop
Get Agent Field Kit updates by email: one note per release.
AFK Guard is open-source software provided as is, under the Apache-2.0 license. It is a starting point for your own checks, not legal, security or compliance advice. Agent Field Kit is independent.