Graine AI

Go-live check

Make an agent wait for a passing test run before it can go live.

Test runs (Evals) let you check an agent against scripted customers before real people talk to it. The go-live check makes that a rule for the whole workspace: an agent can go live only after its latest test run has passed.

It is off until an admin switches it on.

Switch it on

  1. Open Workspace settings.
  2. Under Require a passing test run before an agent goes live, tick the box and choose Save.

Only admins can change it. Anyone who can see agents can see whether it is on.

What happens

With the rule on, choosing Go live on an agent checks its latest test run:

Latest runResult
PassedThe agent goes live (or is sent for approval, if your workspace reviews go-lives).
FailedGo live is refused. The dialog says the run didn't pass and how many cases did.
Still runningGo live is refused until it finishes.
NoneGo live is refused. Run the agent's tests first.
  • The check looks at the latest run only. If you edit an agent after its tests passed, run the tests again before you go live.
  • It applies to the step that makes an agent live. Agents that are already live are not changed, and saving other changes to an agent is never held up by it.
  • If the rule can't be read at that moment, the agent isn't made live and you are asked to try again.

An approval, where your workspace uses one, still applies after the check.

Through the API

Arrives with the next server update. Until then the rule holds the dashboard's Go live, and a go-live through the API is not yet checked.

The rule applies however an agent is made live, not only from the dashboard. With it on, the API refuses to make an agent live unless its latest test run passed:

  • PATCH /v2/agents/{agent_id} or PUT /v2/agents/{agent_id} with "status": "ACTIVE" answers 409 with error 1201 and the same sentence the dashboard shows: no run, a run that didn't pass (with how many cases did), or a run that is still going. Nothing in the request is saved.
  • POST /v2/agents with "status": "ACTIVE" is refused the same way, because a new agent has no test run yet. Create it as a draft, run its tests, then make it live.
  • If the rule can't be read at that moment, the answer is 503 with error 1501. Try again.

The same holds for a go-live that waits for an admin's approval. The check runs when the request is made, so no admin is asked to approve an agent that can't go live, and again when it is approved. If the latest run no longer passes by then, the agent isn't made live and the request stays approved, so it can be applied once a run passes.

A run counts as still running from when you start it in Evals until it finishes or you stop it.

On this page