> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mayaresearch.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Before you ship

> A checklist for voice agents in production.

<Steps>
  <Step title="One socket per session, reused across turns">
    Not one per turn. The handshake is \~205 ms and you should pay it once.
  </Step>

  <Step title="A context_id per turn, and cancel by that id">
    Ids are spent once a turn ends — never reuse one.
  </Step>

  <Step title="Treat end and cancelled alike">
    Both mean "turn over". Code that only handles `end` hangs on every barge-in.
  </Step>

  <Step title="Mute local playback the instant you send cancel">
    Do not wait for the reply. The engine keeps emitting for \~250 ms while your
    cancel is in flight, and that audio is already talked over.
  </Step>

  <Step title="Read sample_rate from metadata">
    Do not hard-code it.
  </Step>

  <Step title="Log context_id and session_id">
    They are what support needs to find your call.
  </Step>

  <Step title="Reconnect on close with backoff">
    Deploys and idle timeouts drop sockets normally. It is not an error state.
  </Step>
</Steps>

## Identifiers to log

| Transport | What to keep                                                            |
| :-------- | :---------------------------------------------------------------------- |
| HTTP      | the `x-request-id` response header, or `request_id` from the error body |
| WebSocket | `session_id` from `metadata`, and the `context_id` of the failed turn   |

Support: [charan@mayaresearch.ai](mailto:charan@mayaresearch.ai),
[bharath@mayaresearch.ai](mailto:bharath@mayaresearch.ai),
[dheemanth@mayaresearch.ai](mailto:dheemanth@mayaresearch.ai)
