EGMA_URL and EGMA_API_KEY settings. See Prepare the bot.
The start request
Egma sends onePOST to your start URL for each simulation. It carries every stored auth header and Content-Type: application/json:
- Check the auth headers.
- Create a Daily room with
dailyRoomProperties. The expiry ends the room two minutes after the simulation’s duration limit. - Start your bot in that room with
bodyasrunner_args.body. - Answer with a 2xx JSON object that holds
dailyRoom, the room’shttps://…daily.co/…URL. AdddailyTokenwhen the room needs a token to join. Egma ignores every other field.
Example starter
This FastAPI starter checks a bearer secret, creates a private Daily room with your Daily API key, and runsbot() from your bot.py in the same process. A production starter usually starts each bot on its own worker instead.
starter.py beside bot.py, then run it behind your HTTPS reverse proxy:
Rules for the start URL
- The URL must use HTTPS and a public host name. Egma refuses IP addresses,
localhost, and addresses that resolve to private networks. These rules also apply to self-hosted Egma. - Egma does not follow redirects. A 3xx answer fails the simulation.
- Each attempt has 30 seconds, and Egma reads at most 64 KiB of the answer.
- HTTP 429 is retried within Egma’s 120-second wait, honoring
Retry-After. Every other failure ends the simulation at once with its cause. See Troubleshooting.
Connect Egma to the starter
With the prompt from Agents → Connect an agent → Pipecat, your coding agent asks where the bot runs. Answer on my own servers and give it the start URL and the auth headers, such as{"Authorization": "Bearer …"}.
From the CLI, set PIPECAT_START_URL to the full start URL and load EGMA_START_SECRET from your secret store. This command passes the headers through standard input:
EGMA_PIPECAT_START_HEADERS as JSON text instead of using standard input. Run the command again with --modality chat for a chat connection. Egma stores the headers sealed and shows only their names.
Use the returned connection ID to start a run.