Skip to main content
If you are setting up custom metrics for production calls, see Metrics.

Set up a metric

1

Open the form

On the Metrics page, click Create, then Create manually.The Metrics page with the Create menu open, showing Add from library, Create automatically, and Create manuallyThe Metrics page with the Create menu open, showing Add from library, Create automatically, and Create manually
2

Write the rule

Choose a metric type. For LLM as a Judge, pick the response type and write the prompt with the prompting guide.The Create Metric dialog with a name and prompt filled in, and the Agents, Evaluates, and Runs on fields setThe Create Metric dialog with a name and prompt filled in, and the Agents, Evaluates, and Runs on fields set
3

Choose where it runs

Select the agents to grade. Runs on decides whether the metric grades simulations, production conversations, or both. To grade only some conversations, add metric conditions. Then click Create.
4

Run it in simulations

New simulations run all of their agent’s metrics. For an existing simulation, turn the metric on in the simulation’s Custom Metrics tab.

Metric types

Add metric conditions

Use a conditional metric when a rule applies only to some conversations. On other conversations, the metric does not run and has no result. Common use cases include:
  • Check the refund policy wording only when the agent called the refund tool.
  • Check that the agent stated the copay only when the conversation reached the billing step of the workflow.
  • Check how the agent handled the escalation only when a Customer Asked for a Human metric returned Yes.
A condition can check that:
  • The conversation reached a node of the agent workflow. You pick the node from the workflow, so the metric must grade one agent. In YAML, find node IDs with Get Workflow Summary.
  • The agent called a given tool.
  • Another metric has a given result, for example Fail.
A condition can read only metrics that always run. In YAML, see the conditional metric example.

Tool calls, events, and metadata

If a metric grades something the transcript does not show, such as which tools your agent called, send that data to Bluejay after each simulated call. Check your connection’s integration page first, because some integrations send tool calls for you. You can send:
  • Tool calls: the tools your agent called, with their inputs and outputs. A Tool Call metric needs them.
  • Traces: the IDs of the OpenTelemetry traces your agent exported during the call, sent as trace_ids. A Trace metric needs them, and every metric sees a summary of the linked trace. See Traces.
  • Events: moments in the conversation, such as an escalation or a hold.
  • Metadata: a JSON object about the whole conversation, such as the customer’s name. Each key fills a dynamic variable in a metric prompt.

Send tool calls

1

Read the result ID

Bluejay sends an X-Simulation-Result-Id with each simulated call, and the integration page for your connection says where it arrives. Have your agent read it.If your agent cannot read the ID, leave out simulation_result_id and send start_time, end_time, and duration, so Bluejay can find the call.
2

Record the data

During the call, have your agent record its tool calls, and any events and metadata you want to grade.
3

Send it after the call

After the call ends, send the data to POST /v1/update-simulation-result:

Tool call fields

Event fields

An event marks a moment in the conversation, for example an escalation or a hold.
Last modified on October 27, 2026