← all surfaces
01 VAULTS02 RAG03 SHIELD04 HONEYPOT05 AUDIT06 AGENT
06CANARYAGENT

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.

agent monitorexample
support-agent-v2 ● heartbeat live
skill scan: invoice_helper.py → BLOCKED · credential harvest

last 10 actions · hash-sealed

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.

01

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.

02

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.

03

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.

✓Agent heartbeat monitoring✓Pre-install skill scanning✓Prompt-injection payload detection✓Backdoor + credential-harvest checks✓Live agent action timeline✓Built on CanaryShield + CanaryAudit
agent.pyintegration
# .env: CANARY_API_KEY=cv_...  CANARY_AGENT_ID=billing-agent  CANARY_USER_ID=<your-user-id> (optional)
import os
from canary_middleware import Agent

agent = Agent(os.environ["CANARY_API_KEY"], os.environ["CANARY_AGENT_ID"])
beats = agent.start_heartbeat(interval=60)      # a daemon thread; the agent is listed on the first beat
agent.log_action("export_invoices", "success")   # one sealed CanaryAudit record
verdict = agent.scan_skill("export-invoices", code)  # before the agent loads a skill
beats.stop()                                    # on shutdown: the last beat says "stopping"

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.

← PREVIOUS SURFACE

05 · Tamper-evident action log

NEXT SURFACE →

01 · Decoy identities

Put a watchdog next to your agent.

Free tier, no credit card.

Watch your first agent