OpenCode plugin that records LLM generations to Grafana Sigil for AI observability.
Hooks into OpenCode's chat lifecycle to capture assistant messages and send them to Sigil as generation telemetry. Tracks conversation context, tool usage, model metadata, and optionally full message content with PII redaction.
- Create
~/.config/opencode/opencode-sigil.json:
{
"enabled": true,
"endpoint": "http://localhost:8080/api/v1/generations:export",
"auth": { "mode": "none" },
"agentName": "opencode",
"contentCapture": true
}- Register the plugin in your OpenCode configuration.
none-- no authentication (local dev)bearer--{ "mode": "bearer", "bearerToken": "..." }tenant--{ "mode": "tenant", "tenantId": "..." }basic--{ "mode": "basic", "tenantId": "...", "token": "..." }
# From the repo root
pnpm install
pnpm --filter opencode-sigil build
pnpm --filter opencode-sigil testThe @grafana/sigil-sdk-js dependency resolves via pnpm workspace linking to sdks/js.