“Native” means you only turn on Mock tool calls. “Your tool server asks Bluejay” means your tool handler calls the resolver before it runs the real tool.
Turn on mocking
Do this for every platform. Open the agent’s Simulation Settings tab and turn on Mock tool calls. It applies to every simulation on the agent, and each tool starts on Generated. With the API, callPUT /v1/agents/{agent_id}/mock-tools. With MCP or Bluejay AI, ask to mock tool calls for the agent.
ElevenLabs
Bluejay mocks ElevenLabs agents natively on web simulations. Your agent needs versioning turned on in ElevenLabs. When you turn mocking on, Bluejay creates a branch namedbluejay-mocks on the agent in your ElevenLabs workspace.
- The branch is a copy of your live version. It has a client tool in place of each webhook tool, with the same name and schema. Tools set to Real backend stay webhooks and call your server.
- The branch takes 0% of traffic. Live callers and your main version are never touched.
- Bluejay reuses the branch for every run. When you publish a new live version, Bluejay rebuilds the branch the next time you queue a run. Changing a tool to or from Real backend rebuilds it right away.
- Don’t edit the branch. Bluejay overwrites it.
- Each tool gets the Digital Human’s override, the Fixed response, or a generated result, in that order.
- If Bluejay can’t produce a result, the tool gets an error, “No mock result is available for this tool in this test.” Your real tool never runs, including calls the agent makes early or drops after an interruption.
X-Simulation-Result-Id on every SIP call. Pass it to your tool webhook as a dynamic variable.
Google CES and Dialogflow CX
When Google hands a tool call to Bluejay during a simulation, Bluejay answers it. This works for voice and chat. Turn on mocking. Nothing else is needed.- A tool set to Real backend gets an error result, since nothing can run your real tool on this path.
- A result that is not a JSON object arrives as
{"result": <value>}. - Tools that Google runs itself, such as OpenAPI tools, still call your real system. Bluejay can’t mock them yet.
Retell, Vapi and other platforms
Retell and Vapi are not yet supported natively. Instead, your tool server asks Bluejay for the mock before it runs the real tool.- Read the Bluejay test id from the call.
- Call
POST /v1/tool-mocks/resolvewith your Bluejay API key. - If
mockedis true, returnresultand skip the real tool. Onmocked: false, run the real tool.
- Only call Bluejay when the call has a test id or comes from a Bluejay number. Real callers then never wait on Bluejay.
- On
mocked: false, run the real tool. When the call has a test id and Bluejay errors or times out, return an error result instead, so a test never reaches your real backend. Generated results can take a few seconds, so wait up to 10. - When Bluejay can’t produce a result for a test, it answers
mocked: truewith an error result. - A tool set to Real backend answers
mocked: false, so your real tool runs. Every other tool is mocked, generated unless you set it to Fixed.
Custom agents (LiveKit, Pipecat)
When your tools run in your own code, wrap each tool with the Bluejay SDK helper. During a Bluejay simulation it returns the mocked result. On any other call it runs your real tool.LiveKit
Add@mockable under @function_tool, and call bind_livekit(ctx) at the start of your entrypoint.
@mockable(name="check_availability").
Pipecat
Bind the call when the bot starts, then wrap the handler body withmock_or_call.
How the helper finds the call
bind_livekitreadsX-Simulation-Result-Idfrom the dispatch metadata, then from participant attributes. For SIP calls into LiveKit, map the header withheaders_to_attributeson your inbound trunk.- On plain phone calls the header is dropped, so
bind_livekitfalls back to the caller’s number,sip.phoneNumber. - In any other server, call
bind(test_result_id=...)orbind(caller_number=...)yourself.
Phone
No platform routes a Bluejay caller to a test version on its own, so phone tests always need your tool server to ask Bluejay. Use the resolver or the SDK helper.- SIP calls carry
X-Simulation-Result-Id. Send it astest_result_id. - Phone calls drop SIP headers. Send the Digital Human’s phone number as
caller_number, in E.164 form. Bluejay matches it to the Digital Human calling from that number right now. - When your agent calls the Digital Human, the Digital Human’s number is the number your agent dialed.