Skip to content

Tool-Call Mocking

Tool-call mocking is what lets a test call be real everywhere it matters and fake exactly where it must be. The agent's reasoning path is genuine (real LLM, real prompt, real assistant, real PSTN call); only the leaf tool calls are substituted, so a test exercises the actual decision-making without booking a real appointment or ringing a real CSR. The layer lives in avoca-next, not Hamming: the tool dispatcher detects test traffic (Hamming caller ID, or the test phone's server-URL marker) and resolves each invocation through four tiers, per-case explicit mock, then team default, then a safe block for write tools, then real execution for reads. Two consequences shape everything downstream: the mocks live in Avoca's database rather than Hamming's, which makes Avoca's Simulation Testing UI the canonical authoring surface; and detection fails open, treating any call it cannot positively identify as production, which is the mechanism behind the historical simulation-transfer leaks.