Experiments

Test a change to your agent before you ship it. Your coding agent runs the test; neatlogs shows the progress and the result.

Beta
Experiments is in beta. It is live and you can use it today; screens, CLI flags and limits may still change. Send feedback or problems to neatlogs-support@neatlogs.com.

Say your agent writes video briefs with an expensive model, and you want to know whether a cheaper model is just as good. Your agent exactly as it is today is A. The same agent with one change, the cheaper model, is B. Both run the same inputs (the cases), the same judge grades both, and you get a verdict: keep A, or switch to B.

That is an experiment: one goal for your agent ("use a cheaper model without losing quality"), tested by comparing A with B. A is always what you have now; B is always A plus one change.

You don't set up the test in neatlogs. You copy a prompt from neatlogs into the coding agent you already use. The coding agent does the work from your agent's project folder. neatlogs shows what it is doing and what it found.

Claude Code and Codex are supported: the setup prompt installs what they need. Experiments also work with any other coding agent that can run shell commands and read the skill file (for example Cursor), but there is no one-command install for those.

How an experiment works

  1. You give a goal. Paste the setup prompt into your coding agent and say what you want to improve and what must not get worse.
  2. Your coding agent sets up the test. It creates the experiment, picks or records the cases, writes the questions, creates the judge, and chooses the detections. It shows you a short plan before it runs anything.
  3. It runs a round. A round compares A and B on the same cases. A runs every case, then B runs every case. The judge grades each case run. Detections check each run for known problems.
  4. It records the result. For each round the coding agent saves a verdict, the reason, and a next step: run another round with a new idea, or finish.
  5. You read the result in neatlogs. Open improve → experiments to see every experiment, its status and its result.

An experiment can have several rounds. Each new idea, or any change to the cases or the judge, gets a new round. A round's setup never changes. A complete result never changes either; only a result recorded as incomplete can be replaced, after the missing grading or detections finish. See How rounds work.

Walking through the experiments list, cost and latency verdict, and rubric grades in neatlogs

Humans vs. coding agents: who owns what

Experiments split execution cleanly between your coding agent (using neatlogs-cli 0.2.3+ and the neatlogs-local-testing skill) and you in the neatlogs dashboard:

StepCoding agent (CLI & skill)Human (Dashboard & review)Gap & approval owner
Sign-in & scopesRuns neatlogs auth login --device with the 7 experiment scopes and checks whoami.Approves the OAuth login in the browser under their own Member or Admin account.Human must sign in; service accounts cannot run Experiments.
Goal & planDrafts cases, questions, judge, and detections, then presents a short plan.States the goal ("what improves and what must not regress") and approves the plan.Human owns the decision rule before any round runs.
Run roundsCreates rounds (neatlogs experiments round), runs A and B locally (neatlogs local connect), and waits for grading (neatlogs experiments checks).Watches live progress in improve → experiments.Agent runs cases and records outputs; stops on Needs attention errors.
Draft detectionsProposes draft detections for newly discovered failure modes.Reviews and approves drafted detections (requires Project Admin).Human (Project Admin) approves any detection before it runs on production traffic.
Ship decisionRecords the round verdict (neatlogs experiments record) and leaves B's code on a branch.Reads B wins / Keep A / Tie / Inconclusive, inspects case diffs, and merges or discards B.Human owns shipping code and verifying recovery in production.

For exact commands, flags, and error codes, see Reference for coding agents.

Before you start

You need all of these. The coding agent checks them too; when one is missing, it tells you which, and you fix it.

You needWhyHow to check
A Neatlogs project where your role is Member or AdminRunning experiments needs permission to manage evals. A Viewer can read results but cannot run an experiment.See Permissions and limits.
Your agent sending traces to NeatlogsEach case run is recorded as a trace.Open traces and find a recent run of your agent. If there is none, start with Instrument with coding agents.
The neatlogs CLI 0.2.3 or later, on Node.js 22 or 24The coding agent works through the CLI.Run neatlogs --version. To install or update: npm install --global neatlogs-cli@latest. See neatlogs CLI.
A model connection for the judgeThe judge is an AI evaluator. It needs a model from your project or organization.See Model providers and keys.
A browser where you are signed in to NeatlogsYou approve the CLI sign-in in the browser once.Open your Neatlogs dashboard.

Experiments run under your own sign-in. A service-account token can't create or run experiments.

Start your first experiment

The New experiment menu with Copy prompt

Copy the setup prompt. In Neatlogs, open improve → experiments and select New experiment. The menu reads Start an experiment · from Claude Code, Codex and more. Select Copy prompt; it shows Copied. In a project with no experiments yet, select Copy setup prompt on the page instead. The prompt already contains your project ID and your Neatlogs address.

Open your coding agent in your agent's project folder. That is the folder with the code of the agent you want to test.

Paste the prompt and write your goal. The prompt contains My goal is: [replace this with your goal, or ask me for it in Codex/Claude]. Write your goal there, or leave it and the coding agent asks you.

Approve the sign-in when asked. The coding agent signs in to the CLI with the permissions an experiment needs and shows a code. Open the link it gives, check the code, and approve. See Sign-in permissions.

Leave the connection running. Your coding agent starts neatlogs local connect in a second terminal. You only start it yourself if the coding agent asks you to. Leave it running for the whole experiment. It tells Neatlogs that the CLI is connected. It does not prove that your agent ran; only saved traces prove that.

Answer the plan. Before the first run, the coding agent shows one short plan: the change in A and B, the cases, the questions, the judge, and the detections. Say if something is wrong. Otherwise it continues on its own.

Watch in Neatlogs. Open improve → experiments and select your experiment. The page shows what the coding agent is doing now, each round, and the result. See Watch progress and read results.

The coding agent asks you only when it needs a decision from you or is blocked. When it can't do a step as planned, it chooses the best other path and records a decision. Decisions appear in the experiment's Activity.

The setup prompt tells the coding agent to read the neatlogs-local-testing skill, which holds the detailed steps. If the skill is missing, the coding agent installs it. To install it yourself: npx skills add neatlogs/skills --skill "neatlogs-local-testing" (see Agent Skills).

Sign-in permissions

The CLI's default sign-in can only read. An experiment also writes evals, runs and detections, so the coding agent signs in with exactly these seven scopes:

context:read observability:read evaluation:read evaluation:write configuration:read configuration:write offline_access

offline_access lets you stay signed in on this device, so you approve the sign-in once. It is requested at login only and whoami never returns it. The other six are the resource scopes, and all six must appear in a saved sign-in.

To check a saved sign-in, run whoami for the project with JSON output and read data.credential.scopes; compare only the six resource scopes. auth status does not list scopes.

neatlogs --host https://app.neatlogs.com --profile neatlogs-us --credential-source profile --project <project-id> --json whoami

If any of the six resource scopes is missing, sign in again with the full seven-scope login list:

neatlogs --host https://app.neatlogs.com --profile neatlogs-us auth login --device \
  --scope context:read observability:read evaluation:read evaluation:write configuration:read configuration:write offline_access

For an EU project, use https://eu.app.neatlogs.com and a profile such as neatlogs-eu.

Two separate things must both allow a step: the scopes of the sign-in (what the CLI may do for you) and your project role (what you may do in the project). If a step is refused while your sign-in has all six resource scopes, signing in again will not help: your project role lacks that permission. For example, approving and turning on a new detection needs detection:manage, which only a project Admin has. The coding agent names the missing permission, records a decision, and continues without that step. See Permissions and limits.

Words used on these pages

WordMeaning
ExperimentOne goal you test, with all its rounds.
GoalWhat must improve and what must not get worse, in plain words.
RoundOne comparison of A and B on the same cases, judged the same way.
AThe current version of your agent.
BThe changed version, the candidate.
CaseOne input your agent handles, such as one user request. Cases are saved in a dataset.
Case runOne version running one case. A round with 4 cases has 8 case runs.
QuestionsThe pass/fail questions the judge answers about each case run.
JudgeThe AI evaluator that answers the questions. The same judge grades A and B.
DetectionAn automatic check for a known problem, such as an agent execution error.
VerdictThe round's answer: B wins, Keep A, Tie, or Inconclusive.
OutcomeWhether the goal was reached: Goal met, Goal not met, Tradeoff, or not decided yet.
DecisionA choice the coding agent made and recorded, such as using other cases.
Setup promptThe text you copy from Neatlogs into your coding agent.

A version runs a case. The judge grades a case run.

Next steps

On this page

neatlogs
neatlogs

Ask neatlogs AI

Answers grounded in the docs

neatlogs

How can I help?

Ask anything about Incidents, Experiments, tracing, or the neatlogs dashboard.