> For the complete documentation index, see [llms.txt](https://docs.concurrence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.concurrence.com/developer-guide/guides/escalation-and-safety.md).

# 6. Add Escalation and Safety

Configure caller verification, call forwarding, a safe-exit line, and an escalation path on a test service, then test each one before release.

Use this guide after [Verify an Integration Action](https://docs.concurrence.com/developer-guide/guides/verify-an-integration-action.md) to give a test service a path to a person and to check the platform's safety behavior on your runtime. It collects settings documented on their owning pages. Follow the links for the full contract.

## Prerequisites

Have a configured test service, a synthetic patient record, and permission to update the service. For phone transfers, have a provisioned voice line bound to the service and destination numbers your team controls. Confirm which [voice family](https://docs.concurrence.com/developer-guide/platform-api/workspaces/voice-configuration.md#choosing-a-realtime-voice-family) the service uses: transfers, operator takeover, and several safety controls differ by family.

## 1. Decide Whether the Workflow Needs the Caller's Record

If the workflow reads patient records, add `world_confirm_patient_identity` to the Context Graph state that confirms identity, and have that state ask for the caller's full name and date of birth. Until the caller verifies, built-in record reads return `verification_required`.

If the workflow never needs the record, for example a call to a payer line, set `platform_caller_verification: false` on the service. See [Caller Verification](https://docs.concurrence.com/developer-guide/platform-api/conversations/voice-agent.md#caller-verification).

## 2. Configure Forwarding

Add a `voice_config.forwarding` block to the service. Choose `warm_transfer` explicitly, then either a fixed `forward_to` or dynamic mode with `approved_destinations`. Set `fallback_to` for the line the safe exit dials. Each number must also be on the `allowed_forwarding_numbers` list of the voice use case bound to the service, or the save returns `422`. Public emergency and N11 short codes are refused as destinations.

Warm transfer is available on the `concurrence` cascade and `gpt_realtime`. The other realtime families use cold transfer. See [Call Forwarding](https://docs.concurrence.com/developer-guide/platform-api/workspaces/services.md#call-forwarding) and [Voice Configuration](https://docs.concurrence.com/developer-guide/platform-api/workspaces/voice-configuration.md#call-forwarding).

## 3. Author the Escalation Path in the Graph

In each safety-sensitive state, write the escalation conditions, boundary constraints, and a safe fallback for when no person or destination is available. To let the agent take a message when it can't transfer, offer a tool whose write records one, such as `world_ticket_create` or an integration endpoint declared `message`. See [Safety & Escalation](https://docs.concurrence.com/developer-guide/platform-api/conversations/voice-agent.md#safety-and-escalation) and [Endpoint Write Declarations](https://docs.concurrence.com/developer-guide/platform-api/integrations.md#endpoint-write-declarations).

On the platform-managed runtime, author the graph's emergency path too: the agent's own reply plays when a caller describes an emergency. On `gpt_realtime`, review `medical_emergency_ending`. See [Realtime Emergency Script](https://docs.concurrence.com/developer-guide/platform-api/conversations/voice-agent.md#realtime-emergency-script).

## 4. Test Each Path

Run each case on a test call or simulation and record the transcript and tool calls:

| Case                                           | Expected evidence                                                                          |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------ |
| Record request before verification             | The read returns `verification_required`                                                   |
| Wrong date of birth, then the right one        | A failed attempt, then the record loads                                                    |
| Request for a person                           | `forward_call` to the configured destination, a recorded message, or how to reach the team |
| Transfer to an unapproved number               | `forward_call` refuses it without dialing                                                  |
| A claimed booking with no booking write        | On voice, the reply is stopped and corrected. On text, a logged hit                        |
| A medical emergency, in plain and hinted words | The runtime's documented emergency behavior, and the call stays open                       |
| A non-emergency mention of a condition         | The workflow continues                                                                     |

Recognition covers a limited set of phrasings and can miss others, so test several. Simulations return `dry_run` results for tools. Test a live transfer with a test call to a destination your team controls.

## 5. Plan the Operator Path

If people intervene in live runs, read [Operators and Escalation](https://docs.concurrence.com/operations-and-safety/operators). Operator takeover on phone calls is available on supported platform-managed calls, and the operator APIs are a beta feature a workspace must be enabled for. Define what happens when no operator is available.

## Production Differences

A test destination, a synthetic record, and a test call don't establish staffing, carrier behavior, or clinical protocol. Before release, confirm the production destinations, staffing, and escalation owners, and repeat the cases on the production service configuration.

See [Runtime Safety](https://docs.concurrence.com/operations-and-safety/runtime-safety) for the full control map, and [Safety Layers Separate From the Agent Model](https://docs.concurrence.com/design/safety-layers) for why the controls are built this way.

***

**You are here:** step 6 of 10 in [Learn by Building](https://docs.concurrence.com/developer-guide/guides.md#implementation-path), Add Escalation and Safety.

**Previous:** [Step 5: Verify an Integration Action](https://docs.concurrence.com/developer-guide/guides/verify-an-integration-action.md). **Next:** [Step 7: Build and Prove With Simulations](https://docs.concurrence.com/developer-guide/guides/build-and-prove.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.concurrence.com/developer-guide/guides/escalation-and-safety.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
