Skip to main content
Bluejay can ingest the tool calls and metadata your voice agent produces during simulations, giving you evaluation data that goes far beyond transcript analysis. By capturing every API call, database query, and business action your agent takes, you can measure whether it performed the right operations — not just whether it said the right things.
The /v1/update-simulation-result endpoint also accepts trace_ids for linking OpenTelemetry traces to simulation results. See Traces for details.

How It Works

During a simulation, Bluejay provides a unique X-Simulation-Result-Id for each conversation. Your agent must extract this ID, track its tool calls and metadata during the call, and then send that data back to Bluejay post-call via the /v1/update-simulation-result endpoint.

Integration Methods

Bluejay supports three methods for tool call tracking, depending on your infrastructure. Best for: traditional phone systems (PSTN), VoIP providers, and telephony infrastructure. When Bluejay initiates calls via SIP, it injects custom headers including X-Simulation-Result-Id directly into the SIP INVITE message. Flow:
  1. Bluejay sends a SIP INVITE with custom headers to your agent
  2. Your agent must extract X-Simulation-Result-Id from the SIP headers
  3. During the call, your agent must log every tool call and relevant metadata
  4. After the call ends, you must send the collected data to /v1/update-simulation-result
SIP Integration Guide →

WebSocket Integration

Best for: modern web-based agents and non-phone-based systems. WebSocket integration using the CHIRP protocol provides real-time, bidirectional communication. The X-Simulation-Result-Id is sent as an HTTP header on the WebSocket upgrade request. Flow:
  1. Bluejay opens the WebSocket connection with X-Simulation-Result-Id as a header on the upgrade request
  2. Real-time CHIRP message exchange during the conversation
  3. Your agent must log tool calls and metadata throughout the session
  4. After the call ends, you must send the collected data to /v1/update-simulation-result
WebSocket Integration Guide →

LiveKit Integration

Best for: agents built on the LiveKit Agents framework. Bluejay joins the LiveKit room alongside your agent. When your agent invokes a tool, publish a data packet to a configured topic and Bluejay ingests it automatically — no post-call API call needed. Flow:
  1. Set the LiveKit Customer Tool Topic in your Agent Connection settings
  2. Publish a JSON packet to that topic whenever your agent calls a tool
  3. Bluejay ingests packets in real time and persists them when the call ends
LiveKit Integration Guide →

Why SIP for Phone-Based Agents?

If your agent runs through traditional phone systems (PSTN), basic telephony integration does not support tool call enrichment. To unlock tool call and metadata tracking for phone-based agents, you need SIP. Compatible phone systems: traditional PBX, VoIP providers (Twilio, RingCentral, Telnyx, etc.), and any SIP-based platform.

Step-by-Step Guide

1. Choose Your Integration Method

2. Track Tool Calls in Your Agent

Implement tool call tracking wherever your agent invokes external tools, APIs, or business logic during a call:

3. Send Data to Bluejay

After the call ends, use the X-Simulation-Result-Id to call the /v1/update-simulation-result endpoint with the tool calls, events, and metadata you collected. Endpoint: POST /v1/update-simulation-result Headers:
  • X-API-Key: <your-api-key>
  • Content-Type: application/json
Request body:
Process tool calls and metadata asynchronously and call the endpoint after the call has ended. This avoids adding latency to the live conversation and ensures Bluejay can use the data during evaluation.

Use Cases

Multi-Agent Orchestration

Track tool calls across agent handoffs and escalation workflows:

Financial Services

Monitor critical financial operations with audit trails:

E-commerce & Order Management

Track customer service interactions with order processing systems:

Best Practices

  • Capture everything — track all external interactions, including failed calls, for complete visibility
  • Include timing — record start_offset_ms (milliseconds from call start) so Bluejay can place each tool call at the right moment in the transcript
  • Log errors — failed tool calls and error details are just as valuable as successes for debugging agent behavior
  • Store parameters — input parameters enable reproducibility analysis across simulation runs
  • Process async, send post-call — handle tracking asynchronously during the call, then batch-send to /v1/update-simulation-result after the call ends

Next Steps

Update Simulation Result API

Full endpoint reference for enriching simulation results.

SIP Integration

Set up SIP connectivity for phone-based agents.

WebSocket Integration

Connect web-based agents via CHIRP protocol.

Traces

Link OpenTelemetry traces to simulation results.

Tool Calls

Pass tool calls for production conversation evaluations instead.