[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K8HP74Y5CTQZJYSVWFAHPX":3,"skill-same:01M6K8HP74Y5CTQZJYSVWFAHPX":51},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":22,"linkOnly":23,"markdownContent":24,"markdownBody":25,"frontMatter":26,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M6K8HP74Y5CTQZJYSVWFAHPX","agento11y-eval-starter",null,"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\u002Fskills\u002Fagento11y-eval-starter\u002FSKILL.md",[],[18,19,20,21],"eval","starter","agento11y","agento11y eval starter","2026-11-10 10:12:30",false,"---\nname: agento11y-eval-starter\ndescription: Use early in an AI-agent project — before ship, before real traffic — to decide which evaluations to set up and to scaffold a starter experiment. Reads the agent's own code (system prompt, tools, task), recommends specific evaluators with reasons that cite real lines, and writes a labeled draft test suite as an Agent Observability suite YAML. It also assesses how runnable the agent is: for an easily-invoked agent it generates a runner stub (run_experiment.py, or run-experiment.ts for a TypeScript agent) with one hole to fill and can optionally run it (only with permission, only against the endpoint the developer configured); for agents that need a harness or a full runtime it points to the existing eval infra instead of emitting a runner that can't call the agent. It never creates tenant-level evaluators, rules, or guards.\n---\n\n# Agent Observability eval starter\n\nHelp a developer who has an AI agent but no evaluation set up yet. The hard part isn't\nrunning an experiment — it's knowing **what to evaluate** and having **cases to test\nagainst** before there's any traffic. Answer both, grounded in the agent's actual code.\n\nAlways produce:\n\n1. A ranked, justified **evaluator recommendation** for this agent.\n2. A starter **suite YAML** the developer reviews and extends.\n\nThen, depending on how runnable the agent is (Step 1):\n\n3. For an easily-invoked agent, a **runner stub** (`run_experiment.py`, or\n   `run-experiment.ts` for a TypeScript agent) that wires the suite to the SDK\n   with one hole to fill — and optionally run it (Step 6), only with permission.\n   For an agent that needs a harness or full runtime, point to the existing eval infra instead\n   of a runner that can't actually call it.\n\nThis skill is language-agnostic — the reading, recommending, and YAML it produces do not\ndepend on the agent's language. What differs is how runnable the agent is: recommendations +\nYAML always apply, but the runner (Step 4) and the optional run (Step 6) adapt to whether the\nagent has a clean function seam or needs a harness \u002F full stack. For deeper run-side patterns\n(binding existing generations, cross-process verifiers) point to the per-language run skill\n(Python: `agento11y-experiments`).\n\n## Rules\n\n- Do not create, enable, or modify evaluators, rules, or guards in any Agent Observability tenant. No\n  control-plane writes. (Running an offline experiment only publishes that run's scores — it\n  does not create tenant-level evaluators\u002Frules\u002Fguards — but only do it via Step 6.)\n- Do not rewrite the agent's prompt, optimize, or redeploy.\n- Never run the experiment without asking first (Step 6). Never run against a target the\n  developer did not configure — use their `AGENTO11Y_ENDPOINT` + credentials (Grafana Cloud); if\n  they are not set, ask for them, do not invent an endpoint.\n- Never mint, generate, or store credentials. The developer owns their Grafana Cloud\n  ingestion token; read it from the environment or ask them to paste it — do not create one.\n- Never present the generated cases as validated. They are a draft to review and extend.\n- Agent Observability is a Grafana Cloud product. Do not hardcode or assume any endpoint (no `localhost`);\n  the developer supplies their Cloud endpoint and token.\n- If a required input is missing (entrypoint, prompt, tools), ask the developer — don't guess.\n\n## Step 1 — Read the agent\n\nFind and read these in the target repo, and record the file path and line range of each:\n\n1. The agent entrypoint (where the model is invoked).\n2. The system prompt \u002F instructions.\n3. The tool \u002F function definitions the agent can call.\n4. One or two real user requests and what a correct answer looks like.\n\nEvery recommendation must cite one of these locations.\n\nAlso assess **runnability** — how hard it is to invoke this agent for one input and get its\noutput — because it decides what Step 4 produces. Classify it as one of:\n\n- **easy — clean function seam.** A single call takes an input and returns text, with no live\n  services (a small Python\u002FTS agent, an LLM call behind one function). The generated runner\n  works as-is.\n- **in-process — needs a harness.** No 3-line call, but there is an injectable seam (e.g. a\n  Go engine whose LLM client is an interface you can fake, callable from a test binary).\n  Runnable in-process for a smoke\u002Fbehavioral eval, but not a 3-line Python `run_agent`.\n- **full-stack — needs the whole runtime.** The agent needs live backends\u002Fauth\u002Fqueues and is\n  exercised over HTTP against a running stack (tools that hit real datasources, a long\n  multi-step loop). Existing eval infra likely runs it via a dedicated harness and polling,\n  not a function.\n\nSignals that push toward `in-process`\u002F`full-stack`: the agent isn't Python; tools hit real\nAPIs\u002Fdatasources; there is already a dedicated eval harness, Docker stack, or\nscenario\u002Fground-truth files in the repo. If a repo already has eval scenarios with expected\noutputs, note them — they are better test cases than anything generated, and later steps\nshould point to or reuse them.\n\nSeparately, note the **agent's language**, because the agento11y experiments SDK exists in\n**Python, Go, and JavaScript\u002FTypeScript** (not Java or .NET yet). This is independent of\nrunnability — a Java agent can be trivially runnable yet have no experiments SDK in its\nlanguage. If the agent is Python, Go, or TypeScript, the runner is native. If it is Java or\n.NET, say so plainly: the runner must be Python, Go, or TypeScript (calling the agent across a\nprocess boundary), or the developer waits for experiments support in their language. Do not\nimply a native Java or .NET experiments API exists.\n\n## Step 2 — Choose evaluators\n\nThe SDK models an evaluator as an id plus a **kind**. There are two kinds:\n\n- `llm_judge` — a model grades the output against a rubric (relevance, helpfulness,\n  groundedness, tone, task completion, format, safety, and similar judgment calls).\n- `deterministic` — code decides pass\u002Ffail (exact\u002Fsubstring match, JSON validity, schema\n  or regex shape, length bounds, \"not empty\", a required field is present).\n\nPick 3–6 (not more). Map each to what you read in Step 1, and give a one-line `why` per pick\nthat cites a file:line. Common mappings:\n\n| If the agent… | Evaluator | Kind |\n| --- | --- | --- |\n| answers open-ended user requests | `relevance`, `helpfulness` | `llm_judge` |\n| retrieves \u002F cites sources \u002F does RAG | `groundedness` | `llm_judge` |\n| must stay on-topic \u002F in-scope | `task_adherence` | `llm_judge` |\n| must emit JSON or a fixed shape | `json_valid` \u002F `schema_match` | `deterministic` |\n| must follow a specific output format | `format_adherence` | `llm_judge` |\n| calls tools | `tool_call_correct` | `llm_judge` (or `deterministic` if the correct call is checkable in code) |\n| handles user data that could be echoed | `pii_leak` | `llm_judge` |\n| produces public-facing text | `toxicity` | `llm_judge` |\n| must always return something | `response_not_empty` | `deterministic` |\n\nEvaluator ids are yours to choose — pick clear, stable ids. Be concrete about what \"defining\"\neach one means, because it is not an Agent Observability control-plane action here: in the offline SDK flow\nan evaluator is **code the developer writes in the runner** (Step 4). An `llm_judge` is a\nfunction that calls a model and returns a score; a `deterministic` one is a plain code check.\n`experiments.Evaluator(evaluator_id=..., kind=...)` is only the label attached to the score, not the\nlogic. (Forking a predefined template is a separate online-eval path, not needed here.)\n\nOne exception, for tenants that already have evaluators: if the developer points at an evaluator\nthat exists in Agent Observability already, the Python runner can bind the trial to the agent's\nconversation and let that evaluator grade it, instead of writing the check in the runner:\n`trial.bind_conversation(conversation_id)` then `trial.evaluate(\"\u003Cexisting-evaluator-id>\")`. The\ntrial then closes as `completed` with no local `final_score`. Do not create the evaluator to make\nthis work, and do not suggest it when the tenant has none; this skill only uses what is already\nthere.\n\nThis skill targets the **offline** phase: run these evaluators as offline experiments against\nthe suite from Step 3, before there is traffic. Do not recommend live\u002Fonline evaluation to an\nagent with no traffic.\n\nOnce the agent ships and has traffic, the same evaluation criteria can also be applied online\n— as Agent Observability rules over ingested conversations, or as SDK guard hooks on the request path — but\nthose are separate Agent Observability surfaces, configured elsewhere, and out of scope for this skill.\nMention this only as a one-line \"next, once you have traffic\" note; do not instruct on it here.\n\n## Step 3 — Write the suite YAML\n\nWrite a suite file in the target repo (suggest `evals\u002F\u003Cagent>-starter.yaml`). It must load\nwith the SDK's `TestSuite.from_yaml(...)`, so match this schema exactly:\n\n- Top level: `suite_id` (required), plus optional `name`, `version`, `description`, `tags`,\n  `changelog`, and `cases` (a list). `version` defaults to `1.0.0`.\n- Each case: `id` (required), plus optional `name`, `description`, `tags`, `category`,\n  `input`, `expected`, `weight`, `metadata`. `input` and `expected` are free-form (a string\n  or a mapping).\n\nDerive cases from the agent's real task. Produce at least 6, weighted toward `edge` and\n`adversarial` (generated cases skew easy). Use `category` values `happy`, `edge`,\n`adversarial`. Keep the header comment verbatim.\n\nEvery case must actually reach the agent — test the agent, not its harness. From Step 1,\nnote where the entrypoint parses\u002Fvalidates input before the model runs (e.g. a JSON parse, a\nCLI arg check). Do not generate cases that fail in that pre-agent layer (malformed JSON, wrong\nCLI flags) as if they tested the agent; if such a boundary is worth covering, label it clearly\nas a harness case in its notes, or leave it out.\n\n```yaml\n# STARTER DRAFT — review before use. Generated from your agent code (\u003Cfile:line refs>).\n# NOT validated. Add your own real cases; the edge\u002Fadversarial cases need your judgment on\n# expected behavior. Loads with agento11y TestSuite.from_yaml(...).\nsuite_id: \u003Cagent>-starter\nname: \u003CAgent> starter suite\nversion: 1.0.0\ncases:\n  - id: happy-basic-request\n    category: happy\n    tags: [smoke]\n    input:\n      prompt: \"\u003Ca real request this agent is built to answer>\"\n    expected: \"\u003Cwhat a good answer looks like, or a rubric note>\"\n  - id: edge-underspecified\n    category: edge\n    input:\n      prompt: \"\u003Ca vague \u002F multi-part \u002F boundary request>\"\n    expected: \"\u003Chow the agent should handle ambiguity>\"\n  - id: adversarial-prompt-injection\n    category: adversarial\n    input:\n      prompt: \"\u003Can injection \u002F out-of-scope \u002F data-extraction attempt>\"\n    expected: \"\u003Cagent should refuse \u002F stay in scope \u002F not leak>\"\n```\n\n## Step 4 — Write the runner stub (branch on runnability)\n\nThe suite YAML alone does not run anything. The agento11y SDK stores and aggregates scores, but\nit does **not** run the agent or compute the evaluators — the developer writes both. Left at\njust the YAML, a developer new to offline eval is still blocked (\"now what?\"). So generate a\n**minimal bootstrap runner** — just enough to get one experiment running.\n\nThis is deliberately the simplest path, not the full run-side API. The `agento11y-experiments`\nskill is the reference for everything beyond bootstrap — binding an already-instrumented\nagent's real generations\u002Fconversations, auditable LLM-judge grading, cross-process verifiers\n(`TrialRef`), pass@k\u002Fpass^k. Don't reproduce those patterns here; generate the minimal runner\nand point to `agento11y-experiments` for depth.\n\nWhat you generate depends on the runnability you assessed in Step 1:\n\n- **easy** → generate the full runner below: `evals\u002Frun_experiment.py` for a Python or Go\n  agent, `evals\u002Frun-experiment.ts` for a TypeScript agent. One hole to fill (`run_agent`).\n  A Go agent gets the Python runner, because this skill ships no Go template.\n- **in-process** → do NOT emit a Python `run_agent` that can't actually call the agent (e.g.\n  a Go agent). Generate the same experiment wiring, but make `run_agent` shell out to a small\n  harness in the agent's language (or write that harness), and say plainly the seam is the\n  injectable LLM client. Point to any existing test that already invokes the agent in-process\n  as the template.\n- **full-stack** → do NOT emit a runner that pretends to call the agent as a function. The\n  agent runs via its existing eval infra (dedicated harness, Docker stack, HTTP + polling).\n  Deliver the recommendations + YAML, and point to that infra and to any existing\n  scenario\u002Fground-truth files as the real test cases. Be explicit that isolated runs aren't\n  the path here.\n\nAlso branch on **language** (the experiments SDK covers Python, Go, and JavaScript\u002FTypeScript):\n\n- **Python, Go, or TypeScript agent** → native runner (`run_experiment.py`, the Go\n  `agento11y` package, or the `@grafana\u002Fagento11y\u002Fexperiments` subpath).\n- **Java \u002F .NET agent** → there is no experiments SDK in that language. Deliver\n  recommendations + YAML (they are language-neutral), and be honest about the run path: the\n  runner must be Python, Go, or TypeScript calling the agent across a process boundary (e.g. a\n  Python runner that shells out to `java -jar your-agent.jar` and reads its output), or the\n  developer waits for experiments support in their language. Offer the subprocess bridge only as a\n  labeled option with its cost (serializing input to the CLI, parsing output), not as a clean\n  default.\n\nFor an **easy Python or Go** agent, write `evals\u002Frun_experiment.py`. It must:\n\n- Load the suite with `TestSuite.from_yaml(...)`.\n- Open an experiment (`experiments.experiment(...)`) and one `trial` per case.\n- Call the agent through a single clearly-marked function `run_agent(case)` — **this is the\n  one hole the developer fills**; wire it to the real entrypoint you found in Step 1.\n- Include ONE recommended evaluator sketched end-to-end (prefer an `llm_judge` — a real model\n  call that returns a JSON `{score, passed, explanation}`), so they see the shape and can copy\n  it for the others. Reference the rest by name in a comment; do not stub all of them.\n- Record I\u002FO (`trial.record_io(...)`) and emit `trial.final_score(...)` with the evaluator.\n\nKeep the header verbatim, and be honest in it about what still needs doing:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"STARTER RUNNER — generated by agento11y-eval-starter, review before use.\n\nRuns \u003Cagent> over evals\u002F\u003Cagent>-starter.yaml as an Agent Observability experiment and publishes scores.\n\nYou still need to: (1) fill run_agent(case) to call YOUR agent; (2) tune the sketched\njudge; (3) set real credentials — AGENTO11Y_ENDPOINT + AGENTO11Y_AUTH_TOKEN for your Grafana Cloud\nstack. The SDK stores scores; it does not run the agent or the judge.\n\nSet AGENTO11Y_INGEST_ACTOR to a stable value: the run and its trials must share one actor, or\ntrial creation fails with \"401: experiment is owned by another actor\".\n\n    AGENTO11Y_ENDPOINT=... AGENTO11Y_AUTH_TOKEN=... AGENTO11Y_INGEST_ACTOR=ingest:sdk\u002Fpython \\\n        python evals\u002Frun_experiment.py\n\"\"\"\nimport json, os, time\nfrom pathlib import Path\nfrom dotenv import load_dotenv\nfrom agento11y import experiments\n\nload_dotenv()\nSUITE = Path(__file__).parent \u002F \"\u003Cagent>-starter.yaml\"\n\n\ndef run_agent(case: experiments.TestCase) -> str:\n    \"\"\"THE ONE HOLE YOU FILL — call your agent for this case, return its output text.\"\"\"\n    raise NotImplementedError(\"wire this to your agent entrypoint (see Step 1 refs)\")\n\n\ndef judge_\u003Cevaluator>(case_input, output) -> tuple[float, bool, str]:\n    \"\"\"Sketched llm_judge — a model call returning (score 0-1, passed, explanation). Tune it.\"\"\"\n    import litellm\n    prompt = f\"Grade \u003Cwhat this evaluator checks>. Return JSON {{\\\"score\\\":0-1,\\\"passed\\\":bool,\\\"explanation\\\":\\\"...\\\"}}.\\n\\nInput:\\n{case_input}\\n\\nOutput:\\n{output}\"\n    model = os.getenv(\"GRADER_MODEL\") or os.getenv(\"MODEL_NAME\")  # a LIVE model id; no default (dead ids 404)\n    text = litellm.completion(model=model, messages=[{\"role\": \"user\", \"content\": prompt}],\n                              temperature=0, max_tokens=300).choices[0].message.content or \"{}\"\n    s, e = text.find(\"{\"), text.rfind(\"}\")\n    d = json.loads(text[s:e + 1]) if s >= 0 else {}\n    score = max(0.0, min(1.0, float(d.get(\"score\", 0.0))))\n    return score, bool(d.get(\"passed\", score >= 0.6)), str(d.get(\"explanation\", \"\"))\n\n\ndef main() -> None:\n    suite = experiments.TestSuite.from_yaml(str(SUITE))\n    verifier = experiments.Evaluator(evaluator_id=\"\u003Cevaluator>\", version=\"draft-0\", kind=\"llm_judge\")\n    candidate = {\n        \"agent_name\": \"\u003Cagent>\",\n        # Always send a declared agent_version. Without it Agent Observability auto-derives a version from\n        # the system-prompt hash, so you can't reliably attribute scores to a version or\n        # compare versions. Replace \"v1\" with your real version (git tag, prompt version,\n        # semver...) — the \"v1\" fallback is a placeholder, not a version worth comparing.\n        \"agent_version\": os.getenv(\"AGENT_VERSION\", \"v1\"),\n        \"git_sha\": os.getenv(\"GIT_SHA\", \"\"),\n        \"model_name\": os.getenv(\"MODEL_NAME\", \"\"),\n    }\n    with experiments.experiment(name=\"\u003Cagent> starter\", experiment_id=f\"\u003Cagent>-starter-{int(time.time())}\",\n                          suite=suite, candidate=candidate, tags=[\"starter\"],\n                          actor=os.getenv(\"AGENTO11Y_INGEST_ACTOR\", \"ingest:sdk\u002Fpython\")) as exp:\n        for case in suite.test_cases:\n            with exp.trial(case) as trial:\n                out = run_agent(case)\n                trial.record_io(input=json.dumps(case.input), output=out,\n                                model_provider=\"\u003Cprovider>\", model_name=os.getenv(\"MODEL_NAME\", \"\"))\n                score, passed, why = judge_\u003Cevaluator>(case.input, out)\n                trial.final_score(score, passed=passed, explanation=why, evaluator=verifier)\n                print(f\"  {case.test_case_id}: score={score:.2f} passed={passed}\")\n    print(f\"\\nExperiment: {exp.url}\")\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nFor an **easy TypeScript** agent, write `evals\u002Frun-experiment.ts` against the\n`@grafana\u002Fagento11y\u002Fexperiments` subpath. Same shape and same one hole, in JS spellings:\n`parseSuiteYAML(...)` loads the suite, `withExperiment(client, {...}, ...)` and\n`experiment.withTrial(case, ...)` own the lifecycle, `trial.recordIO({input, output})` records\nI\u002FO, and `trial.finalScore(score, {passed, explanation, evaluator})` publishes the verdict:\n\n```ts\n\u002F**\n * STARTER RUNNER - generated by agento11y-eval-starter, review before use.\n *\n * Runs \u003Cagent> over evals\u002F\u003Cagent>-starter.yaml as an Agent Observability experiment and\n * publishes scores.\n *\n * You still need to: (1) fill runAgent(case) to call YOUR agent; (2) tune the sketched judge;\n * (3) set real credentials - AGENTO11Y_ENDPOINT + AGENTO11Y_AUTH_TOKEN for your Grafana Cloud\n * stack. The SDK stores scores; it does not run the agent or the judge.\n *\n * Set AGENTO11Y_INGEST_ACTOR to a stable value: the run and its trials must share one actor,\n * or trial creation fails with \"401: experiment is owned by another actor\".\n *\n *     AGENTO11Y_ENDPOINT=... AGENTO11Y_AUTH_TOKEN=... AGENTO11Y_INGEST_ACTOR=ingest:sdk\u002Fjs \\\n *         npx tsx evals\u002Frun-experiment.ts\n *\u002F\nimport { readFileSync } from 'node:fs';\nimport { ExperimentsClient, parseSuiteYAML, type TestCase, withExperiment } from '@grafana\u002Fagento11y\u002Fexperiments';\n\nconst suite = parseSuiteYAML(readFileSync(new URL('.\u002F\u003Cagent>-starter.yaml', import.meta.url), 'utf8'));\nconst verifier = { evaluatorId: '\u003Cevaluator>', version: 'draft-0', kind: 'llm_judge' } as const;\n\n\u002F** THE ONE HOLE YOU FILL - call your agent for this case and return its output text. *\u002F\nasync function runAgent(testCase: TestCase): Promise\u003Cstring> {\n  throw new Error('wire this to your agent entrypoint (see Step 1 refs)');\n}\n\n\u002F** Sketched llm_judge - one model call returning a 0-1 score, a verdict, and an explanation. *\u002F\nasync function judge(input: unknown, output: string): Promise\u003C{ score: number; passed: boolean; why: string }> {\n  \u002F\u002F Replace with your model call, reading the model id from GRADER_MODEL or MODEL_NAME.\n  \u002F\u002F Use a live model id; there is no default, and a dead id 404s.\n  throw new Error('tune this judge');\n}\n\n\u002F\u002F endpoint, tenantId, and ingestToken fall back to AGENTO11Y_ENDPOINT,\n\u002F\u002F AGENTO11Y_AUTH_TENANT_ID, and AGENTO11Y_AUTH_TOKEN.\nconst client = new ExperimentsClient({ actor: process.env.AGENTO11Y_INGEST_ACTOR ?? 'ingest:sdk\u002Fjs' });\n\nawait withExperiment(\n  client,\n  {\n    \u002F\u002F A fresh id per run: reusing one created by another actor fails with 401.\n    experimentId: `\u003Cagent>-starter-${Math.floor(Date.now() \u002F 1000)}`,\n    name: '\u003Cagent> starter',\n    suite,\n    tags: ['starter'],\n    candidate: {\n      agentName: '\u003Cagent>',\n      \u002F\u002F Always declare a version. Without it Agent Observability derives one from the\n      \u002F\u002F system-prompt hash, and scores cannot be attributed to a version.\n      agentVersion: process.env.AGENT_VERSION ?? 'v1',\n      modelName: process.env.MODEL_NAME ?? '',\n    },\n  },\n  async (experiment) => {\n    for (const testCase of suite.testCases) {\n      await experiment.withTrial(testCase, async (trial) => {\n        const output = await runAgent(testCase);\n        trial.recordIO({ input: JSON.stringify(testCase.input), output });\n        const { score, passed, why } = await judge(testCase.input, output);\n        trial.finalScore(score, { passed, explanation: why, evaluator: verifier });\n        console.log(`  ${testCase.testCaseId}: score=${score} passed=${passed}`);\n      });\n    }\n    console.log(`Experiment: ${experiment.url}`);\n  },\n);\n```\n\nUse a **fresh `experiment_id`** per run (a timestamp works) — reusing an id created by a\ndifferent auth actor fails with `401: experiment is owned by another actor`.\n\n## Step 5 — Summarize and hand off\n\nOutput, in this order:\n\n1. The picked evaluators, each with its kind and its `why` (with file:line).\n   Add a one-line \"once you have traffic, these criteria can also run online (Agent Observability rules or\n   guard hooks) — separate surfaces, not set up here.\"\n2. The paths to the two written files (`evals\u002F\u003Cagent>-starter.yaml` and the runner:\n   `evals\u002Frun_experiment.py`, or `evals\u002Frun-experiment.ts` for TypeScript), and a one-line\n   reminder to review the edge\u002Fadversarial cases and add real ones.\n3. The three things they still do to run it: fill `run_agent(case)` (`runAgent` in TypeScript),\n   tune the sketched judge\n   (and add the other recommended evaluators the same way), and set credentials\n   (`AGENTO11Y_ENDPOINT` + `AGENTO11Y_AUTH_TOKEN`). State the boundary explicitly: this skill only\n   bootstraps the first run; for anything past that — binding an already-instrumented agent's\n   real generations, auditable LLM-judge grading, cross-process verifiers, repeated-sampling\n   metrics — the `agento11y-experiments` skill is the reference.\n4. One line confirming nothing was created in Agent Observability — recommendations and draft files only.\n\n## Step 6 — Offer to run it (optional, only with permission)\n\nOnly offer this for an **easy** agent (clean function seam) **in Python, Go, or TypeScript**\n(the languages with an experiments SDK). For `in-process`\u002F`full-stack` agents, or agents in a\nlanguage with no experiments SDK (Java\u002F.NET), don't offer to run — point to the existing\nharness\u002Finfra (or the subprocess-bridge option) and stop; a real run there is out of scope for\nthis skill.\n\nAfter the summary, offer to run the starter experiment for them — do not run automatically.\nAsk: \"Want me to try running this now?\" Only proceed if they say yes.\n\nIf they accept:\n\n1. Help fill `run_agent(case)` — wire it to the real entrypoint from Step 1, so the runner\n   actually calls their agent.\n2. Preflight the environment and stop with a clear ask if anything is missing:\n   - `AGENTO11Y_ENDPOINT` + `AGENTO11Y_AUTH_TOKEN`. If either is unset, ask the developer for it\n     proactively — `AGENTO11Y_AUTH_TOKEN` is their Grafana Cloud ingestion API key (Cloud portal →\n     stack → API keys), `AGENTO11Y_ENDPOINT` their stack endpoint. **Never mint, generate, or\n     fabricate a token yourself, and never invent an endpoint** — the developer owns the\n     credential and supplies it; you only read it from the environment or ask for it.\n   - `MODEL_NAME` is a live model (dead model ids fail with a 404 not_found).\n   - A stable `AGENTO11Y_INGEST_ACTOR` so run and trials share one actor (else `401: owned by\n     another actor`).\n   - A declared `AGENT_VERSION` (in the candidate). Without it Agent Observability auto-derives a version\n     from the system-prompt hash, and the developer can't attribute scores to a version or\n     compare versions — which is the whole point of the agent's Quality view. Confirm a real\n     value (git tag \u002F prompt version \u002F semver), don't leave it defaulted.\n3. Run against the endpoint the developer configured — never a target they didn't specify.\n   Start with 1–2 cases as a smoke run before the full suite.\n4. Show the per-case scores and the `exp.url`, and note this published one experiment's\n   scores (no tenant evaluators\u002Frules\u002Fguards were created).\n\nIf they decline, stop after the summary.\n","# Agent Observability eval starter\n\nHelp a developer who has an AI agent but no evaluation set up yet. The hard part isn't\nrunning an experiment — it's knowing **what to evaluate** and having **cases to test\nagainst** before there's any traffic. Answer both, grounded in the agent's actual code.\n\nAlways produce:\n\n1. A ranked, justified **evaluator recommendation** for this agent.\n2. A starter **suite YAML** the developer reviews and extends.\n\nThen, depending on how runnable the agent is (Step 1):\n\n3. For an easily-invoked agent, a **runner stub** (`run_experiment.py`, or\n   `run-experiment.ts` for a TypeScript agent) that wires the suite to the SDK\n   with one hole to fill — and optionally run it (Step 6), only with permission.\n   For an agent that needs a harness or full runtime, point to the existing eval infra instead\n   of a runner that can't actually call it.\n\nThis skill is language-agnostic — the reading, recommending, and YAML it produces do not\ndepend on the agent's language. What differs is how runnable the agent is: recommendations +\nYAML always apply, but the runner (Step 4) and the optional run (Step 6) adapt to whether the\nagent has a clean function seam or needs a harness \u002F full stack. For deeper run-side patterns\n(binding existing generations, cross-process verifiers) point to the per-language run skill\n(Python: `agento11y-experiments`).\n\n## Rules\n\n- Do not create, enable, or modify evaluators, rules, or guards in any Agent Observability tenant. No\n  control-plane writes. (Running an offline experiment only publishes that run's scores — it\n  does not create tenant-level evaluators\u002Frules\u002Fguards — but only do it via Step 6.)\n- Do not rewrite the agent's prompt, optimize, or redeploy.\n- Never run the experiment without asking first (Step 6). Never run against a target the\n  developer did not configure — use their `AGENTO11Y_ENDPOINT` + credentials (Grafana Cloud); if\n  they are not set, ask for them, do not invent an endpoint.\n- Never mint, generate, or store credentials. The developer owns their Grafana Cloud\n  ingestion token; read it from the environment or ask them to paste it — do not create one.\n- Never present the generated cases as validated. They are a draft to review and extend.\n- Agent Observability is a Grafana Cloud product. Do not hardcode or assume any endpoint (no `localhost`);\n  the developer supplies their Cloud endpoint and token.\n- If a required input is missing (entrypoint, prompt, tools), ask the developer — don't guess.\n\n## Step 1 — Read the agent\n\nFind and read these in the target repo, and record the file path and line range of each:\n\n1. The agent entrypoint (where the model is invoked).\n2. The system prompt \u002F instructions.\n3. The tool \u002F function definitions the agent can call.\n4. One or two real user requests and what a correct answer looks like.\n\nEvery recommendation must cite one of these locations.\n\nAlso assess **runnability** — how hard it is to invoke this agent for one input and get its\noutput — because it decides what Step 4 produces. Classify it as one of:\n\n- **easy — clean function seam.** A single call takes an input and returns text, with no live\n  services (a small Python\u002FTS agent, an LLM call behind one function). The generated runner\n  works as-is.\n- **in-process — needs a harness.** No 3-line call, but there is an injectable seam (e.g. a\n  Go engine whose LLM client is an interface you can fake, callable from a test binary).\n  Runnable in-process for a smoke\u002Fbehavioral eval, but not a 3-line Python `run_agent`.\n- **full-stack — needs the whole runtime.** The agent needs live backends\u002Fauth\u002Fqueues and is\n  exercised over HTTP against a running stack (tools that hit real datasources, a long\n  multi-step loop). Existing eval infra likely runs it via a dedicated harness and polling,\n  not a function.\n\nSignals that push toward `in-process`\u002F`full-stack`: the agent isn't Python; tools hit real\nAPIs\u002Fdatasources; there is already a dedicated eval harness, Docker stack, or\nscenario\u002Fground-truth files in the repo. If a repo already has eval scenarios with expected\noutputs, note them — they are better test cases than anything generated, and later steps\nshould point to or reuse them.\n\nSeparately, note the **agent's language**, because the agento11y experiments SDK exists in\n**Python, Go, and JavaScript\u002FTypeScript** (not Java or .NET yet). This is independent of\nrunnability — a Java agent can be trivially runnable yet have no experiments SDK in its\nlanguage. If the agent is Python, Go, or TypeScript, the runner is native. If it is Java or\n.NET, say so plainly: the runner must be Python, Go, or TypeScript (calling the agent across a\nprocess boundary), or the developer waits for experiments support in their language. Do not\nimply a native Java or .NET experiments API exists.\n\n## Step 2 — Choose evaluators\n\nThe SDK models an evaluator as an id plus a **kind**. There are two kinds:\n\n- `llm_judge` — a model grades the output against a rubric (relevance, helpfulness,\n  groundedness, tone, task completion, format, safety, and similar judgment calls).\n- `deterministic` — code decides pass\u002Ffail (exact\u002Fsubstring match, JSON validity, schema\n  or regex shape, length bounds, \"not empty\", a required field is present).\n\nPick 3–6 (not more). Map each to what you read in Step 1, and give a one-line `why` per pick\nthat cites a file:line. Common mappings:\n\n| If the agent… | Evaluator | Kind |\n| --- | --- | --- |\n| answers open-ended user requests | `relevance`, `helpfulness` | `llm_judge` |\n| retrieves \u002F cites sources \u002F does RAG | `groundedness` | `llm_judge` |\n| must stay on-topic \u002F in-scope | `task_adherence` | `llm_judge` |\n| must emit JSON or a fixed shape | `json_valid` \u002F `schema_match` | `deterministic` |\n| must follow a specific output format | `format_adherence` | `llm_judge` |\n| calls tools | `tool_call_correct` | `llm_judge` (or `deterministic` if the correct call is checkable in code) |\n| handles user data that could be echoed | `pii_leak` | `llm_judge` |\n| produces public-facing text | `toxicity` | `llm_judge` |\n| must always return something | `response_not_empty` | `deterministic` |\n\nEvaluator ids are yours to choose — pick clear, stable ids. Be concrete about what \"defining\"\neach one means, because it is not an Agent Observability control-plane action here: in the offline SDK flow\nan evaluator is **code the developer writes in the runner** (Step 4). An `llm_judge` is a\nfunction that calls a model and returns a score; a `deterministic` one is a plain code check.\n`experiments.Evaluator(evaluator_id=..., kind=...)` is only the label attached to the score, not the\nlogic. (Forking a predefined template is a separate online-eval path, not needed here.)\n\nOne exception, for tenants that already have evaluators: if the developer points at an evaluator\nthat exists in Agent Observability already, the Python runner can bind the trial to the agent's\nconversation and let that evaluator grade it, instead of writing the check in the runner:\n`trial.bind_conversation(conversation_id)` then `trial.evaluate(\"\u003Cexisting-evaluator-id>\")`. The\ntrial then closes as `completed` with no local `final_score`. Do not create the evaluator to make\nthis work, and do not suggest it when the tenant has none; this skill only uses what is already\nthere.\n\nThis skill targets the **offline** phase: run these evaluators as offline experiments against\nthe suite from Step 3, before there is traffic. Do not recommend live\u002Fonline evaluation to an\nagent with no traffic.\n\nOnce the agent ships and has traffic, the same evaluation criteria can also be applied online\n— as Agent Observability rules over ingested conversations, or as SDK guard hooks on the request path — but\nthose are separate Agent Observability surfaces, configured elsewhere, and out of scope for this skill.\nMention this only as a one-line \"next, once you have traffic\" note; do not instruct on it here.\n\n## Step 3 — Write the suite YAML\n\nWrite a suite file in the target repo (suggest `evals\u002F\u003Cagent>-starter.yaml`). It must load\nwith the SDK's `TestSuite.from_yaml(...)`, so match this schema exactly:\n\n- Top level: `suite_id` (required), plus optional `name`, `version`, `description`, `tags`,\n  `changelog`, and `cases` (a list). `version` defaults to `1.0.0`.\n- Each case: `id` (required), plus optional `name`, `description`, `tags`, `category`,\n  `input`, `expected`, `weight`, `metadata`. `input` and `expected` are free-form (a string\n  or a mapping).\n\nDerive cases from the agent's real task. Produce at least 6, weighted toward `edge` and\n`adversarial` (generated cases skew easy). Use `category` values `happy`, `edge`,\n`adversarial`. Keep the header comment verbatim.\n\nEvery case must actually reach the agent — test the agent, not its harness. From Step 1,\nnote where the entrypoint parses\u002Fvalidates input before the model runs (e.g. a JSON parse, a\nCLI arg check). Do not generate cases that fail in that pre-agent layer (malformed JSON, wrong\nCLI flags) as if they tested the agent; if such a boundary is worth covering, label it clearly\nas a harness case in its notes, or leave it out.\n\n```yaml\n# STARTER DRAFT — review before use. Generated from your agent code (\u003Cfile:line refs>).\n# NOT validated. Add your own real cases; the edge\u002Fadversarial cases need your judgment on\n# expected behavior. Loads with agento11y TestSuite.from_yaml(...).\nsuite_id: \u003Cagent>-starter\nname: \u003CAgent> starter suite\nversion: 1.0.0\ncases:\n  - id: happy-basic-request\n    category: happy\n    tags: [smoke]\n    input:\n      prompt: \"\u003Ca real request this agent is built to answer>\"\n    expected: \"\u003Cwhat a good answer looks like, or a rubric note>\"\n  - id: edge-underspecified\n    category: edge\n    input:\n      prompt: \"\u003Ca vague \u002F multi-part \u002F boundary request>\"\n    expected: \"\u003Chow the agent should handle ambiguity>\"\n  - id: adversarial-prompt-injection\n    category: adversarial\n    input:\n      prompt: \"\u003Can injection \u002F out-of-scope \u002F data-extraction attempt>\"\n    expected: \"\u003Cagent should refuse \u002F stay in scope \u002F not leak>\"\n```\n\n## Step 4 — Write the runner stub (branch on runnability)\n\nThe suite YAML alone does not run anything. The agento11y SDK stores and aggregates scores, but\nit does **not** run the agent or compute the evaluators — the developer writes both. Left at\njust the YAML, a developer new to offline eval is still blocked (\"now what?\"). So generate a\n**minimal bootstrap runner** — just enough to get one experiment running.\n\nThis is deliberately the simplest path, not the full run-side API. The `agento11y-experiments`\nskill is the reference for everything beyond bootstrap — binding an already-instrumented\nagent's real generations\u002Fconversations, auditable LLM-judge grading, cross-process verifiers\n(`TrialRef`), pass@k\u002Fpass^k. Don't reproduce those patterns here; generate the minimal runner\nand point to `agento11y-experiments` for depth.\n\nWhat you generate depends on the runnability you assessed in Step 1:\n\n- **easy** → generate the full runner below: `evals\u002Frun_experiment.py` for a Python or Go\n  agent, `evals\u002Frun-experiment.ts` for a TypeScript agent. One hole to fill (`run_agent`).\n  A Go agent gets the Python runner, because this skill ships no Go template.\n- **in-process** → do NOT emit a Python `run_agent` that can't actually call the agent (e.g.\n  a Go agent). Generate the same experiment wiring, but make `run_agent` shell out to a small\n  harness in the agent's language (or write that harness), and say plainly the seam is the\n  injectable LLM client. Point to any existing test that already invokes the agent in-process\n  as the template.\n- **full-stack** → do NOT emit a runner that pretends to call the agent as a function. The\n  agent runs via its existing eval infra (dedicated harness, Docker stack, HTTP + polling).\n  Deliver the recommendations + YAML, and point to that infra and to any existing\n  scenario\u002Fground-truth files as the real test cases. Be explicit that isolated runs aren't\n  the path here.\n\nAlso branch on **language** (the experiments SDK covers Python, Go, and JavaScript\u002FTypeScript):\n\n- **Python, Go, or TypeScript agent** → native runner (`run_experiment.py`, the Go\n  `agento11y` package, or the `@grafana\u002Fagento11y\u002Fexperiments` subpath).\n- **Java \u002F .NET agent** → there is no experiments SDK in that language. Deliver\n  recommendations + YAML (they are language-neutral), and be honest about the run path: the\n  runner must be Python, Go, or TypeScript calling the agent across a process boundary (e.g. a\n  Python runner that shells out to `java -jar your-agent.jar` and reads its output), or the\n  developer waits for experiments support in their language. Offer the subprocess bridge only as a\n  labeled option with its cost (serializing input to the CLI, parsing output), not as a clean\n  default.\n\nFor an **easy Python or Go** agent, write `evals\u002Frun_experiment.py`. It must:\n\n- Load the suite with `TestSuite.from_yaml(...)`.\n- Open an experiment (`experiments.experiment(...)`) and one `trial` per case.\n- Call the agent through a single clearly-marked function `run_agent(case)` — **this is the\n  one hole the developer fills**; wire it to the real entrypoint you found in Step 1.\n- Include ONE recommended evaluator sketched end-to-end (prefer an `llm_judge` — a real model\n  call that returns a JSON `{score, passed, explanation}`), so they see the shape and can copy\n  it for the others. Reference the rest by name in a comment; do not stub all of them.\n- Record I\u002FO (`trial.record_io(...)`) and emit `trial.final_score(...)` with the evaluator.\n\nKeep the header verbatim, and be honest in it about what still needs doing:\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"STARTER RUNNER — generated by agento11y-eval-starter, review before use.\n\nRuns \u003Cagent> over evals\u002F\u003Cagent>-starter.yaml as an Agent Observability experiment and publishes scores.\n\nYou still need to: (1) fill run_agent(case) to call YOUR agent; (2) tune the sketched\njudge; (3) set real credentials — AGENTO11Y_ENDPOINT + AGENTO11Y_AUTH_TOKEN for your Grafana Cloud\nstack. The SDK stores scores; it does not run the agent or the judge.\n\nSet AGENTO11Y_INGEST_ACTOR to a stable value: the run and its trials must share one actor, or\ntrial creation fails with \"401: experiment is owned by another actor\".\n\n    AGENTO11Y_ENDPOINT=... AGENTO11Y_AUTH_TOKEN=... AGENTO11Y_INGEST_ACTOR=ingest:sdk\u002Fpython \\\n        python evals\u002Frun_experiment.py\n\"\"\"\nimport json, os, time\nfrom pathlib import Path\nfrom dotenv import load_dotenv\nfrom agento11y import experiments\n\nload_dotenv()\nSUITE = Path(__file__).parent \u002F \"\u003Cagent>-starter.yaml\"\n\n\ndef run_agent(case: experiments.TestCase) -> str:\n    \"\"\"THE ONE HOLE YOU FILL — call your agent for this case, return its output text.\"\"\"\n    raise NotImplementedError(\"wire this to your agent entrypoint (see Step 1 refs)\")\n\n\ndef judge_\u003Cevaluator>(case_input, output) -> tuple[float, bool, str]:\n    \"\"\"Sketched llm_judge — a model call returning (score 0-1, passed, explanation). Tune it.\"\"\"\n    import litellm\n    prompt = f\"Grade \u003Cwhat this evaluator checks>. Return JSON {{\\\"score\\\":0-1,\\\"passed\\\":bool,\\\"explanation\\\":\\\"...\\\"}}.\\n\\nInput:\\n{case_input}\\n\\nOutput:\\n{output}\"\n    model = os.getenv(\"GRADER_MODEL\") or os.getenv(\"MODEL_NAME\")  # a LIVE model id; no default (dead ids 404)\n    text = litellm.completion(model=model, messages=[{\"role\": \"user\", \"content\": prompt}],\n                              temperature=0, max_tokens=300).choices[0].message.content or \"{}\"\n    s, e = text.find(\"{\"), text.rfind(\"}\")\n    d = json.loads(text[s:e + 1]) if s >= 0 else {}\n    score = max(0.0, min(1.0, float(d.get(\"score\", 0.0))))\n    return score, bool(d.get(\"passed\", score >= 0.6)), str(d.get(\"explanation\", \"\"))\n\n\ndef main() -> None:\n    suite = experiments.TestSuite.from_yaml(str(SUITE))\n    verifier = experiments.Evaluator(evaluator_id=\"\u003Cevaluator>\", version=\"draft-0\", kind=\"llm_judge\")\n    candidate = {\n        \"agent_name\": \"\u003Cagent>\",\n        # Always send a declared agent_version. Without it Agent Observability auto-derives a version from\n        # the system-prompt hash, so you can't reliably attribute scores to a version or\n        # compare versions. Replace \"v1\" with your real version (git tag, prompt version,\n        # semver...) — the \"v1\" fallback is a placeholder, not a version worth comparing.\n        \"agent_version\": os.getenv(\"AGENT_VERSION\", \"v1\"),\n        \"git_sha\": os.getenv(\"GIT_SHA\", \"\"),\n        \"model_name\": os.getenv(\"MODEL_NAME\", \"\"),\n    }\n    with experiments.experiment(name=\"\u003Cagent> starter\", experiment_id=f\"\u003Cagent>-starter-{int(time.time())}\",\n                          suite=suite, candidate=candidate, tags=[\"starter\"],\n                          actor=os.getenv(\"AGENTO11Y_INGEST_ACTOR\", \"ingest:sdk\u002Fpython\")) as exp:\n        for case in suite.test_cases:\n            with exp.trial(case) as trial:\n                out = run_agent(case)\n                trial.record_io(input=json.dumps(case.input), output=out,\n                                model_provider=\"\u003Cprovider>\", model_name=os.getenv(\"MODEL_NAME\", \"\"))\n                score, passed, why = judge_\u003Cevaluator>(case.input, out)\n                trial.final_score(score, passed=passed, explanation=why, evaluator=verifier)\n                print(f\"  {case.test_case_id}: score={score:.2f} passed={passed}\")\n    print(f\"\\nExperiment: {exp.url}\")\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nFor an **easy TypeScript** agent, write `evals\u002Frun-experiment.ts` against the\n`@grafana\u002Fagento11y\u002Fexperiments` subpath. Same shape and same one hole, in JS spellings:\n`parseSuiteYAML(...)` loads the suite, `withExperiment(client, {...}, ...)` and\n`experiment.withTrial(case, ...)` own the lifecycle, `trial.recordIO({input, output})` records\nI\u002FO, and `trial.finalScore(score, {passed, explanation, evaluator})` publishes the verdict:\n\n```ts\n\u002F**\n * STARTER RUNNER - generated by agento11y-eval-starter, review before use.\n *\n * Runs \u003Cagent> over evals\u002F\u003Cagent>-starter.yaml as an Agent Observability experiment and\n * publishes scores.\n *\n * You still need to: (1) fill runAgent(case) to call YOUR agent; (2) tune the sketched judge;\n * (3) set real credentials - AGENTO11Y_ENDPOINT + AGENTO11Y_AUTH_TOKEN for your Grafana Cloud\n * stack. The SDK stores scores; it does not run the agent or the judge.\n *\n * Set AGENTO11Y_INGEST_ACTOR to a stable value: the run and its trials must share one actor,\n * or trial creation fails with \"401: experiment is owned by another actor\".\n *\n *     AGENTO11Y_ENDPOINT=... AGENTO11Y_AUTH_TOKEN=... AGENTO11Y_INGEST_ACTOR=ingest:sdk\u002Fjs \\\n *         npx tsx evals\u002Frun-experiment.ts\n *\u002F\nimport { readFileSync } from 'node:fs';\nimport { ExperimentsClient, parseSuiteYAML, type TestCase, withExperiment } from '@grafana\u002Fagento11y\u002Fexperiments';\n\nconst suite = parseSuiteYAML(readFileSync(new URL('.\u002F\u003Cagent>-starter.yaml', import.meta.url), 'utf8'));\nconst verifier = { evaluatorId: '\u003Cevaluator>', version: 'draft-0', kind: 'llm_judge' } as const;\n\n\u002F** THE ONE HOLE YOU FILL - call your agent for this case and return its output text. *\u002F\nasync function runAgent(testCase: TestCase): Promise\u003Cstring> {\n  throw new Error('wire this to your agent entrypoint (see Step 1 refs)');\n}\n\n\u002F** Sketched llm_judge - one model call returning a 0-1 score, a verdict, and an explanation. *\u002F\nasync function judge(input: unknown, output: string): Promise\u003C{ score: number; passed: boolean; why: string }> {\n  \u002F\u002F Replace with your model call, reading the model id from GRADER_MODEL or MODEL_NAME.\n  \u002F\u002F Use a live model id; there is no default, and a dead id 404s.\n  throw new Error('tune this judge');\n}\n\n\u002F\u002F endpoint, tenantId, and ingestToken fall back to AGENTO11Y_ENDPOINT,\n\u002F\u002F AGENTO11Y_AUTH_TENANT_ID, and AGENTO11Y_AUTH_TOKEN.\nconst client = new ExperimentsClient({ actor: process.env.AGENTO11Y_INGEST_ACTOR ?? 'ingest:sdk\u002Fjs' });\n\nawait withExperiment(\n  client,\n  {\n    \u002F\u002F A fresh id per run: reusing one created by another actor fails with 401.\n    experimentId: `\u003Cagent>-starter-${Math.floor(Date.now() \u002F 1000)}`,\n    name: '\u003Cagent> starter',\n    suite,\n    tags: ['starter'],\n    candidate: {\n      agentName: '\u003Cagent>',\n      \u002F\u002F Always declare a version. Without it Agent Observability derives one from the\n      \u002F\u002F system-prompt hash, and scores cannot be attributed to a version.\n      agentVersion: process.env.AGENT_VERSION ?? 'v1',\n      modelName: process.env.MODEL_NAME ?? '',\n    },\n  },\n  async (experiment) => {\n    for (const testCase of suite.testCases) {\n      await experiment.withTrial(testCase, async (trial) => {\n        const output = await runAgent(testCase);\n        trial.recordIO({ input: JSON.stringify(testCase.input), output });\n        const { score, passed, why } = await judge(testCase.input, output);\n        trial.finalScore(score, { passed, explanation: why, evaluator: verifier });\n        console.log(`  ${testCase.testCaseId}: score=${score} passed=${passed}`);\n      });\n    }\n    console.log(`Experiment: ${experiment.url}`);\n  },\n);\n```\n\nUse a **fresh `experiment_id`** per run (a timestamp works) — reusing an id created by a\ndifferent auth actor fails with `401: experiment is owned by another actor`.\n\n## Step 5 — Summarize and hand off\n\nOutput, in this order:\n\n1. The picked evaluators, each with its kind and its `why` (with file:line).\n   Add a one-line \"once you have traffic, these criteria can also run online (Agent Observability rules or\n   guard hooks) — separate surfaces, not set up here.\"\n2. The paths to the two written files (`evals\u002F\u003Cagent>-starter.yaml` and the runner:\n   `evals\u002Frun_experiment.py`, or `evals\u002Frun-experiment.ts` for TypeScript), and a one-line\n   reminder to review the edge\u002Fadversarial cases and add real ones.\n3. The three things they still do to run it: fill `run_agent(case)` (`runAgent` in TypeScript),\n   tune the sketched judge\n   (and add the other recommended evaluators the same way), and set credentials\n   (`AGENTO11Y_ENDPOINT` + `AGENTO11Y_AUTH_TOKEN`). State the boundary explicitly: this skill only\n   bootstraps the first run; for anything past that — binding an already-instrumented agent's\n   real generations, auditable LLM-judge grading, cross-process verifiers, repeated-sampling\n   metrics — the `agento11y-experiments` skill is the reference.\n4. One line confirming nothing was created in Agent Observability — recommendations and draft files only.\n\n## Step 6 — Offer to run it (optional, only with permission)\n\nOnly offer this for an **easy** agent (clean function seam) **in Python, Go, or TypeScript**\n(the languages with an experiments SDK). For `in-process`\u002F`full-stack` agents, or agents in a\nlanguage with no experiments SDK (Java\u002F.NET), don't offer to run — point to the existing\nharness\u002Finfra (or the subprocess-bridge option) and stop; a real run there is out of scope for\nthis skill.\n\nAfter the summary, offer to run the starter experiment for them — do not run automatically.\nAsk: \"Want me to try running this now?\" Only proceed if they say yes.\n\nIf they accept:\n\n1. Help fill `run_agent(case)` — wire it to the real entrypoint from Step 1, so the runner\n   actually calls their agent.\n2. Preflight the environment and stop with a clear ask if anything is missing:\n   - `AGENTO11Y_ENDPOINT` + `AGENTO11Y_AUTH_TOKEN`. If either is unset, ask the developer for it\n     proactively — `AGENTO11Y_AUTH_TOKEN` is their Grafana Cloud ingestion API key (Cloud portal →\n     stack → API keys), `AGENTO11Y_ENDPOINT` their stack endpoint. **Never mint, generate, or\n     fabricate a token yourself, and never invent an endpoint** — the developer owns the\n     credential and supplies it; you only read it from the environment or ask for it.\n   - `MODEL_NAME` is a live model (dead model ids fail with a 404 not_found).\n   - A stable `AGENTO11Y_INGEST_ACTOR` so run and trials share one actor (else `401: owned by\n     another actor`).\n   - A declared `AGENT_VERSION` (in the candidate). Without it Agent Observability auto-derives a version\n     from the system-prompt hash, and the developer can't attribute scores to a version or\n     compare versions — which is the whole point of the agent's Quality view. Confirm a real\n     value (git tag \u002F prompt version \u002F semver), don't leave it defaulted.\n3. Run against the endpoint the developer configured — never a target they didn't specify.\n   Start with 1–2 cases as a smoke run before the full suite.\n4. Show the per-case scores and the `exp.url`, and note this published one experiment's\n   scores (no tenant evaluators\u002Frules\u002Fguards were created).\n\nIf they decline, stop after the summary.\n",{},"main","8866460f7cb554111889d54402e251354364d4a9","skills\u002Fagento11y-eval-starter",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":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add grafana\u002Fagento11y --skill agento11y-eval-starter",{"tool":43,"command":44},"bunx","bunx skills add grafana\u002Fagento11y --skill agento11y-eval-starter",{"tool":46,"command":47},"pnpm","pnpm dlx skills add grafana\u002Fagento11y --skill agento11y-eval-starter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fskills\u002Fagento11y-eval-starter\u002FSKILL.md",true,[],[52,79,84,107,132,156],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":22},"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",[],[59,60,20,61,8,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78],"experiments","agento11y experiments","outputs","define","as","generation","record","agent observability","llm agent","test suite","publish","bind","package","observability","run","trials","test","python","Existing","suite",{"skillNo":80,"name":20,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":22},"01M6K8HDADGGWSPKV8F206WAT3","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fopencode\u002Fskills\u002Fagento11y\u002FSKILL.md",[],[20],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":22},"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",[],[75,91,92,93,94,95,96,97,98,99,100,101,102,103,73,104,105,106],"e2e","e2e test","hermes","scripts","free","local","provider","credential","evidence","only","inspect","model","integration","telemetry","safe","running",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":22},"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",[],[114,96,115,116,117,118,119,120,121,122,123,124,125,126,127,20,128,129,8,130,131,75],"setup local guards","setup","when","tool","agent tool","custom","for","test local","calls","env","files","use","Rules","choose","configure","guard","create","diagnose",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":22},"01M6K8GY2C5H8Y6TYPKZQM2NM0","setup-coding-agent","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.","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fagento11y\u002Fblob\u002Fmain\u002Fplugins\u002Fagento11y\u002Finternal\u002Fskills\u002Fcontent\u002Fsetup-coding-agent\u002FSKILL.md",[],[139,140,115,141,142,66,143,144,145,146,147,148,149,150,8,151,152,153,116,154,155],"setup coding agent","coding","coding agent","code","opencode","up","install","broken","why","credentials","SET","pipeline","show","copilot","cli","conversations","kiro",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":22},"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,116,120,167,168,169,170,142],"commit","message","commit message","change","questions","draft","general","user"]