OpenClaw plugin that automatically captures all LLM calls, tool executions, and messages to the GT8004 analytics dashboard.
Uses code-level hooks for 100% automatic capture — no manual instrumentation required.
Go to https://gt8004.xyz/register/openclaw and register your agent.
You'll receive:
- Agent ID (e.g.
openclaw-a1b2c3d4) - API Key (e.g.
sk_...)
Save these — you'll need them in Step 3.
git clone https://github.com/vataops/gt8004-openclaw-agent.git
openclaw plugins install -l ./gt8004-openclaw-agentAdd to your OpenClaw config file (~/.openclaw/openclaw.json), inside plugins.entries:
{
"plugins": {
"entries": {
"gt8004": {
"enabled": true,
"config": {
"agentId": "openclaw-a1b2c3d4", // from Step 1
"apiKey": "sk_..." // from Step 1
}
}
}
}
}openclaw gateway restartYou should see:
[GT8004] Plugin loaded. Agent: openclaw-a1b2c3d4, Endpoint: https://ingest.gt8004.xyz
Go to https://gt8004.xyz/agents/openclaw-a1b2c3d4 to see your analytics.
The plugin hooks into the following OpenClaw lifecycle events:
| Hook | Captured Data | GT8004 Mapping |
|---|---|---|
after_tool_call |
Tool name, params, result, duration | toolName, responseMs, requestBody/responseBody |
llm_output |
Model, provider, token count, cost | headers (x-model, x-tokens-*) |
message_sent |
Channel, message content | responseBody |
gateway_stop |
— | Flush remaining logs |
User Message
|
v
OpenClaw Gateway
|
+-- LLM Call -----> [llm_output hook] --+
| |
+-- Tool Exec ----> [after_tool_call] --+
| |
+-- Send Reply ---> [message_sent] -----+
|
v
BatchTransport
(in-memory buffer, 50 entries or 5s)
|
| POST /v1/ingest
v
GT8004 Platform
|
v
GT8004 Dashboard
gt8004.xyz/agents/{id}
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
agentId |
string | Yes | — | Agent ID from registration |
apiKey |
string | Yes | — | API Key from registration |
endpoint |
string | No | https://ingest.gt8004.xyz |
Ingest API endpoint |
debug |
boolean | No | false |
Enable debug logging |
To inspect transport activity, add "debug": true to your config:
"gt8004": {
"enabled": true,
"config": {
"agentId": "openclaw-a1b2c3d4",
"apiKey": "sk_...",
"debug": true
}
}Output:
[GT8004] Plugin loaded. Agent: openclaw-a1b2c3d4, Endpoint: https://ingest.gt8004.xyz
[GT8004] Sent 12 logs
You need to register first at https://gt8004.xyz/register/openclaw and add the credentials to your config file. See Step 1 & 3.
This is just a warning, not an error. The plugin loads normally without plugins.allow. You can safely ignore it.
- Verify
agentIdandapiKeyare correct - Set
debug: trueto see transport activity - Check network connectivity to
ingest.gt8004.xyz - Restart OpenClaw after config changes
MIT