Tools
Collector
OpenClaw unified observability plugin — exports execution events to Langfuse-style schema v2
Configuration Example
plugins:
entries:
- id: our-collector-plugin
enabled: true
README
# OpenClaw Collector Plugin
Unified observability plugin for OpenClaw — exports execution events to a
Langfuse-style schema (v2) for custom trace dashboards.
## Schema
- **v2** — Full content storage (complete prompts, responses, tool results)
## Events Emitted
| Hook | Action | Notes |
|------|--------|-------|
| `before_agent_start` | `before_agent_start` | Session start, system prompt + messages |
| `llm_input` | `llm_input` | Prompt + history before each LLM call |
| `llm_output` | `llm_output` | Assistant response after each LLM call |
| `before_tool_call` | `tool_call` | Tool invocation started |
| `after_tool_call` | `tool_call` | Tool result (span.finished) |
| `agent_end` | `agent_end` | End of agent turn |
| `subagent_spawning` | `subagent_spawn` | Sub-agent spawned |
| `subagent_ended` | `subagent_ended` | Sub-agent finished |
| `run.finished` | `run.finished` | Session closed |
## Installation
Symlink into OpenClaw extensions directory:
```bash
ln -s /path/to/openclaw-collector-plugin \
/root/.openclaw/extensions/our-collector-plugin
```
Or set in `openclaw.yaml`:
```yaml
plugins:
entries:
- id: our-collector-plugin
enabled: true
```
## Configuration
| Env var | Default | Description |
|---------|---------|-------------|
| `AOD_EVENTS_PATH` | `.../artifacts/events-collector.jsonl` | Output file |
| `AOD_ENV` | `dev` | `env` field in events |
| `AOD_CHANNELS` | (all) | Comma-separated channel IDs to filter |
## Schema v2
```json
{
"schema_version": "v2",
"event_id": "evt_000001_abc123",
"event_time": "2026-04-03T12:00:00.000Z",
"trace_id": "tr_agent:planner:main",
"span_id": "sp_llm_000001_abc123",
"parent_span_id": null,
"action": "llm_input",
"status": "running",
"tool": null,
"usage": { "total_tokens": 1234, ... },
"meta": { "prompt": "...", "history_messages": [...] },
"tags": ["our-collector-plugin"]
}
```
tools
Comments
Sign in to leave a comment