[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K8GY2C5H8Y6TYPKZQM2NM0":3,"skill-same:01M6K8GY2C5H8Y6TYPKZQM2NM0":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6K8GY2C5H8Y6TYPKZQM2NM0","setup-coding-agent",null,"Set up Grafana Agent observability for a coding agent (Claude Code, Codex, Copilot CLI, Cursor, OpenCode, pi, Vibe, or experimental Kiro CLI) with the agento11y binary: install it, save credentials, wire the agent, verify a session reaches Grafana Cloud, and diagnose a broken pipeline. Use when the user says \"set up agento11y\", \"monitor my coding agent\", \"agento11y doctor says something is wrong\", \"my sessions do not show up in Grafana\", or asks why conversations arrive but analytics stay empty.","grafana\u002Fagento11y","grafana","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7195757?v=4","01M6K8G36RMMASYFHK68G3K6QG","Grafana Labs","01M6K8G3B78F5DVKGT1HS2VDAB",133,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fagento11y\u002Finternal\u002Fskills\u002Fcontent\u002Fsetup-coding-agent\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,9,38],"coding agent","setup coding agent","coding","setup","install","when","cli","conversations","kiro","show","agent observability","opencode","up","broken","copilot","why","credentials","SET","pipeline","code","2026-11-10 10:12:30",false,"---\nname: setup-coding-agent\ndescription: >-\n  Set up Grafana Agent observability for a coding agent (Claude Code, Codex,\n  Copilot CLI, Cursor, OpenCode, pi, Vibe, or experimental Kiro CLI) with the agento11y binary:\n  install it, save credentials, wire the agent, verify a session reaches\n  Grafana Cloud, and diagnose a broken pipeline. Use when the user says \"set\n  up agento11y\", \"monitor my coding agent\", \"agento11y doctor says something\n  is wrong\", \"my sessions do not show up in Grafana\", or asks why\n  conversations arrive but analytics stay empty.\n---\n\n# Set up a coding agent with Grafana Agent observability\n\nGrafana Agent observability records model calls, tokens, timing, tool names, and\nreported or estimated cost. Conversation content is opt-in. The `agento11y`\nbinary launches agents and hosts hook-based integrations; pi and OpenCode export\nin process. This path installs and configures the integration. It never changes\nthe user's application code.\n\nDo the steps the machine's current state calls for, not all five. Step 1 says\nwhere to start: a machine that needs one credential re-saved does not need a\nreinstall, and a working setup the user asked a question about needs no changes\nat all.\n\n## Rules\n\n1. **Never mint, generate, or guess a credential.** The token is a Grafana Cloud\n   access-policy token that only the user can create. Ask for it, or tell the\n   user where to click. A made-up token produces a 401.\n2. **Never invent an endpoint URL.** The API URL and the OTLP endpoint come from\n   the setup page of the user's own stack (Step 3). Do not assemble one from the\n   stack name; regions differ.\n3. **Never print or echo a token, and never ask for the environment block in\n   chat.** The block carries a live token, and this conversation can be\n   exported. The user pastes it into login's prompt or passes `--env-file \u003Cfile>`\n   (`-` for a pipe). A token you pass yourself goes in with `--token-stdin`.\n4. **Do not edit application code.** Adding SDK calls to the user's app is a\n   different job (\"Path B\"). If the user wants their own app or agent\n   instrumented, stop and hand off to the `agento11y-instrument` skill, which\n   ships with the `gcx` CLI (`gcx agent skills install agento11y-instrument`).\n5. **Ask before enabling full capture or guards, or adding recipients.** Default `metadata_only` generation exports exclude prompts, responses, and tool I\u002FO; `full` sends them to every enabled recipient, not just `primary`.\n   Guards send evaluated content only to `AGENTO11Y_ENDPOINT` regardless of capture mode. Local mode always stores full content locally.\n\n## Step 1: Read the current state\n\nRun this first, every time, before changing anything:\n\n```sh\nagento11y doctor --json\n```\n\nIf the command is not found, the binary is not installed: go to Step 2.\n\nBranch on these fields. The JSON also reports auto-update state:\n\n| Field | Meaning | Where to go |\n| --- | --- | --- |\n| `agento11y.version` | The installed build. `dev` is an unstamped build, including one installed with `go install`. Always present when the command runs. | command not found: Step 2 |\n| `config.exists` | Whether the resolved config file exists. | `false`: Step 3 |\n| `conversations.status` | The transcript pipeline: `ok`, `warning`, `error`. | `error`: Troubleshooting |\n| `analytics.status` | The OTLP metrics and traces pipeline. | `error`: Troubleshooting |\n| `agents[]` | One entry per coding agent, with `install_state` and `on_path`. | target agent `not_installed`: Step 4 |\n\nCursor is hook-based. `install_state: installed` means every agento11y Cursor\nhook is present in `~\u002F.cursor\u002Fhooks.json`; `not_installed` means one or more is\nabsent. Run `agento11y cursor install` when the user wants Cursor wired;\nre-running it is safe.\n\n`agento11y doctor` exits 1 when conversations, analytics, or config is in\n`error`. The agent list never fails the command: an agent the user does not have\nis reported, not treated as a problem.\n\nRun `agento11y doctor` without `--json` when you want the human report, and\nshare `--json` output when the user asks for something to send to support. The\nJSON never contains the token value. It can contain a short token-scheme prefix,\nsuch as `glc_`.\n\n## Step 2: Install the binary\n\nPick one method that matches the platform and how the user installs other tools.\n\n**Quick install (Linux and macOS):**\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgrafana\u002Fagento11y\u002Fmain\u002Fplugins\u002Fagento11y\u002Fscripts\u002Finstall.sh | sh\n```\n\nThe script downloads the latest release for the OS and architecture to `~\u002F.local\u002Fbin`. It verifies the SHA-256 when `sha256sum` or `shasum` is available; otherwise it warns and continues.\nRe-run it to upgrade. `INSTALL_DIR` changes the directory and `VERSION` pins a release.\n\n**Homebrew (macOS):**\n\n```sh\nbrew install grafana\u002Fgrafana\u002Fagento11y\n```\n\nUpgrade with `brew upgrade grafana\u002Fgrafana\u002Fagento11y`.\n\n**mise:** `mise use -g aqua:grafana\u002Fagento11y@latest` (requires [mise shell activation](https:\u002F\u002Fmise.jdx.dev\u002Fcli\u002Factivate.html) so `agento11y` is on `PATH`).\n\n**Go install (any platform with Go 1.26.9+):**\n\n```sh\ngo install github.com\u002Fgrafana\u002Fagento11y\u002Fplugins\u002Fagento11y\u002Fcmd\u002Fagento11y@latest\n```\n\nThis writes to `go env GOPATH`\u002Fbin, or `GOBIN` when set. On Windows the other\noption is the `windows_amd64` or `windows_arm64` zip from the releases page:\nextract `agento11y.exe` and put it on `PATH`.\n\nWhichever method you use, the install directory has to be on `PATH`. Check the\nresult:\n\n```sh\nagento11y --version\n```\n\nThe command was renamed from `sigil`. The quick installer and Homebrew also\ninstall a `sigil` alias. `go install` installs only the binary you name. The old\nname will be removed in a future release, so do not write new instructions\nagainst `sigil`.\n\n## Step 3: Choose a destination\n\nA first `agento11y login` asks where sessions go: **Local only** needs no Cloud credentials and never forwards; **Grafana Cloud** continues to credentials. Its **Local web UI** preference defaults to **Yes** and remembers an earlier answer: **Yes** keeps a full local copy and forwards a Cloud copy; **No** sends directly to Cloud.\n\n### The paste flow\n\nTell the user to run `agento11y login` in their own terminal, then wait. You\ncannot drive it yourself: it needs a terminal, and the block it asks for holds a\nlive token that must not pass through this conversation. The destination question\nappears only when no destination or credentials are saved. A\nsaved Cloud connection starts at step 2.\n\n1. **Where should sessions go?**: a two-option list. **Local only** saves local\n   mode and ends the flow. **Grafana Cloud** continues with the steps below.\n2. **Grafana Cloud connection**: shown when both the stack URL and credentials\n   are saved. **Keep this connection** is the default; **Change connection** continues below.\n3. **Your Grafana Cloud URL**: the Grafana they open in a browser, for example\n   `https:\u002F\u002Fmystack.grafana.net`. The field arrives pre-filled from the stack an\n   earlier run saved or from a gcx configuration, and becomes a list when more\n   than one is known. It only builds the links below; it is never the ingest\n   endpoint.\n4. Login prints `https:\u002F\u002F\u003Cstack>\u002Fa\u002Fgrafana-agento11y-app\u002Fsetup-coding-agent` and\n   tries to open it in a browser. That page has three steps: create an API token,\n   copy the connection settings, and paste them back in the terminal. The page\n   creates the token when the user has permission and the stack supports it.\n   Otherwise it links to Cloud Access Policies and accepts an existing token.\n5. **Paste from Grafana**: the whole block goes into this one masked field, which\n   fills the endpoint, instance ID, token, and OTLP settings, and presets the\n   automatic tag answers when it sets them. Login asks only for what is missing.\n   Pasting is optional: Enter on the empty box types the values one by one.\n6. **Preferences**: local web UI, content capture mode, session tags, guards and their timeout, and automatic tags. Enter keeps each answer. The web UI always stores full content locally; forwarding sends full content in Full mode and metadata otherwise.\n   Read Rule 5 before enabling full capture or guards, and **Automatic tags** before enabling automatic tags.\n\nThe copied block has concrete values in this shape:\n\n```dotenv\nAGENTO11Y_ENDPOINT=https:\u002F\u002Fagento11y-prod-\u003Cregion>.grafana.net\nAGENTO11Y_PROTOCOL=http\nAGENTO11Y_AUTH_MODE=basic\nAGENTO11Y_AUTH_TENANT_ID=\u003Cinstance-id>\nAGENTO11Y_AUTH_TOKEN=glc_...\nOTEL_EXPORTER_OTLP_ENDPOINT=https:\u002F\u002Fotlp-gateway-prod-\u003Cregion>.grafana.net\u002Fotlp\nOTEL_EXPORTER_OTLP_HEADERS='Authorization=Basic \u003Cbase64-value>'\n```\n\nWithout OTLP, default HTTP conversations work but Cloud analytics does not. Local recording and analytics need no Tempo or Cloud credentials. Login rejects placeholders; flags can replace pasted values. A pasted block fills in the form's preferences, such as content capture, guards and automatic tags, which the user can still change, and login saves the block's other settings. Login ignores a pasted auth mode other than `basic`, `AGENTO11Y_HEADERS`, and the guard timeout: guard checks use them and fail open, so any of them could let every tool call through. It also skips a key that chooses what agento11y runs or loads, where it sends anything but the stack's data, the agent name or version, or the user ID, a value that turns off secret redaction, TLS, guards, a fail-closed guard, or updates, or turns usage stats on, a name that is not upper case, and any name it does not know; it saves the rest, names the skipped keys on stderr, and exits 0. A block's endpoint, OTLP endpoint and stack URL must use https unless they are on this machine (see the README). `--env-file \u003Cfile>` (`-` for a pipe) never prompts: the block and the flags must supply the endpoint, instance ID, and token, and a setting the block leaves out keeps its saved value. Flags beat the block's values, and `--token-stdin` can supply a token the file leaves out. Configure experimental OTel through the environment or `config.env`, as described in the Reference. Existing config keys stay.\n\nFor default HTTP capture and analytics, one token needs `sigil:write`, `metrics:write`, and `traces:write`. Generated policies can include extra scopes; the HTTP integrations use only these three.\n\n### The flags\n\n`--endpoint`, `--tenant`, and a token together skip destination and value prompts, including over SSH, in a devcontainer, or a script. A failed credential check can still prompt on an interactive terminal. Use only values the user has already given you.\n\n```sh\nprintf %s \"$TOKEN\" | agento11y login \\\n  --endpoint https:\u002F\u002Fagento11y-prod-\u003Cregion>.grafana.net \\\n  --tenant \u003Cinstance-id> \\\n  --token-stdin \\\n  --otlp-endpoint https:\u002F\u002Fotlp-gateway-prod-\u003Cregion>.grafana.net\u002Fotlp\n```\n\nBefore writing, login sends one credential-check request and reports the result. On failure it asks whether to save interactively; with nonterminal stdin it writes nothing and exits 1. Pass `--yes` to save regardless or `--no-verify` to skip the check. Preferences have no flags.\n\nLogin writes the resolved config path, retaining `sigil\u002Fconfig.env` under the same config root if only that legacy file exists. You can write it by hand instead:\n\n```dotenv\nAGENTO11Y_ENDPOINT=https:\u002F\u002Fagento11y-prod-\u003Cregion>.grafana.net\nAGENTO11Y_AUTH_TENANT_ID=\u003Cinstance-id>\nAGENTO11Y_AUTH_TOKEN=glc_...\nAGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT=https:\u002F\u002Fotlp-gateway-prod-\u003Cregion>.grafana.net\u002Fotlp\n```\n\nA hand-written file needs no OTLP auth header: absent `Authorization` in `OTEL_EXPORTER_OTLP_HEADERS`, the launcher builds Basic authorization from the tenant ID and the first available OTLP or ingest token.\n\n## Step 4: Wire the coding agent\n\nSix agents launch through `agento11y \u003Cagent>`. A first run asks where sessions go\nas Step 3 describes, and **Local only** there starts the receiver for that launch.\nThe command then installs the host integration and replaces itself with the agent.\nIt asks nothing when local mode is already on (`--local` or `AGENTO11Y_LOCAL=true`)\nor when stdin is not a terminal. Existing integrations follow the **Auto-update**\nrules in the Reference.\n\n| Agent | Command | Mechanism |\n| --- | --- | --- |\n| Claude Code | `agento11y claude` | shared Go binary, plugin `agento11y-claude-code` |\n| Codex | `agento11y codex` | shared Go binary, plugin `agento11y-codex` |\n| Copilot CLI | `agento11y copilot` | hooks shared with Copilot Chat in VS Code |\n| OpenCode | `agento11y opencode` | installs `@grafana\u002Fagento11y-opencode`; OpenCode 1.3.13 to 1.x or 2.0.22 to 2.x, other releases are refused; OpenCode 2 sessions get `--standalone` so a private server inherits launcher settings |\n| pi | `agento11y pi` | installs `@grafana\u002Fagento11y-pi` |\n| Vibe | `agento11y vibe` | shared Go binary via `hooks.toml` |\n| Kiro CLI 3 (experimental) | `agento11y kiro -- chat` | current workspace hooks; prompts\u002Ftools only, no assistant text, model usage, cost, or guards |\n\nAfter the first `agento11y codex` launch, open `\u002Fhooks` inside Codex and trust\nthe agento11y hooks. Codex does not export turns until the user completes this\nmanual step, and doctor cannot detect whether they did.\nVibe hooks are experimental. The launcher enables them in the child process, so\nlaunch Vibe through `agento11y vibe` for capture.\n\n**Cursor is the exception.** It is a GUI application with no launcher, so wire\nit directly:\n\n```sh\nagento11y cursor install     # merges the hook into ~\u002F.cursor\u002Fhooks.json\nagento11y cursor uninstall   # removes it\n```\n\nOn macOS and Linux, re-run `agento11y cursor install` after moving the binary;\nCursor's hook stores its absolute path.\n\nFor managed macOS deployment, after the administrator has placed the connection file for the target user, use `agento11y claude install --json` and `agento11y cursor install`; neither launches a host. `missing_host` for Claude means rerun after Claude Code is installed for that user.\n\nArguments after `--` go to the underlying CLI unchanged:\n\n```sh\nagento11y claude -- --resume\n```\n\nSuggest the user alias the prefix (for example `alias claude='agento11y claude'`)\nonly if they ask; silently shadowing their agent command is surprising.\n\n## Step 5: Verify\n\n1. Run the agent for one turn. Any prompt will do.\n2. Open Grafana Cloud, then Agent Observability, then **Conversations**. It\n   usually appears within a few seconds; if it does not, continue to step 3.\n3. If nothing appears, run `agento11y doctor`. For Codex, also confirm that the\n   user trusted the hooks from `\u002Fhooks`. Read launcher stderr for lines starting\n   with `agento11y:`.\n\nFor local capture, run `agento11y local open`. Check **Sessions** and **Analytics > Overview**. Optionally check **Analytics > Skills** after a recognized skill-load attempt in Claude Code, Pi, or OpenCode. For Cloud, confirm conversations and analytics separately. With default HTTP capture, conversations can arrive while Cloud **Analytics** stays empty. Check OTLP when that happens.\n\n## Troubleshooting\n\nRun `agento11y doctor` first. It is read-only. It validates the required generation settings before probing the selected generation transport and reporting the HTTP status. With an OTLP endpoint configured, it sends separate metrics and traces probes and reports their HTTP statuses. With OTel selected, it checks opt-in and the trace route. A successful OTLP probe verifies transport and authentication, not generation ingestion. Read each probe message; some non-success responses are warnings.\n\n### The two pipelines\n\nDefault HTTP capture uses separate pipelines. Experimental OTel generations share the trace route.\n\n- **Conversations** use `AGENTO11Y_ENDPOINT`, `AGENTO11Y_AUTH_TENANT_ID`, and `AGENTO11Y_AUTH_TOKEN` by default (`sigil:write`). With experimental OTel selected, Go producers use the configured OTLP trace route.\n- **Analytics** (the metrics and traces) export over\n  `AGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT`, or the vendor-neutral\n  `OTEL_EXPORTER_OTLP_ENDPOINT`. The token needs `metrics:write` and\n  `traces:write`.\n\nIf conversations work while analytics stays empty, the OTLP endpoint may be\nunset, the token may lack the metrics or traces scope, or the OTLP export may be\nfailing for another reason. Doctor names the missing-endpoint case and probes\nboth signals when an endpoint is set.\n\n### Reading the report row by row\n\n- `endpoint` and `tenant id`: the resolved value and its source variable. `not set` means neither spelling was found. Doctor names the winning `AGENTO11Y_*` or `SIGIL_*` spelling.\n- `auth token`: `set` and a short prefix. The value is never printed.\n- `probe`: the HTTP status and URL. Analytics has separate **metrics probe** and **traces probe** rows. `no response` includes DNS, connection, timeout, TLS, and blocked-network failures.\n- `file`: the config path and whether it exists.\n- `content capture`: the effective mode and its source. Invalid values fall back to `metadata_only`; the section message names the variable to fix.\n- `guards`: `disabled`, or `enabled` with timeout and Cloud fail-open\u002Fclosed. **local rules** names `guards.toml`; **local guard checks** reports Cloud relay.\n- Coding agents: one row per agent. `not found on PATH` means doctor cannot find that CLI. `on PATH, plugin not installed` can mean never installed, removed, or installed for another scope. `install state unknown` means the read-only probe could not determine the state. Cursor has no install probe: the human row says `detected \u003Cversion>` when present; only JSON reports unknown. Installation state does not confirm that the user trusted Codex hooks.\n\n### Status codes\n\n- **401 on conversations**: the token may be invalid, expired, or missing\n  `sigil:write`; the tenant ID may also be wrong. Sigil reports all of these as\n  rejected credentials.\n- **401 on analytics**: the OTLP credentials were rejected.\n- **403**: check the scope named in the probe message. Grafana's OTLP gateway can\n  use this for missing `metrics:write` or `traces:write`; doctor also handles it\n  defensively for conversations.\n- **Any redirect on the conversations probe**: `AGENTO11Y_ENDPOINT` is not an\n  API URL. A bare stack URL can redirect to login. Doctor rejects a Grafana app\n  page before probing it. Re-run `agento11y login` and paste the block again.\n\n### Debug logging\n\nOnce a valid hook command is dispatched, hook failures and panics are swallowed\nso they do not crash the host agent. An invalid command line can still exit 2.\nTurn on the log for hook detail:\n\n```dotenv\n# ~\u002F.config\u002Fagento11y\u002Fconfig.env\nAGENTO11Y_DEBUG=true\n```\n\nThen read it:\n\n```sh\ntail -f ~\u002F.local\u002Fstate\u002Fagento11y\u002Flogs\u002Fagento11y.log\n```\n\nAn install that still has the pre-rename `~\u002F.local\u002Fstate\u002Fsigil` directory keeps\nusing it, with the new `agento11y.log` file name.\n\n## Reference\n\n### Config keys\n\nAll hosts read the resolved config path. The default is `~\u002F.config\u002Fagento11y\u002Fconfig.env`; `$XDG_CONFIG_HOME` changes the config root.\n\n| Key | Meaning |\n| --- | --- |\n| `AGENTO11Y_ENDPOINT` | Conversations API URL; Cloud history destination identity even with OTel |\n| `AGENTO11Y_AUTH_TENANT_ID` | Instance ID |\n| `AGENTO11Y_AUTH_TOKEN` | Access-policy token |\n| `AGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP endpoint for metrics, traces, and opt-in OTel generations |\n| `AGENTO11Y_PROTOCOL` | Generation transport: `http` (default) or experimental `otel` |\n| `AGENTO11Y_ENABLE_EXPERIMENTAL_FEATURES` | `true` enables the OTel experiment; no legacy alias |\n| `AGENTO11Y_STACK_URL` | The stack login asks about; builds links only, never ingest |\n| `AGENTO11Y_CONTENT_CAPTURE_MODE` | Which content fields ship (see below) |\n| `AGENTO11Y_TAGS` | `key=value,key=value` attached to every generation |\n| `AGENTO11Y_AUTO_CODING_AGENT_TAGS` | Opt-in automatic user, repo, and branch tags |\n| `AGENTO11Y_GUARDS_ENABLED` | Send supported preflight and tool calls for guard evaluation |\n| `AGENTO11Y_GUARDS_TIMEOUT_MS` | Guard evaluation timeout in milliseconds |\n| `AGENTO11Y_GUARDS_FAIL_OPEN` | Allow the operation when Cloud guard evaluation fails |\n| `AGENTO11Y_LOCAL` | A true value routes `agento11y \u003Cagent>` launches, agento11y hooks, and history imports to the local daemon |\n| `AGENTO11Y_LOCAL_FORWARD` | Forward local-mode captures to Grafana Cloud |\n| `AGENTO11Y_THEME` | Local viewer theme: `dark`, `light`, or `system`; defaults to `dark` |\n| `AGENTO11Y_AUTO_UPDATE` | A false value opts out of host-plugin refresh |\n| `AGENTO11Y_DEBUG` | A true value writes the debug log |\n| `AGENTO11Y_ANONYMOUS_USAGE_STATS` | `disabled` stops reporting usage statistics about the CLI itself; `log` prints them instead of sending |\n\nBranded keys have older `SIGIL_*` spellings except `AGENTO11Y_STACK_URL` and `AGENTO11Y_ENABLE_EXPERIMENTAL_FEATURES`. `SIGIL_PROTOCOL` remains supported.\n**Local only** writes `AGENTO11Y_LOCAL` and `SIGIL_LOCAL` as true, and both `LOCAL_FORWARD` spellings as false. **Local web UI = Yes** writes all four as true; **No** writes all four as false.\nAn explicit `agento11y login` still runs Cloud setup. Doctor reports provenance only for settings in its report.\n\n### Experimental OTel generation export\n\nHTTP remains the default. To export generations as OpenTelemetry (OTel) spans, set these values in the environment or `~\u002F.config\u002Fagento11y\u002Fconfig.env`:\n\n```dotenv\nAGENTO11Y_PROTOCOL=otel\nAGENTO11Y_ENABLE_EXPERIMENTAL_FEATURES=true\n```\n\nConfigure `AGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT` (or `OTEL_EXPORTER_OTLP_ENDPOINT`) and OTLP authentication. Use an endpoint that supports Agent Observability generation ingestion.\n\nOTel export supports Claude Code, Codex, Copilot, Cursor, Vibe, and Kiro. Local mode, history imports, and Claude plugin eval imports also support OTel. Pi and OpenCode live plugins still use HTTP.\n\nGuards, scores, and experiment APIs still need HTTP credentials.\n\n### Tagging sessions\n\n`--tag key=value` is repeatable and goes before any `--`. It attaches tags to\nevery generation the launched session produces, and merges onto (and overrides)\n`AGENTO11Y_TAGS`:\n\n```sh\nagento11y claude --tag project=hackathon --tag team=ai -- --resume\n```\n\nEvery CLI launcher accepts it. Cursor has no launcher; set `AGENTO11Y_TAGS` in\nthe config file for Cursor sessions.\n\n### Automatic tags\n\n`AGENTO11Y_AUTO_CODING_AGENT_TAGS=true` resolves the session's user, repository,\nand branch and attaches them as **client** tags, which are the tags that also\nbecome OTel metric labels. That is what lets the Usage and Cost view break down\nby person, repository, or branch. The switch is off by default, and on its own\nit enables all three names.\n\n| Name | Tag key | Resolved from |\n| --- | --- | --- |\n| `user` | `user` | `AGENTO11Y_USER_ID`, then Claude's selected config-directory account file, Codex's `auth.json` email, or Cursor's saved session email before current hook email. Without either, no `user` tag is attached |\n| `repo` | `repo` | Full namespace from the checkout's `origin` remote, or the checkout directory name |\n| `branch` | `git.branch` | Checked-out branch, or a short commit SHA on detached HEAD |\n\nNarrow the list with `AGENTO11Y_AUTO_CODING_AGENT_TAGS_NAMES=user,repo`. A key\nalready in `AGENTO11Y_TAGS` wins, an unresolved value leaves its key off, and an\nunsupported name is logged and skipped. In Prometheus these arrive as\n`agento11y_tag_user`, `agento11y_tag_repo`, and `agento11y_tag_git_branch`.\n\nWarn the user before enabling this. For Claude Code, Codex, and Cursor, `user` can be a work email address retained as a Prometheus label.\nEach value combination creates a time series, and branch names are unbounded. Start with `user,repo`.\nDoctor shows repo and branch but cannot read a host's signed-in identity; set `AGENTO11Y_USER_ID` when the user value must be known before launch.\n\nOther hosts have no account-email lookup. Discovery makes no provider requests, refreshes no credentials, and runs no host account commands. See [local account identity sources](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fdocs\u002Fconcepts\u002Ftags-and-metadata.md#local-account-identity-sources). Those hosts get a `user` tag only from `AGENTO11Y_USER_ID`, so an automatic `user` tag is the session's user ID cut to its first 128 characters. Explicit tags never set identity. Account identity stays active when automatic tags are off. Use the same `AGENTO11Y_USER_ID` across plugins for consistent identity; arbitrary IDs and pseudonyms remain supported.\n\n### Content capture\n\n`AGENTO11Y_CONTENT_CAPTURE_MODE` accepts `full`, `no_tool_content`, `metadata_only`, and `full_with_metadata_spans`. The default is `metadata_only`: model, tokens, timing, IDs, and cost when available, without message content or tool I\u002FO. `default` aliases `metadata_only`; unknown values fall back with a warning.\n\nFor HTTP, `full` includes conversation content and tool arguments\u002Fresults; `metadata_only` retains tool names and reduced structure.\n\nFor direct OTel export, the SDK upgrades `full_with_metadata_spans` to `full`, so generation spans contain content. OTel `metadata_only` drops whole message and tool-definition documents, unlike HTTP's structure-preserving reduction. Separate tool spans remain available.\n\nCapture modes choose which fields ship. By default, every plugin redacts known secret formats from captured content, but redaction does not guarantee that shipped content is safe. Ask before enabling `full`, especially on shared machines. Hosts can omit or truncate fields.\n\nLive skill-load recognition covers native tools in [Claude Code](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fclaude-code#3-verify) and [OpenCode](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fopencode#3-verify), and catalog-matched instruction reads in [Pi](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fpi#3-verify).\nRecognized attempts mark existing tool spans with `gen_ai.skill.name`, including failures, without proving successful loading or explaining later actions.\nValidated names remain in reduced modes; secret-like names are omitted. Recognition adds no descriptions, paths, or URIs and changes no payload policy.\nRecognized attempts also add `gen_ai.skill.name` and `agento11y.tool.execution.kind=\"load_skill\"` to the existing `gen_ai.client.operation.duration` histogram, including failures. Names remain under metric retention even in reduced modes; use stable, nonsensitive names.\nRecognition excludes other hosts, imported history, direct `\u002Fskill` prompt insertion, resource reads, scripts, and attribution of later activity.\nClaude Code and OpenCode retain requested identifiers, not resolved directory basenames; Pi retains catalog names. Only surrounding whitespace is trimmed.\nCloud skill trace visibility requires retained tool and generation spans in Tempo plus deployed Sigil consumer support. Local recording and analytics do not require Tempo.\n\n### Local mode\n\n`agento11y \u003Cagent> --local`, **Local only**, or **Local web UI = Yes** routes launcher runs and agento11y hooks through the local daemon. The daemon stores full generation content in its JSONL store. It forwards full content only when `AGENTO11Y_CONTENT_CAPTURE_MODE=full`; every other selected mode becomes `metadata_only` for Cloud.\n**Local only** does not forward. **Local web UI = No** sends directly to Cloud without a local copy. `--no-local` uses Cloud once without changing either saved alias family. The launcher prints the viewer URL. Manage the daemon with `agento11y local start|open|status|stop|restart`.\nLocal mode is available on every supported platform. A launcher starts the receiver in the same invocation; a saved choice from Cursor install applies to the next hook.\nWith `AGENTO11Y_GUARDS_ENABLED=true`, evaluate `guards.toml` next to `config.env`. `reject = true` blocks on match; `shell_command` is for shell policies. Fail-open is Cloud-only. For pack selection, configuration, and testing, follow `agento11y skills show setup-local-guards`.\n\nLocal **Analytics > Skills** counts all retained calls marked with a skill name, including loads, resource reads, commands, and failures. Case and namespace remain distinct. **Tools** and **Skills** overlap; never add their counts together.\nDuration coverage and p50\u002Fp95 describe tool calls, not skill effectiveness or cost. Skill row and chart links open **Sessions** filtered by the exact identifier, workspace, and time bounds. Summary tiles show matching sessions' in-period generation usage; session rows show lifetime totals. The token chart covers all generation usage in that range and workspace, not skill-attributed usage. Imports do not reconstruct missing skill metadata. See [Local skill analytics](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fagento11y#local-skill-analytics) for timing and retention limits.\n\n#### Forward to extra destinations\n\nThe local daemon can forward each live payload to the existing connection from `config.env`, named `primary`, and up to three extra destinations (four total). `primary` is reserved, even when disabled. This applies only to daemon forwarding; direct export and `--no-local` are unchanged.\n\nPut `forwarding.toml` beside the **resolved** `config.env`: normally `~\u002F.config\u002Fagento11y\u002Fforwarding.toml`, or `$XDG_CONFIG_HOME\u002Fagento11y\u002Fforwarding.toml` with a custom config root. If only the legacy `sigil\u002Fconfig.env` exists, put it in that directory instead. Extra destinations are configured only in this file, not through environment variables, login flags, or the viewer.\n\nThese are two extra records, not a replacement for `primary`. Replace example URLs and credentials with values from each destination's setup page:\n\n```toml\ndestinations = [\n  { name = \"staging\", endpoint = \"https:\u002F\u002Fagento11y.staging.example\", tenant_id = \"\u003Cstaging-instance-id>\", token = \"\u003Cstaging-token>\", otlp_endpoint = \"https:\u002F\u002Fotlp.staging.example\u002Fotlp\" },\n  { name = \"development\", endpoint = \"https:\u002F\u002Fagento11y.development.example\", tenant_id = \"\u003Cdevelopment-instance-id>\", token = \"\u003Cdevelopment-token>\", otlp_endpoint = \"https:\u002F\u002Fotlp.development.example\u002Fotlp\" },\n]\n```\n\nKeep the file private like `config.env`: mode `0600`, with a `0700` parent directory (or equivalent user-only permissions). At the default path, run `chmod 0700 ~\u002F.config\u002Fagento11y` and `chmod 0600 ~\u002F.config\u002Fagento11y\u002Fforwarding.toml`.\n\nEach record needs a unique nonempty `name` and at least one of `endpoint` or `otlp_endpoint`. HTTP generation export needs that record's `tenant_id` and `token`, except for recognized plain-HTTP loopback endpoints. `otlp_token` is optional. `otlp_headers` is an optional **string** of comma-separated `name=value` pairs, not a TOML table (for example, `otlp_headers = \"Authorization=Basic \u003Cbase64-value>,X-Team=observability\"`). An explicit `Authorization` header wins; otherwise OTLP uses Basic authorization from that destination's `tenant_id` and `otlp_token`, falling back to its `token`. Extras inherit no endpoints, credentials, or headers from `primary` or the ambient environment.\n\nEndpoints must be explicit HTTP(S) URLs without userinfo, query, or fragment. Recognized plain-HTTP loopback OTLP endpoints are still refused. More than three extras, unknown fields, duplicate names, or duplicate signal routes (the same effective URL and complete effective header set, including a primary route) invalidate the extras and produce diagnostics. Malformed or unreadable `forwarding.toml` disables **all extras only**, not the primary; no last-known-good extras remain active. An unreadable `config.env` disables all forwarding. File edits reload on the next ingest or status read, without a daemon restart.\n\n`AGENTO11Y_LOCAL_FORWARD=false` (legacy `SIGIL_LOCAL_FORWARD`) stops all new forwarding work, including guard relay. The switch and capture mode are global: only exact `AGENTO11Y_CONTENT_CAPTURE_MODE=full` forwards full content to every recipient; all other modes use the existing `metadata_only` reduction.\n\nIncoming HTTP generations go only to each recipient's Sigil HTTP `endpoint`; incoming OTLP traces and metrics go only to its `otlp_endpoint`. Configure both endpoints to receive both generation transports. The daemon does not re-record through an SDK or convert HTTP generations to OTLP, or OTLP generations to HTTP. Guards relay to `primary` only. Local history imports carry a no-forward marker that excludes **every** recipient.\n\nForwarding is best effort: one attempt per payload per destination, with a 10-second timeout, no retry, replay, or backfill. Each destination admits at most 8 in-flight requests and 128 MiB of input plus prepared output. The daemon has 2 shared preparation slots and allows at most 32 requests and 512 MiB across all destinations. Requests still running after a destination changes or is removed count toward the request and byte limits. Saturation drops affected copies without waiting; destinations are admitted independently. Status tracks attempted, succeeded, failed, and dropped requests per destination and signal. In-memory work can be lost on shutdown. A local acknowledgement confirms local acceptance, **not remote delivery**. Additional recipients increase network traffic, ingest costs, and memory use.\n\nThe viewer's **Settings > Cloud** controls forwarding and lists recipients before enabling full capture. Run `agento11y doctor` for destination status, counters, diagnostics, and the file path; edit extra destinations in `forwarding.toml`. Login does not list extra recipients. Full capture selected in login still applies to all recipients. Ask before enabling full capture or adding recipients. **Disconnect** turns global forwarding off and clears managed primary connection fields, but leaves extra destinations and their credentials saved. Unmanaged or inherited primary environment settings may remain too; re-enabling forwarding can reactivate saved extras and any remaining primary routes.\n\n#### Test local guards offline\n\nFor an offline dry run, use `agento11y guards test 'rm -rf ~\u002F.ssh'`. It does not execute input, check Cloud rules, contact endpoints, start a daemon, or write files. It tests saved policy even when host guard requests are disabled, without predicting host enforcement. Disabled rules and absent packs stay unchanged.\n- Flags precede one quoted command: `agento11y guards test [--json] [--rules path] [--tool name] [--agent name] [--stdin] [--] \u003Ccommand>`. Use `--` before a command starting with a dash. Alternatively, `printf '%s\\n' 'echo first' 'echo second' | agento11y guards test --stdin` reads one command through EOF, preserving newlines. Blank commands and empty tool names are errors.\n- `--rules` bypasses configuration discovery; otherwise use `guards.toml` beside the resolved `config.env`, including the legacy `sigil` fallback. A missing default file or no enforceable rules returns allow with a notice. A missing explicit file is an error. Unchanged legacy packs receive the daemon's in-memory upgrade without changing the file.\n- The synthetic postflight request has one assistant tool call, ID `guards-test`. `--tool` defaults to `Bash` and changes only the name; arguments remain `{\"command\": ...}`. Conditional rules see only `--agent` (default empty). There is no model, tags, agent version, preflight history, system prompt, or arbitrary host payload replay.\n- `--json` emits one deterministic document: `schema_version: 1`, `scope: \"local\"`, `rules: {path, exists, compiled, enforcing}`, `request: {command, tool_name, agent_name}`, `response`, `errors`, and `notices`. Compiled and enforcing values are rule counts. Response is null when no evaluation completed; otherwise it preserves the engine result and ordered evaluations array. Transformed input uses SDK JSON with raw JSON tool arguments. Errors and notices are always arrays. After flag parsing, JSON errors use stdout; stderr stays empty unless writing stdout fails.\n- Exits: `0` = completed allow, including warnings or transforms; `1` = completed deny; `2` = input, file, compilation, evaluation, or output error. Compilation errors take precedence. The output retains the partial response from valid rules. Failed evaluations include warnings and dropped redactions, not just denials. A response rule ID does not identify every transform that ran. Diagnostic JSON includes the submitted command and rewritten content. Do not use real secrets in shared test output; see `agento11y guards test --help` for details.\n\n### History import\n\nUntil an import runs, the viewer and Grafana Cloud hold only sessions captured after installation.\n`agento11y history import` backfills sessions `claude-code`, `codex`, `cursor`, `opencode`, or `pi` already wrote to disk. OpenCode supports v1 and released v2 databases. See [History import](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fagento11y#history-import) for limitations.\nAn import sends generations and backdated trace spans but no metrics, so dashboards built on the `gen_ai.client.*` metrics leave imported history out.\n\n```sh\nagento11y history import claude-code --dry-run   # plan only; no setup or export\nagento11y history import claude-code --local     # import into the local store\nagento11y history import claude-code --no-local  # import into Grafana Cloud\n```\n\nThe import resolves the destination in this order: `--no-local`, `--local`, a true `AGENTO11Y_LOCAL` from shell or `config.env`, then saved Cloud credentials. With none set, an interactive run asks where sessions go; `--no-local` or any valid LOCAL value skips that question. Missing Cloud credentials still starts Cloud setup, without **Local web UI**, because local imports never forward to any recipient.\nA noninteractive run never asks: only `--all --yes` imports; otherwise it prints a dry-run plan and exits 0.\n\nWithout `--since`, an import selects sessions active during the last 90 days. Each imported turn is recorded in a ledger per agent and destination, so an import into another destination sends the same turns without `--force`. If saved local mode would keep that import local, add `--no-local`.\nTurns imported before that ledger count as already sent to every destination. Pass `--force` for them only after the user confirms they never reached that destination, with a `--since` that reaches back to the first import (a timestamp is safest); into Grafana Cloud, run it once, right after upgrading and before any other Cloud import, because `--force` re-sends every selected turn and Cloud stores and counts a repeat of a turn it received more than about a day earlier.\nA cancelled or failed run resumes from turns not marked exported.\n\n### Auto-update\n\nClaude, Codex, and OpenCode 1 refresh after a binary version change and, after\nthe first post-install refresh, at most once a day. A relaunch inside that period\ndoes not pick up a plugin fix. `AGENTO11Y_AUTO_UPDATE=0|false|no|off` opts out.\nCopilot and Vibe reconcile hooks on each launch. Pi leaves upgrades to pi's\ninstaller. OpenCode 2 is never refreshed; run `opencode plugin update @grafana\u002Fagento11y-opencode`.\n\n## Further reading\n\n- Product docs: \u003Chttps:\u002F\u002Fgrafana.com\u002Fdocs\u002Fgrafana-cloud\u002Fmachine-learning\u002Fagent-observability\u002F>\n- Source: \u003Chttps:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y>\n","# Set up a coding agent with Grafana Agent observability\n\nGrafana Agent observability records model calls, tokens, timing, tool names, and\nreported or estimated cost. Conversation content is opt-in. The `agento11y`\nbinary launches agents and hosts hook-based integrations; pi and OpenCode export\nin process. This path installs and configures the integration. It never changes\nthe user's application code.\n\nDo the steps the machine's current state calls for, not all five. Step 1 says\nwhere to start: a machine that needs one credential re-saved does not need a\nreinstall, and a working setup the user asked a question about needs no changes\nat all.\n\n## Rules\n\n1. **Never mint, generate, or guess a credential.** The token is a Grafana Cloud\n   access-policy token that only the user can create. Ask for it, or tell the\n   user where to click. A made-up token produces a 401.\n2. **Never invent an endpoint URL.** The API URL and the OTLP endpoint come from\n   the setup page of the user's own stack (Step 3). Do not assemble one from the\n   stack name; regions differ.\n3. **Never print or echo a token, and never ask for the environment block in\n   chat.** The block carries a live token, and this conversation can be\n   exported. The user pastes it into login's prompt or passes `--env-file \u003Cfile>`\n   (`-` for a pipe). A token you pass yourself goes in with `--token-stdin`.\n4. **Do not edit application code.** Adding SDK calls to the user's app is a\n   different job (\"Path B\"). If the user wants their own app or agent\n   instrumented, stop and hand off to the `agento11y-instrument` skill, which\n   ships with the `gcx` CLI (`gcx agent skills install agento11y-instrument`).\n5. **Ask before enabling full capture or guards, or adding recipients.** Default `metadata_only` generation exports exclude prompts, responses, and tool I\u002FO; `full` sends them to every enabled recipient, not just `primary`.\n   Guards send evaluated content only to `AGENTO11Y_ENDPOINT` regardless of capture mode. Local mode always stores full content locally.\n\n## Step 1: Read the current state\n\nRun this first, every time, before changing anything:\n\n```sh\nagento11y doctor --json\n```\n\nIf the command is not found, the binary is not installed: go to Step 2.\n\nBranch on these fields. The JSON also reports auto-update state:\n\n| Field | Meaning | Where to go |\n| --- | --- | --- |\n| `agento11y.version` | The installed build. `dev` is an unstamped build, including one installed with `go install`. Always present when the command runs. | command not found: Step 2 |\n| `config.exists` | Whether the resolved config file exists. | `false`: Step 3 |\n| `conversations.status` | The transcript pipeline: `ok`, `warning`, `error`. | `error`: Troubleshooting |\n| `analytics.status` | The OTLP metrics and traces pipeline. | `error`: Troubleshooting |\n| `agents[]` | One entry per coding agent, with `install_state` and `on_path`. | target agent `not_installed`: Step 4 |\n\nCursor is hook-based. `install_state: installed` means every agento11y Cursor\nhook is present in `~\u002F.cursor\u002Fhooks.json`; `not_installed` means one or more is\nabsent. Run `agento11y cursor install` when the user wants Cursor wired;\nre-running it is safe.\n\n`agento11y doctor` exits 1 when conversations, analytics, or config is in\n`error`. The agent list never fails the command: an agent the user does not have\nis reported, not treated as a problem.\n\nRun `agento11y doctor` without `--json` when you want the human report, and\nshare `--json` output when the user asks for something to send to support. The\nJSON never contains the token value. It can contain a short token-scheme prefix,\nsuch as `glc_`.\n\n## Step 2: Install the binary\n\nPick one method that matches the platform and how the user installs other tools.\n\n**Quick install (Linux and macOS):**\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgrafana\u002Fagento11y\u002Fmain\u002Fplugins\u002Fagento11y\u002Fscripts\u002Finstall.sh | sh\n```\n\nThe script downloads the latest release for the OS and architecture to `~\u002F.local\u002Fbin`. It verifies the SHA-256 when `sha256sum` or `shasum` is available; otherwise it warns and continues.\nRe-run it to upgrade. `INSTALL_DIR` changes the directory and `VERSION` pins a release.\n\n**Homebrew (macOS):**\n\n```sh\nbrew install grafana\u002Fgrafana\u002Fagento11y\n```\n\nUpgrade with `brew upgrade grafana\u002Fgrafana\u002Fagento11y`.\n\n**mise:** `mise use -g aqua:grafana\u002Fagento11y@latest` (requires [mise shell activation](https:\u002F\u002Fmise.jdx.dev\u002Fcli\u002Factivate.html) so `agento11y` is on `PATH`).\n\n**Go install (any platform with Go 1.26.9+):**\n\n```sh\ngo install github.com\u002Fgrafana\u002Fagento11y\u002Fplugins\u002Fagento11y\u002Fcmd\u002Fagento11y@latest\n```\n\nThis writes to `go env GOPATH`\u002Fbin, or `GOBIN` when set. On Windows the other\noption is the `windows_amd64` or `windows_arm64` zip from the releases page:\nextract `agento11y.exe` and put it on `PATH`.\n\nWhichever method you use, the install directory has to be on `PATH`. Check the\nresult:\n\n```sh\nagento11y --version\n```\n\nThe command was renamed from `sigil`. The quick installer and Homebrew also\ninstall a `sigil` alias. `go install` installs only the binary you name. The old\nname will be removed in a future release, so do not write new instructions\nagainst `sigil`.\n\n## Step 3: Choose a destination\n\nA first `agento11y login` asks where sessions go: **Local only** needs no Cloud credentials and never forwards; **Grafana Cloud** continues to credentials. Its **Local web UI** preference defaults to **Yes** and remembers an earlier answer: **Yes** keeps a full local copy and forwards a Cloud copy; **No** sends directly to Cloud.\n\n### The paste flow\n\nTell the user to run `agento11y login` in their own terminal, then wait. You\ncannot drive it yourself: it needs a terminal, and the block it asks for holds a\nlive token that must not pass through this conversation. The destination question\nappears only when no destination or credentials are saved. A\nsaved Cloud connection starts at step 2.\n\n1. **Where should sessions go?**: a two-option list. **Local only** saves local\n   mode and ends the flow. **Grafana Cloud** continues with the steps below.\n2. **Grafana Cloud connection**: shown when both the stack URL and credentials\n   are saved. **Keep this connection** is the default; **Change connection** continues below.\n3. **Your Grafana Cloud URL**: the Grafana they open in a browser, for example\n   `https:\u002F\u002Fmystack.grafana.net`. The field arrives pre-filled from the stack an\n   earlier run saved or from a gcx configuration, and becomes a list when more\n   than one is known. It only builds the links below; it is never the ingest\n   endpoint.\n4. Login prints `https:\u002F\u002F\u003Cstack>\u002Fa\u002Fgrafana-agento11y-app\u002Fsetup-coding-agent` and\n   tries to open it in a browser. That page has three steps: create an API token,\n   copy the connection settings, and paste them back in the terminal. The page\n   creates the token when the user has permission and the stack supports it.\n   Otherwise it links to Cloud Access Policies and accepts an existing token.\n5. **Paste from Grafana**: the whole block goes into this one masked field, which\n   fills the endpoint, instance ID, token, and OTLP settings, and presets the\n   automatic tag answers when it sets them. Login asks only for what is missing.\n   Pasting is optional: Enter on the empty box types the values one by one.\n6. **Preferences**: local web UI, content capture mode, session tags, guards and their timeout, and automatic tags. Enter keeps each answer. The web UI always stores full content locally; forwarding sends full content in Full mode and metadata otherwise.\n   Read Rule 5 before enabling full capture or guards, and **Automatic tags** before enabling automatic tags.\n\nThe copied block has concrete values in this shape:\n\n```dotenv\nAGENTO11Y_ENDPOINT=https:\u002F\u002Fagento11y-prod-\u003Cregion>.grafana.net\nAGENTO11Y_PROTOCOL=http\nAGENTO11Y_AUTH_MODE=basic\nAGENTO11Y_AUTH_TENANT_ID=\u003Cinstance-id>\nAGENTO11Y_AUTH_TOKEN=glc_...\nOTEL_EXPORTER_OTLP_ENDPOINT=https:\u002F\u002Fotlp-gateway-prod-\u003Cregion>.grafana.net\u002Fotlp\nOTEL_EXPORTER_OTLP_HEADERS='Authorization=Basic \u003Cbase64-value>'\n```\n\nWithout OTLP, default HTTP conversations work but Cloud analytics does not. Local recording and analytics need no Tempo or Cloud credentials. Login rejects placeholders; flags can replace pasted values. A pasted block fills in the form's preferences, such as content capture, guards and automatic tags, which the user can still change, and login saves the block's other settings. Login ignores a pasted auth mode other than `basic`, `AGENTO11Y_HEADERS`, and the guard timeout: guard checks use them and fail open, so any of them could let every tool call through. It also skips a key that chooses what agento11y runs or loads, where it sends anything but the stack's data, the agent name or version, or the user ID, a value that turns off secret redaction, TLS, guards, a fail-closed guard, or updates, or turns usage stats on, a name that is not upper case, and any name it does not know; it saves the rest, names the skipped keys on stderr, and exits 0. A block's endpoint, OTLP endpoint and stack URL must use https unless they are on this machine (see the README). `--env-file \u003Cfile>` (`-` for a pipe) never prompts: the block and the flags must supply the endpoint, instance ID, and token, and a setting the block leaves out keeps its saved value. Flags beat the block's values, and `--token-stdin` can supply a token the file leaves out. Configure experimental OTel through the environment or `config.env`, as described in the Reference. Existing config keys stay.\n\nFor default HTTP capture and analytics, one token needs `sigil:write`, `metrics:write`, and `traces:write`. Generated policies can include extra scopes; the HTTP integrations use only these three.\n\n### The flags\n\n`--endpoint`, `--tenant`, and a token together skip destination and value prompts, including over SSH, in a devcontainer, or a script. A failed credential check can still prompt on an interactive terminal. Use only values the user has already given you.\n\n```sh\nprintf %s \"$TOKEN\" | agento11y login \\\n  --endpoint https:\u002F\u002Fagento11y-prod-\u003Cregion>.grafana.net \\\n  --tenant \u003Cinstance-id> \\\n  --token-stdin \\\n  --otlp-endpoint https:\u002F\u002Fotlp-gateway-prod-\u003Cregion>.grafana.net\u002Fotlp\n```\n\nBefore writing, login sends one credential-check request and reports the result. On failure it asks whether to save interactively; with nonterminal stdin it writes nothing and exits 1. Pass `--yes` to save regardless or `--no-verify` to skip the check. Preferences have no flags.\n\nLogin writes the resolved config path, retaining `sigil\u002Fconfig.env` under the same config root if only that legacy file exists. You can write it by hand instead:\n\n```dotenv\nAGENTO11Y_ENDPOINT=https:\u002F\u002Fagento11y-prod-\u003Cregion>.grafana.net\nAGENTO11Y_AUTH_TENANT_ID=\u003Cinstance-id>\nAGENTO11Y_AUTH_TOKEN=glc_...\nAGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT=https:\u002F\u002Fotlp-gateway-prod-\u003Cregion>.grafana.net\u002Fotlp\n```\n\nA hand-written file needs no OTLP auth header: absent `Authorization` in `OTEL_EXPORTER_OTLP_HEADERS`, the launcher builds Basic authorization from the tenant ID and the first available OTLP or ingest token.\n\n## Step 4: Wire the coding agent\n\nSix agents launch through `agento11y \u003Cagent>`. A first run asks where sessions go\nas Step 3 describes, and **Local only** there starts the receiver for that launch.\nThe command then installs the host integration and replaces itself with the agent.\nIt asks nothing when local mode is already on (`--local` or `AGENTO11Y_LOCAL=true`)\nor when stdin is not a terminal. Existing integrations follow the **Auto-update**\nrules in the Reference.\n\n| Agent | Command | Mechanism |\n| --- | --- | --- |\n| Claude Code | `agento11y claude` | shared Go binary, plugin `agento11y-claude-code` |\n| Codex | `agento11y codex` | shared Go binary, plugin `agento11y-codex` |\n| Copilot CLI | `agento11y copilot` | hooks shared with Copilot Chat in VS Code |\n| OpenCode | `agento11y opencode` | installs `@grafana\u002Fagento11y-opencode`; OpenCode 1.3.13 to 1.x or 2.0.22 to 2.x, other releases are refused; OpenCode 2 sessions get `--standalone` so a private server inherits launcher settings |\n| pi | `agento11y pi` | installs `@grafana\u002Fagento11y-pi` |\n| Vibe | `agento11y vibe` | shared Go binary via `hooks.toml` |\n| Kiro CLI 3 (experimental) | `agento11y kiro -- chat` | current workspace hooks; prompts\u002Ftools only, no assistant text, model usage, cost, or guards |\n\nAfter the first `agento11y codex` launch, open `\u002Fhooks` inside Codex and trust\nthe agento11y hooks. Codex does not export turns until the user completes this\nmanual step, and doctor cannot detect whether they did.\nVibe hooks are experimental. The launcher enables them in the child process, so\nlaunch Vibe through `agento11y vibe` for capture.\n\n**Cursor is the exception.** It is a GUI application with no launcher, so wire\nit directly:\n\n```sh\nagento11y cursor install     # merges the hook into ~\u002F.cursor\u002Fhooks.json\nagento11y cursor uninstall   # removes it\n```\n\nOn macOS and Linux, re-run `agento11y cursor install` after moving the binary;\nCursor's hook stores its absolute path.\n\nFor managed macOS deployment, after the administrator has placed the connection file for the target user, use `agento11y claude install --json` and `agento11y cursor install`; neither launches a host. `missing_host` for Claude means rerun after Claude Code is installed for that user.\n\nArguments after `--` go to the underlying CLI unchanged:\n\n```sh\nagento11y claude -- --resume\n```\n\nSuggest the user alias the prefix (for example `alias claude='agento11y claude'`)\nonly if they ask; silently shadowing their agent command is surprising.\n\n## Step 5: Verify\n\n1. Run the agent for one turn. Any prompt will do.\n2. Open Grafana Cloud, then Agent Observability, then **Conversations**. It\n   usually appears within a few seconds; if it does not, continue to step 3.\n3. If nothing appears, run `agento11y doctor`. For Codex, also confirm that the\n   user trusted the hooks from `\u002Fhooks`. Read launcher stderr for lines starting\n   with `agento11y:`.\n\nFor local capture, run `agento11y local open`. Check **Sessions** and **Analytics > Overview**. Optionally check **Analytics > Skills** after a recognized skill-load attempt in Claude Code, Pi, or OpenCode. For Cloud, confirm conversations and analytics separately. With default HTTP capture, conversations can arrive while Cloud **Analytics** stays empty. Check OTLP when that happens.\n\n## Troubleshooting\n\nRun `agento11y doctor` first. It is read-only. It validates the required generation settings before probing the selected generation transport and reporting the HTTP status. With an OTLP endpoint configured, it sends separate metrics and traces probes and reports their HTTP statuses. With OTel selected, it checks opt-in and the trace route. A successful OTLP probe verifies transport and authentication, not generation ingestion. Read each probe message; some non-success responses are warnings.\n\n### The two pipelines\n\nDefault HTTP capture uses separate pipelines. Experimental OTel generations share the trace route.\n\n- **Conversations** use `AGENTO11Y_ENDPOINT`, `AGENTO11Y_AUTH_TENANT_ID`, and `AGENTO11Y_AUTH_TOKEN` by default (`sigil:write`). With experimental OTel selected, Go producers use the configured OTLP trace route.\n- **Analytics** (the metrics and traces) export over\n  `AGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT`, or the vendor-neutral\n  `OTEL_EXPORTER_OTLP_ENDPOINT`. The token needs `metrics:write` and\n  `traces:write`.\n\nIf conversations work while analytics stays empty, the OTLP endpoint may be\nunset, the token may lack the metrics or traces scope, or the OTLP export may be\nfailing for another reason. Doctor names the missing-endpoint case and probes\nboth signals when an endpoint is set.\n\n### Reading the report row by row\n\n- `endpoint` and `tenant id`: the resolved value and its source variable. `not set` means neither spelling was found. Doctor names the winning `AGENTO11Y_*` or `SIGIL_*` spelling.\n- `auth token`: `set` and a short prefix. The value is never printed.\n- `probe`: the HTTP status and URL. Analytics has separate **metrics probe** and **traces probe** rows. `no response` includes DNS, connection, timeout, TLS, and blocked-network failures.\n- `file`: the config path and whether it exists.\n- `content capture`: the effective mode and its source. Invalid values fall back to `metadata_only`; the section message names the variable to fix.\n- `guards`: `disabled`, or `enabled` with timeout and Cloud fail-open\u002Fclosed. **local rules** names `guards.toml`; **local guard checks** reports Cloud relay.\n- Coding agents: one row per agent. `not found on PATH` means doctor cannot find that CLI. `on PATH, plugin not installed` can mean never installed, removed, or installed for another scope. `install state unknown` means the read-only probe could not determine the state. Cursor has no install probe: the human row says `detected \u003Cversion>` when present; only JSON reports unknown. Installation state does not confirm that the user trusted Codex hooks.\n\n### Status codes\n\n- **401 on conversations**: the token may be invalid, expired, or missing\n  `sigil:write`; the tenant ID may also be wrong. Sigil reports all of these as\n  rejected credentials.\n- **401 on analytics**: the OTLP credentials were rejected.\n- **403**: check the scope named in the probe message. Grafana's OTLP gateway can\n  use this for missing `metrics:write` or `traces:write`; doctor also handles it\n  defensively for conversations.\n- **Any redirect on the conversations probe**: `AGENTO11Y_ENDPOINT` is not an\n  API URL. A bare stack URL can redirect to login. Doctor rejects a Grafana app\n  page before probing it. Re-run `agento11y login` and paste the block again.\n\n### Debug logging\n\nOnce a valid hook command is dispatched, hook failures and panics are swallowed\nso they do not crash the host agent. An invalid command line can still exit 2.\nTurn on the log for hook detail:\n\n```dotenv\n# ~\u002F.config\u002Fagento11y\u002Fconfig.env\nAGENTO11Y_DEBUG=true\n```\n\nThen read it:\n\n```sh\ntail -f ~\u002F.local\u002Fstate\u002Fagento11y\u002Flogs\u002Fagento11y.log\n```\n\nAn install that still has the pre-rename `~\u002F.local\u002Fstate\u002Fsigil` directory keeps\nusing it, with the new `agento11y.log` file name.\n\n## Reference\n\n### Config keys\n\nAll hosts read the resolved config path. The default is `~\u002F.config\u002Fagento11y\u002Fconfig.env`; `$XDG_CONFIG_HOME` changes the config root.\n\n| Key | Meaning |\n| --- | --- |\n| `AGENTO11Y_ENDPOINT` | Conversations API URL; Cloud history destination identity even with OTel |\n| `AGENTO11Y_AUTH_TENANT_ID` | Instance ID |\n| `AGENTO11Y_AUTH_TOKEN` | Access-policy token |\n| `AGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP endpoint for metrics, traces, and opt-in OTel generations |\n| `AGENTO11Y_PROTOCOL` | Generation transport: `http` (default) or experimental `otel` |\n| `AGENTO11Y_ENABLE_EXPERIMENTAL_FEATURES` | `true` enables the OTel experiment; no legacy alias |\n| `AGENTO11Y_STACK_URL` | The stack login asks about; builds links only, never ingest |\n| `AGENTO11Y_CONTENT_CAPTURE_MODE` | Which content fields ship (see below) |\n| `AGENTO11Y_TAGS` | `key=value,key=value` attached to every generation |\n| `AGENTO11Y_AUTO_CODING_AGENT_TAGS` | Opt-in automatic user, repo, and branch tags |\n| `AGENTO11Y_GUARDS_ENABLED` | Send supported preflight and tool calls for guard evaluation |\n| `AGENTO11Y_GUARDS_TIMEOUT_MS` | Guard evaluation timeout in milliseconds |\n| `AGENTO11Y_GUARDS_FAIL_OPEN` | Allow the operation when Cloud guard evaluation fails |\n| `AGENTO11Y_LOCAL` | A true value routes `agento11y \u003Cagent>` launches, agento11y hooks, and history imports to the local daemon |\n| `AGENTO11Y_LOCAL_FORWARD` | Forward local-mode captures to Grafana Cloud |\n| `AGENTO11Y_THEME` | Local viewer theme: `dark`, `light`, or `system`; defaults to `dark` |\n| `AGENTO11Y_AUTO_UPDATE` | A false value opts out of host-plugin refresh |\n| `AGENTO11Y_DEBUG` | A true value writes the debug log |\n| `AGENTO11Y_ANONYMOUS_USAGE_STATS` | `disabled` stops reporting usage statistics about the CLI itself; `log` prints them instead of sending |\n\nBranded keys have older `SIGIL_*` spellings except `AGENTO11Y_STACK_URL` and `AGENTO11Y_ENABLE_EXPERIMENTAL_FEATURES`. `SIGIL_PROTOCOL` remains supported.\n**Local only** writes `AGENTO11Y_LOCAL` and `SIGIL_LOCAL` as true, and both `LOCAL_FORWARD` spellings as false. **Local web UI = Yes** writes all four as true; **No** writes all four as false.\nAn explicit `agento11y login` still runs Cloud setup. Doctor reports provenance only for settings in its report.\n\n### Experimental OTel generation export\n\nHTTP remains the default. To export generations as OpenTelemetry (OTel) spans, set these values in the environment or `~\u002F.config\u002Fagento11y\u002Fconfig.env`:\n\n```dotenv\nAGENTO11Y_PROTOCOL=otel\nAGENTO11Y_ENABLE_EXPERIMENTAL_FEATURES=true\n```\n\nConfigure `AGENTO11Y_OTEL_EXPORTER_OTLP_ENDPOINT` (or `OTEL_EXPORTER_OTLP_ENDPOINT`) and OTLP authentication. Use an endpoint that supports Agent Observability generation ingestion.\n\nOTel export supports Claude Code, Codex, Copilot, Cursor, Vibe, and Kiro. Local mode, history imports, and Claude plugin eval imports also support OTel. Pi and OpenCode live plugins still use HTTP.\n\nGuards, scores, and experiment APIs still need HTTP credentials.\n\n### Tagging sessions\n\n`--tag key=value` is repeatable and goes before any `--`. It attaches tags to\nevery generation the launched session produces, and merges onto (and overrides)\n`AGENTO11Y_TAGS`:\n\n```sh\nagento11y claude --tag project=hackathon --tag team=ai -- --resume\n```\n\nEvery CLI launcher accepts it. Cursor has no launcher; set `AGENTO11Y_TAGS` in\nthe config file for Cursor sessions.\n\n### Automatic tags\n\n`AGENTO11Y_AUTO_CODING_AGENT_TAGS=true` resolves the session's user, repository,\nand branch and attaches them as **client** tags, which are the tags that also\nbecome OTel metric labels. That is what lets the Usage and Cost view break down\nby person, repository, or branch. The switch is off by default, and on its own\nit enables all three names.\n\n| Name | Tag key | Resolved from |\n| --- | --- | --- |\n| `user` | `user` | `AGENTO11Y_USER_ID`, then Claude's selected config-directory account file, Codex's `auth.json` email, or Cursor's saved session email before current hook email. Without either, no `user` tag is attached |\n| `repo` | `repo` | Full namespace from the checkout's `origin` remote, or the checkout directory name |\n| `branch` | `git.branch` | Checked-out branch, or a short commit SHA on detached HEAD |\n\nNarrow the list with `AGENTO11Y_AUTO_CODING_AGENT_TAGS_NAMES=user,repo`. A key\nalready in `AGENTO11Y_TAGS` wins, an unresolved value leaves its key off, and an\nunsupported name is logged and skipped. In Prometheus these arrive as\n`agento11y_tag_user`, `agento11y_tag_repo`, and `agento11y_tag_git_branch`.\n\nWarn the user before enabling this. For Claude Code, Codex, and Cursor, `user` can be a work email address retained as a Prometheus label.\nEach value combination creates a time series, and branch names are unbounded. Start with `user,repo`.\nDoctor shows repo and branch but cannot read a host's signed-in identity; set `AGENTO11Y_USER_ID` when the user value must be known before launch.\n\nOther hosts have no account-email lookup. Discovery makes no provider requests, refreshes no credentials, and runs no host account commands. See [local account identity sources](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fdocs\u002Fconcepts\u002Ftags-and-metadata.md#local-account-identity-sources). Those hosts get a `user` tag only from `AGENTO11Y_USER_ID`, so an automatic `user` tag is the session's user ID cut to its first 128 characters. Explicit tags never set identity. Account identity stays active when automatic tags are off. Use the same `AGENTO11Y_USER_ID` across plugins for consistent identity; arbitrary IDs and pseudonyms remain supported.\n\n### Content capture\n\n`AGENTO11Y_CONTENT_CAPTURE_MODE` accepts `full`, `no_tool_content`, `metadata_only`, and `full_with_metadata_spans`. The default is `metadata_only`: model, tokens, timing, IDs, and cost when available, without message content or tool I\u002FO. `default` aliases `metadata_only`; unknown values fall back with a warning.\n\nFor HTTP, `full` includes conversation content and tool arguments\u002Fresults; `metadata_only` retains tool names and reduced structure.\n\nFor direct OTel export, the SDK upgrades `full_with_metadata_spans` to `full`, so generation spans contain content. OTel `metadata_only` drops whole message and tool-definition documents, unlike HTTP's structure-preserving reduction. Separate tool spans remain available.\n\nCapture modes choose which fields ship. By default, every plugin redacts known secret formats from captured content, but redaction does not guarantee that shipped content is safe. Ask before enabling `full`, especially on shared machines. Hosts can omit or truncate fields.\n\nLive skill-load recognition covers native tools in [Claude Code](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fclaude-code#3-verify) and [OpenCode](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fopencode#3-verify), and catalog-matched instruction reads in [Pi](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fpi#3-verify).\nRecognized attempts mark existing tool spans with `gen_ai.skill.name`, including failures, without proving successful loading or explaining later actions.\nValidated names remain in reduced modes; secret-like names are omitted. Recognition adds no descriptions, paths, or URIs and changes no payload policy.\nRecognized attempts also add `gen_ai.skill.name` and `agento11y.tool.execution.kind=\"load_skill\"` to the existing `gen_ai.client.operation.duration` histogram, including failures. Names remain under metric retention even in reduced modes; use stable, nonsensitive names.\nRecognition excludes other hosts, imported history, direct `\u002Fskill` prompt insertion, resource reads, scripts, and attribution of later activity.\nClaude Code and OpenCode retain requested identifiers, not resolved directory basenames; Pi retains catalog names. Only surrounding whitespace is trimmed.\nCloud skill trace visibility requires retained tool and generation spans in Tempo plus deployed Sigil consumer support. Local recording and analytics do not require Tempo.\n\n### Local mode\n\n`agento11y \u003Cagent> --local`, **Local only**, or **Local web UI = Yes** routes launcher runs and agento11y hooks through the local daemon. The daemon stores full generation content in its JSONL store. It forwards full content only when `AGENTO11Y_CONTENT_CAPTURE_MODE=full`; every other selected mode becomes `metadata_only` for Cloud.\n**Local only** does not forward. **Local web UI = No** sends directly to Cloud without a local copy. `--no-local` uses Cloud once without changing either saved alias family. The launcher prints the viewer URL. Manage the daemon with `agento11y local start|open|status|stop|restart`.\nLocal mode is available on every supported platform. A launcher starts the receiver in the same invocation; a saved choice from Cursor install applies to the next hook.\nWith `AGENTO11Y_GUARDS_ENABLED=true`, evaluate `guards.toml` next to `config.env`. `reject = true` blocks on match; `shell_command` is for shell policies. Fail-open is Cloud-only. For pack selection, configuration, and testing, follow `agento11y skills show setup-local-guards`.\n\nLocal **Analytics > Skills** counts all retained calls marked with a skill name, including loads, resource reads, commands, and failures. Case and namespace remain distinct. **Tools** and **Skills** overlap; never add their counts together.\nDuration coverage and p50\u002Fp95 describe tool calls, not skill effectiveness or cost. Skill row and chart links open **Sessions** filtered by the exact identifier, workspace, and time bounds. Summary tiles show matching sessions' in-period generation usage; session rows show lifetime totals. The token chart covers all generation usage in that range and workspace, not skill-attributed usage. Imports do not reconstruct missing skill metadata. See [Local skill analytics](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fagento11y#local-skill-analytics) for timing and retention limits.\n\n#### Forward to extra destinations\n\nThe local daemon can forward each live payload to the existing connection from `config.env`, named `primary`, and up to three extra destinations (four total). `primary` is reserved, even when disabled. This applies only to daemon forwarding; direct export and `--no-local` are unchanged.\n\nPut `forwarding.toml` beside the **resolved** `config.env`: normally `~\u002F.config\u002Fagento11y\u002Fforwarding.toml`, or `$XDG_CONFIG_HOME\u002Fagento11y\u002Fforwarding.toml` with a custom config root. If only the legacy `sigil\u002Fconfig.env` exists, put it in that directory instead. Extra destinations are configured only in this file, not through environment variables, login flags, or the viewer.\n\nThese are two extra records, not a replacement for `primary`. Replace example URLs and credentials with values from each destination's setup page:\n\n```toml\ndestinations = [\n  { name = \"staging\", endpoint = \"https:\u002F\u002Fagento11y.staging.example\", tenant_id = \"\u003Cstaging-instance-id>\", token = \"\u003Cstaging-token>\", otlp_endpoint = \"https:\u002F\u002Fotlp.staging.example\u002Fotlp\" },\n  { name = \"development\", endpoint = \"https:\u002F\u002Fagento11y.development.example\", tenant_id = \"\u003Cdevelopment-instance-id>\", token = \"\u003Cdevelopment-token>\", otlp_endpoint = \"https:\u002F\u002Fotlp.development.example\u002Fotlp\" },\n]\n```\n\nKeep the file private like `config.env`: mode `0600`, with a `0700` parent directory (or equivalent user-only permissions). At the default path, run `chmod 0700 ~\u002F.config\u002Fagento11y` and `chmod 0600 ~\u002F.config\u002Fagento11y\u002Fforwarding.toml`.\n\nEach record needs a unique nonempty `name` and at least one of `endpoint` or `otlp_endpoint`. HTTP generation export needs that record's `tenant_id` and `token`, except for recognized plain-HTTP loopback endpoints. `otlp_token` is optional. `otlp_headers` is an optional **string** of comma-separated `name=value` pairs, not a TOML table (for example, `otlp_headers = \"Authorization=Basic \u003Cbase64-value>,X-Team=observability\"`). An explicit `Authorization` header wins; otherwise OTLP uses Basic authorization from that destination's `tenant_id` and `otlp_token`, falling back to its `token`. Extras inherit no endpoints, credentials, or headers from `primary` or the ambient environment.\n\nEndpoints must be explicit HTTP(S) URLs without userinfo, query, or fragment. Recognized plain-HTTP loopback OTLP endpoints are still refused. More than three extras, unknown fields, duplicate names, or duplicate signal routes (the same effective URL and complete effective header set, including a primary route) invalidate the extras and produce diagnostics. Malformed or unreadable `forwarding.toml` disables **all extras only**, not the primary; no last-known-good extras remain active. An unreadable `config.env` disables all forwarding. File edits reload on the next ingest or status read, without a daemon restart.\n\n`AGENTO11Y_LOCAL_FORWARD=false` (legacy `SIGIL_LOCAL_FORWARD`) stops all new forwarding work, including guard relay. The switch and capture mode are global: only exact `AGENTO11Y_CONTENT_CAPTURE_MODE=full` forwards full content to every recipient; all other modes use the existing `metadata_only` reduction.\n\nIncoming HTTP generations go only to each recipient's Sigil HTTP `endpoint`; incoming OTLP traces and metrics go only to its `otlp_endpoint`. Configure both endpoints to receive both generation transports. The daemon does not re-record through an SDK or convert HTTP generations to OTLP, or OTLP generations to HTTP. Guards relay to `primary` only. Local history imports carry a no-forward marker that excludes **every** recipient.\n\nForwarding is best effort: one attempt per payload per destination, with a 10-second timeout, no retry, replay, or backfill. Each destination admits at most 8 in-flight requests and 128 MiB of input plus prepared output. The daemon has 2 shared preparation slots and allows at most 32 requests and 512 MiB across all destinations. Requests still running after a destination changes or is removed count toward the request and byte limits. Saturation drops affected copies without waiting; destinations are admitted independently. Status tracks attempted, succeeded, failed, and dropped requests per destination and signal. In-memory work can be lost on shutdown. A local acknowledgement confirms local acceptance, **not remote delivery**. Additional recipients increase network traffic, ingest costs, and memory use.\n\nThe viewer's **Settings > Cloud** controls forwarding and lists recipients before enabling full capture. Run `agento11y doctor` for destination status, counters, diagnostics, and the file path; edit extra destinations in `forwarding.toml`. Login does not list extra recipients. Full capture selected in login still applies to all recipients. Ask before enabling full capture or adding recipients. **Disconnect** turns global forwarding off and clears managed primary connection fields, but leaves extra destinations and their credentials saved. Unmanaged or inherited primary environment settings may remain too; re-enabling forwarding can reactivate saved extras and any remaining primary routes.\n\n#### Test local guards offline\n\nFor an offline dry run, use `agento11y guards test 'rm -rf ~\u002F.ssh'`. It does not execute input, check Cloud rules, contact endpoints, start a daemon, or write files. It tests saved policy even when host guard requests are disabled, without predicting host enforcement. Disabled rules and absent packs stay unchanged.\n- Flags precede one quoted command: `agento11y guards test [--json] [--rules path] [--tool name] [--agent name] [--stdin] [--] \u003Ccommand>`. Use `--` before a command starting with a dash. Alternatively, `printf '%s\\n' 'echo first' 'echo second' | agento11y guards test --stdin` reads one command through EOF, preserving newlines. Blank commands and empty tool names are errors.\n- `--rules` bypasses configuration discovery; otherwise use `guards.toml` beside the resolved `config.env`, including the legacy `sigil` fallback. A missing default file or no enforceable rules returns allow with a notice. A missing explicit file is an error. Unchanged legacy packs receive the daemon's in-memory upgrade without changing the file.\n- The synthetic postflight request has one assistant tool call, ID `guards-test`. `--tool` defaults to `Bash` and changes only the name; arguments remain `{\"command\": ...}`. Conditional rules see only `--agent` (default empty). There is no model, tags, agent version, preflight history, system prompt, or arbitrary host payload replay.\n- `--json` emits one deterministic document: `schema_version: 1`, `scope: \"local\"`, `rules: {path, exists, compiled, enforcing}`, `request: {command, tool_name, agent_name}`, `response`, `errors`, and `notices`. Compiled and enforcing values are rule counts. Response is null when no evaluation completed; otherwise it preserves the engine result and ordered evaluations array. Transformed input uses SDK JSON with raw JSON tool arguments. Errors and notices are always arrays. After flag parsing, JSON errors use stdout; stderr stays empty unless writing stdout fails.\n- Exits: `0` = completed allow, including warnings or transforms; `1` = completed deny; `2` = input, file, compilation, evaluation, or output error. Compilation errors take precedence. The output retains the partial response from valid rules. Failed evaluations include warnings and dropped redactions, not just denials. A response rule ID does not identify every transform that ran. Diagnostic JSON includes the submitted command and rewritten content. Do not use real secrets in shared test output; see `agento11y guards test --help` for details.\n\n### History import\n\nUntil an import runs, the viewer and Grafana Cloud hold only sessions captured after installation.\n`agento11y history import` backfills sessions `claude-code`, `codex`, `cursor`, `opencode`, or `pi` already wrote to disk. OpenCode supports v1 and released v2 databases. See [History import](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Ftree\u002Fmain\u002Fplugins\u002Fagento11y#history-import) for limitations.\nAn import sends generations and backdated trace spans but no metrics, so dashboards built on the `gen_ai.client.*` metrics leave imported history out.\n\n```sh\nagento11y history import claude-code --dry-run   # plan only; no setup or export\nagento11y history import claude-code --local     # import into the local store\nagento11y history import claude-code --no-local  # import into Grafana Cloud\n```\n\nThe import resolves the destination in this order: `--no-local`, `--local`, a true `AGENTO11Y_LOCAL` from shell or `config.env`, then saved Cloud credentials. With none set, an interactive run asks where sessions go; `--no-local` or any valid LOCAL value skips that question. Missing Cloud credentials still starts Cloud setup, without **Local web UI**, because local imports never forward to any recipient.\nA noninteractive run never asks: only `--all --yes` imports; otherwise it prints a dry-run plan and exits 0.\n\nWithout `--since`, an import selects sessions active during the last 90 days. Each imported turn is recorded in a ledger per agent and destination, so an import into another destination sends the same turns without `--force`. If saved local mode would keep that import local, add `--no-local`.\nTurns imported before that ledger count as already sent to every destination. Pass `--force` for them only after the user confirms they never reached that destination, with a `--since` that reaches back to the first import (a timestamp is safest); into Grafana Cloud, run it once, right after upgrading and before any other Cloud import, because `--force` re-sends every selected turn and Cloud stores and counts a repeat of a turn it received more than about a day earlier.\nA cancelled or failed run resumes from turns not marked exported.\n\n### Auto-update\n\nClaude, Codex, and OpenCode 1 refresh after a binary version change and, after\nthe first post-install refresh, at most once a day. A relaunch inside that period\ndoes not pick up a plugin fix. `AGENTO11Y_AUTO_UPDATE=0|false|no|off` opts out.\nCopilot and Vibe reconcile hooks on each launch. Pi leaves upgrades to pi's\ninstaller. OpenCode 2 is never refreshed; run `opencode plugin update @grafana\u002Fagento11y-opencode`.\n\n## Further reading\n\n- Product docs: \u003Chttps:\u002F\u002Fgrafana.com\u002Fdocs\u002Fgrafana-cloud\u002Fmachine-learning\u002Fagent-observability\u002F>\n- Source: \u003Chttps:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y>\n",{"name":5,"description":7},"main","8866460f7cb554111889d54402e251354364d4a9","plugins\u002Fagento11y\u002Finternal\u002Fskills\u002Fcontent\u002Fsetup-coding-agent",33,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y","https:\u002F\u002Fgrafana.com\u002Fdocs\u002Fgrafana-cloud\u002Fobserve-and-act\u002Fagent-observability\u002F","https:\u002F\u002Fgithub.com\u002Fgrafana","https:\u002F\u002Fgrafana.com","Grafana Labs is behind leading open source projects Grafana and Loki, and the creator of the first open & composable observability platform.","2026-11-14 06:19:36",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add grafana\u002Fagento11y --skill setup-coding-agent",{"tool":60,"command":61},"bunx","bunx skills add grafana\u002Fagento11y --skill setup-coding-agent",{"tool":63,"command":64},"pnpm","pnpm dlx skills add grafana\u002Fagento11y --skill setup-coding-agent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fagento11y\u002Finternal\u002Fskills\u002Fcontent\u002Fsetup-coding-agent\u002FSKILL.md",true,[],[69,79,105,110,133,156],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6K8HP74Y5CTQZJYSVWFAHPX","agento11y-eval-starter","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fskills\u002Fagento11y-eval-starter\u002FSKILL.md",[],[75,76,77,78],"agento11y eval starter","agento11y","starter","eval",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":39},"01M6K8HHF5TFTNC5XXM7CV04AZ","agento11y-experiments","Run any Python LLM agent as an Agent Observability experiment using the public agento11y.experiments package: define a test suite, run an existing agent through typed trials, bind or record generation I\u002FO, grade outputs, and publish scores, including from stored Grafana test suites.","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fpython\u002Fskills\u002Fagento11y-experiments\u002FSKILL.md",[],[86,76,87,88,89,90,9,91,92,93,94,95,29,96,97,98,99,100,101,102,103,104],"agento11y experiments","experiments","test","test suite","publish","package","observability","run","python","llm agent","record","generation","define","as","bind","trials","Existing","suite","outputs",{"skillNo":106,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M6K8HDADGGWSPKV8F206WAT3","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fopencode\u002Fskills\u002Fagento11y\u002FSKILL.md",[],[76],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":39},"01M6K8H7MZFZ07KHJZD28QFC6S","e2e-test","Optional credential-free Hermes integration checks using an explicit loopback model provider and local telemetry receivers. Inspect the scripts before running them; their defaults are not safe evidence of a local-only run.","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fhermes\u002F.agents\u002Fskills\u002Fe2e-test\u002FSKILL.md",[],[117,118,88,119,120,121,122,123,124,125,93,126,127,128,129,130,131,132],"e2e test","e2e","free","running","inspect","scripts","local","safe","telemetry","integration","model","hermes","only","evidence","credential","provider",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"01M6K8H3856PJVD97YEN021E06","setup-local-guards","Help choose, configure, and test local agento11y guard packs for coding-agent tool calls. Use when the user asks to enable safety packs, protect .env files, block dangerous commands, redact tool arguments, create custom local rules, or diagnose local guards. Covers local packs, not Grafana Cloud rule management or application SDK setup.","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fagento11y\u002Finternal\u002Fskills\u002Fcontent\u002Fsetup-local-guards\u002FSKILL.md",[],[140,123,22,76,9,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,24,88],"setup local guards","guard","configure","tool","choose","Rules","use","files","diagnose","env","calls","test local","for","custom","agent tool","create",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":39},"01M6K8GTK8P6H4EKH4W4ZD7382","commit-message","Draft a commit message when the user describes a code change and asks for a commit message. Not for general questions or explanations.","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fexamples\u002Fexperiments\u002Fclaude-plugin-evals\u002Fcommit-messages\u002Fskills\u002Fcommit-message\u002FSKILL.md",[],[163,164,165,166,167,168,169,38,170,24,152],"commit","commit message","message","draft","questions","general","user","change"]