Skip to main content
Everything here runs locally. You’ll need Node 20.6+ - that’s the only prerequisite. Prefer to watch first? This short walkthrough covers installing Coach and a quick tour of using it - then follow the written steps below.

Start Coach

Run it once with npx, or install it permanently - same result:
Coach starts a server, an embedded database, and the dashboard - all in one process - and prints everything you need to connect an agent:
It opens http://127.0.0.1:5899 for you. On a fresh store you’ll land on a Waiting for traces screen - and both the terminal and the dashboard hand you a copy-paste onboarding prompt for your coding agent, with that ingest key already baked in.
Something not right? glassray-coach doctor checks your Node version, the port, and that the data directory is writable - with one-line fixes.

Hand setup to your coding agent

The fastest path: in an interactive terminal, start offers a setup menu on a fresh store - choose Run Claude Code here and it runs your own claude headlessly on the onboarding prompt, with a live activity feed and git commit/git push hard-blocked, so the wiring lands as an uncommitted diff you review. Or take the prompt yourself: click Copy prompt on the dashboard (or pick the copy option in the menu) and paste it into Claude Code, Codex, or Copilot in your agent’s repo. Either way your agent installs the Coach skill, discovers your flows and rules straight from your code (flows discover), wires tracing to the printed endpoint + key, verifies the first trace lands, and reports its coverage. From then on you only run your agent.Prefer to wire it yourself? The next step is the manual version - and the dashboard keeps the same recipes one tab away.

Send a trace (by hand)

Point your agent at Coach - two env vars, both printed when Coach starts:
Then with the @glassray/tracing SDK it’s a few lines:
No agent wired up yet? The dashboard’s empty state has a raw-OTLP recipe too - see Send traces for every option.

Watch it land - live

Back in the browser, the trace appears instantly - no refresh. Open Traces → a row for the span waterfall and an inspector with every input, output, and attribute. Select an LLM span and hit Replay to re-issue it with an edited prompt.

Find recurring deviations

Once you’ve captured a batch of runs, go to Deviations → Run discovery. Coach’s judge reads your traces and clusters the recurring ways your agent strays - the silent failures, not just crashes.
Discovery needs a model. With Claude Code installed, Coach uses your local ~/.claude automatically - no key. Or pick a provider and models on the dashboard’s Settings page; see providers for the full list.

Generate a fix, then lock it in

Open a deviation and click Generate fix - Coach writes a concrete fix as instructions you paste into Claude Code or Cursor (what to grep for, which files, the exact edits). Click Save as eval to freeze the deviation’s rule into a repeatable pass/fail check, and bind it to a flow - a durable, named scope for that behaviour (e.g. “order-status questions”) that Coach keeps classifying new traffic into. (You can also Save as eval straight from a trace’s detail view.)Apply the fix and send fresh traffic - that’s it: the new traces classify into the flow in the background, the eval reruns on its own once enough land, the pass rate climbs, and anything that breaks a formerly-passing case is flagged as a regression. Then Mark resolved.
That’s the whole self-healing loop - see it, find it, scope it, fix it, and it proves itself from then on. Walk through it end to end in Find & fix deviations.

Next steps

Send traces

The SDK, raw OTLP, and how to capture inputs and tokens.

Find & fix deviations

A worked example: discover → codify → fix → prove no regression.

CLI & coding agents

Every command, provider config, and the cross-agent skill.

Overview

What Coach is and how it fits alongside hosted Glassray.