Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/machine-learning/ai-observability/guides/instrument-coding-agents.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/machine-learning/ai-observability/guides/instrument-coding-agents/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Instrument coding agents
Coding-agent plugins forward sessions from the coding agent you already use into AI Observability. Each session shows up there as generations, tool calls, and metrics.
Note
AI Observability is referred to as “Sigil” in plugin names, binaries, and configuration. For example, the shared CLI is
sigiland the shared configuration file is~/.config/sigil/config.env.
Supported coding agents
For the full list of supported coding agents and per-plugin install instructions, refer to grafana/sigil-sdk/plugins.
Before you begin
AI Observability is enabled on a Grafana Cloud stack. Refer to Use AI Observability on Grafana Cloud to enable the plugin and collect credentials.
The
sigilCLI is installed and on yourPATH:On Linux and macOS, use the install script:
Bashcurl -fsSL https://raw.githubusercontent.com/grafana/sigil-sdk/main/plugins/sigil/scripts/install.sh | shThe script downloads the latest release for your OS and architecture, verifies its SHA-256 checksum, and installs the binary to
~/.local/bin. Make sure that directory is on yourPATH.On macOS, you can also use Homebrew:
Bashbrew install grafana/grafana/sigilOn Windows, download the
windows_amd64orwindows_arm64zip from the releases page, extractsigil.exe, and put it on yourPATH.On any platform with Go 1.25 or later, you can use
go install:Bashgo install github.com/grafana/sigil-sdk/plugins/sigil/cmd/sigil@latestgo installputs the binary ingo env GOPATH/bin (orGOBIN). Make sure that directory is on yourPATH.
Configure credentials
Run sigil login, or run the launcher for your coding agent (such as sigil pi, sigil claude, or sigil codex). On the first launch, the launcher runs the same login flow automatically. Both write to ~/.config/sigil/config.env, the shared configuration file that every coding-agent plugin reads. Later launches reuse it, and you can re-run sigil login any time to change a value.
The interactive prompt has two steps:
- Connection details: your Grafana Cloud endpoint (the plugin’s API URL), tenant ID (the Instance ID), token, and OTLP endpoint. Find these in Grafana Cloud at
https://<your-stack>.grafana.net/plugins/grafana-sigil-app. - Preferences: content capture mode, session tags, and guards. Every field defaults to the plugin’s current behavior, so press Enter through this step to keep the defaults.
If you can’t run an interactive prompt (for example, in CI, a container, or a scripted setup), write the configuration file directly instead. Refer to Configure without the prompt.
Content capture
By default, plugins send only metadata: model, token usage, tool names, and timing. Prompts, responses, and tool I/O stay on your machine. To also send prompts and responses, with automatic secret redaction, set the Content capture field to Full when you run sigil login.
The modes are metadata_only (default) and full. You can also set SIGIL_CONTENT_CAPTURE_MODE directly. Refer to Configure without the prompt.
Enable guards
Guards run synchronous checks on tool calls before they execute. When guards are enabled, tool calls that fail evaluation are blocked. Refer to Set up guards for guard rule configuration.
Guards are off by default. To turn them on, set the Guards field in sigil login:
- Enabled, fail-open: transport errors and timeouts let the tool call through. This is the safer choice when you first turn guards on.
- Enabled, fail-closed: a guard error or timeout blocks the tool call.
The Guard timeout field sets how long to wait for a guard before applying the fail mode (default 1500 ms). Raise it to tolerate slow evaluators, or lower it to cap per-call latency. The timeout applies only when guards are enabled.
Configure without the prompt
sigil login is interactive and needs a terminal. For non-interactive setups, such as CI, containers, or dotfiles, write ~/.config/sigil/config.env directly. Each prompt maps to an environment variable:
# Connection (required)
SIGIL_ENDPOINT=https://sigil-prod-<region>.grafana.net
SIGIL_AUTH_TENANT_ID=<instance-id>
SIGIL_AUTH_TOKEN=glc_<token>
# OTLP endpoint for SDK traces and metrics (optional)
SIGIL_OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-gateway-prod-<region>.grafana.net/otlp
# Preferences (optional; defaults shown)
# Modes: metadata_only | full
SIGIL_CONTENT_CAPTURE_MODE=metadata_only
SIGIL_TAGS=team=ai,project=demo # applied to every generation
SIGIL_GUARDS_ENABLED=false
SIGIL_GUARDS_FAIL_OPEN=true # only used when guards are enabled
SIGIL_GUARDS_TIMEOUT_MS=1500 # only used when guards are enabledFind the connection values in Grafana Cloud at https://<your-stack>.grafana.net/plugins/grafana-sigil-app.
Verify
Run a turn in your coding agent, then open Conversations in the AI Observability plugin. The generation appears within a few seconds.
If nothing appears, enable debug logging and tail the log. For example, for Pi:
SIGIL_DEBUG=true sigil pi
tail -f ~/.local/state/sigil/logs/sigil.logCheck the following:
sigil --versionresolves on yourPATH.SIGIL_ENDPOINT,SIGIL_AUTH_TENANT_ID, andSIGIL_AUTH_TOKENare set in~/.config/sigil/config.env.- The access policy token has the
sigil:writescope.
Next steps
Was this page helpful?
Related resources from Grafana Labs


