Skip to Content
OpenClaw GuidesInstrument OpenClaw

Instrument OpenClaw

The simplest OpenClaw integration pattern is:

  1. emit canonical events from your OpenClaw runtime
  2. confirm the event definitions appear in Chirpier
  3. chart the most important signals
  4. create policies for reliability, latency, and cost
  5. route alerts to Slack, Discord, Telegram, email, or webhook destinations

Start with a single agent, such as openclaw.main, and keep workflow-specific detail in meta.

If you are using chirpier-skills, export CHIRPIER_API_KEY first and start with the chirpier skill so OpenClaw follows the canonical naming and policy patterns.

Use canonical event names so your charts and policies stay consistent across tasks, agents, and deployments.

  • tool.calls.count
  • tool.errors.count
  • task.duration_ms
  • tokens.used
  • heartbeat.missed.count

JavaScript example

import { createClient } from "@chirpier/chirpier-js"; const client = createClient({ key: process.env.CHIRPIER_API_KEY! }); await client.log({ agent: "openclaw.main", event: "task.duration_ms", value: 420, meta: { task_name: "email_triage", workflow: "ops" }, }); await client.flush(); await client.shutdown();

Python example

from chirpier import new_client, Log client = new_client(api_key="chp_your_api_key") client.log( Log( agent="openclaw.main", event="task.duration_ms", value=420, meta={"task_name": "email_triage"}, ) ) client.flush() client.close()

Go example

client, _ := chirpier.NewClient(chirpier.Options{Key: "chp_your_api_key"}) defer client.Close(context.Background()) _ = client.Log(context.Background(), chirpier.Log{ Agent: "openclaw.main", Event: "tokens.used", Value: 1530, }) _ = client.Flush(context.Background())

Raw logging example

curl -X POST \ -H "Authorization: Bearer $CHIRPIER_API_KEY" \ -H "Content-Type: application/json" \ https://logs.chirpier.co/v1.0/logs \ -d '[ { "agent": "openclaw.main", "event": "tool.errors.count", "value": 1, "meta": {"tool_name": "browser.open"} }, { "agent": "openclaw.main", "event": "task.duration_ms", "value": 780, "meta": {"task_name": "daily_digest"} } ]'

First charts to build

After the events are flowing, create charts for:

  • tool error volume over time
  • task latency by task name
  • token usage by hour
  • missed heartbeats by day

The key design rule is that event names are the schema. Once you choose a stable event name, reuse it everywhere.

Last updated on