pinecallDocs
Key concepts / Overview

Overview

Goldens and personas, what each one catches, and the rings a change goes through.

Testing an agent means writing down what it must do, running that against a real model, and keeping it as the gate before every deploy. Pinecall gives you two kinds of test case and runs both for you.

What is a test?#

Start with both. Your first ten cases suggests six goldens and four personas, and walks the loop once.

How it works#

A test is a loop of four steps. You write the cases; Pinecall does the rest.

Write the cases#

Goldens are JSON files in agents/<agent>/test/goldens/. Personas are kept by the gateway, written with pinecall personas add or the console's Evaluate ▸ Personas.

Run them#

pinecall test plays every golden against a real model. pinecall simulate --persona <name> puts a persona on the line, in writing or out loud.

Read what broke#

Every verdict carries its reason. A golden that broke is written out whole, with the exact requests the model answered.

Keep them#

The goldens run in CI before every deploy. After the deploy, every real call is judged at hang-up, and one that breaks a judge is kept as a case: reproduced, fixed, and approved. Pinecall schedules nothing: your own CI plays every approved case beside the goldens, since pinecall test plays both.

The five kinds of test#

Each kind of test answers one question. They are not levels of thoroughness: green unit tests say nothing about the goldens, and green goldens say nothing about a real phone line.

kind the question what runs it costs
unit tests does the class behave? vitest, in your own repository nothing
goldens does the agent hold its goldens? pinecall test real model calls
spoken tests does it hold on a spoken line? pinecall simulate --voice, pinecall test --voice a call
a replay does one real call pass the code checks? pinecall eval <call-id> a replay, no model
judges how did every call go? the gateway, at hang-up: Pinecall's switched on, the org's, and the agent's own — rows, or the class's files one eval per judge that answered; none on your own judge model

Each has its page: Unit tests, Goldens, Spoken tests, Replaying a real call and the Judges at hang-up.

Where each half runs#

pinecall test and pinecall simulate start nothing. Whoever holds the agent answers: your pinecall start, a colleague's, or a deployed app. With nobody holding it, the run is refused with a 404 that says so. Your @tool methods run in the process that holds the agent, so with pinecall start they run on your machine, against your own database, and pinecall start --inspect makes a breakpoint in one reachable. The gateway drives the conversations and scores them, because the judges, the provider keys and the call logs are its. So a test needs a key and a gateway like any other verb.

The gateway runs one suite per agent at a time. A second pinecall test while one is running is refused with a 409 that names the run already going.

What a broken golden leaves behind#

Every golden that did not hold is written to .pinecall/evals/<run>/<golden>.json, in the directory you ran from. When the broken goldens span more than one model, the file is <golden> · <model>.json, so one never overwrites another:

key holds
run, agent, golden, model, call where it broke
declared the golden as you wrote it
verdicts every judge, with its reason
log the call's whole log
asked every request the model answered, with its system blocks, tools and messages

asked is the only place the prompt is kept. The call log stores a hash of each block on purpose. A spoken run builds its requests on the worker, and the file says so instead of listing them.

A golden is fixed and the agent is the variable. Never soften a golden so a change can pass. When a golden breaks, the fix is in the class: a tool's docstring, a stage, a sentence of render(). Change a golden only when what the business wants changed.

Golden judges and hang-up judges are not the same#

A golden is scored by the steps of each turn's then and the checks its expect sets. A real call is scored at hang-up by the panel: the library's judges switched on for the agent, none until someone switches one on, then the org's and the agent's own. grounded, consent and any other judge belong to a golden only when its expect names them. A call opened by a test run is scored by the run, never by the hang-up panel.

Next steps#