Agent runtime protection
Heartbeat monitoring, skill scanning, and a live action timeline for your OpenClaw agents. Know your agent is alive, vet every skill before it installs, and see what it actually did.
THE PROBLEM
An autonomous agent is an unattended employee.
Agents run while you sleep: they install skills, call tools, touch files, and talk to APIs. A poisoned skill or a silent crash looks identical to normal operation, until an invoice goes to the wrong place or the agent has been down for a day and nobody noticed.
CanaryAgent adds a thin protection layer without changing your agent's core behavior. Heartbeats tell you it's alive and how busy it has been. The skill scanner catches prompt-injection payloads, backdoors, undeclared network calls, unsafe file access, and credential harvesting before installation. Every action lands in a timeline backed by CanaryShield and CanaryAudit.
HOW IT WORKS
Connect in three steps.
Make an API key
Settings, API keys, Generate. The key is shown once. The client learns your account from it, so a user ID is optional; the CanaryAgent workspace shows yours if you want to set it.
Put the key and the agent's name in your OpenClaw .env
CANARY_API_KEY and CANARY_AGENT_ID, which is how the agent is listed. No changes to your agent's own code.
Download canary_middleware.py
The whole client in one file, from the CanaryAgent workspace. It needs only httpx: pip install httpx. Call Agent.start_heartbeat() when your agent boots and log_action() as it works; call stop() on shutdown so a planned stop is not reported as a silent agent. Heartbeats and the action timeline start with the first beat.
WHAT YOU GET
Everything reports into the same console.
That's the whole integration. Heartbeats and action records never raise: each call returns a result saying whether it reached CanaryVaults, so a plan limit or an outage cannot take your agent down. A skill scan does raise, because a scan that did not run must never look like a pass. canary_middleware.py also keeps the four functions earlier versions of the file had, for agents that already call them.
QUESTIONS
- Does it change how my agent behaves?
- No. The client observes and reports: heartbeats, scan verdicts, and the action timeline. Your agent's core loop, tools, and prompts stay exactly as they are. Heartbeats and action records never raise into your agent, so the worst case there is telemetry you did not get; a skill scan raises when it could not run, so you never install on a verdict that was not given.
- What happens when a skill fails the scan?
- You get a verdict (safe, proceed with caution, or do not install) plus the specific findings: payloads, network calls, file access, credential patterns. The install decision stays yours.
FIELD NOTES
Reading that goes with this surface.
CANARYAUDIT · 7 MIN READ
Audit trails matter when AI agents can take action
If an agent writes files, calls APIs, or changes customer state, you need a record that survives dispute resolution and compliance review.
CANARYSHIELD · 4 MIN READ
Why prompt injection needs its own firewall
Prompt safety breaks when it is treated like generic moderation. Inspection has to sit before execution, not after.