egma connect. Run it from your agent’s repository and the wizard prompts you for your Retell API key, lists the agents on your account, and asks you to choose how Egma should reach the one you pick — all without writing anything to a file or passing a secret as a command argument.
Prerequisites
Before you runegma connect, make sure you have:
- A Retell account with at least one agent configured
- An Egma account (cloud or self-hosted instance) — sign in first with
egma login - Node 22 or newer to run
npx @egma/cli
Interactive wizard
Runegma connect from the root of your agent’s repository:
Reach types
Choosing the right reach is the one decision that shapes what a simulation exercises. The two are not interchangeable and both are worth running.Text reach
Egma exchanges text messages with your agent directly. No audio, no phone call, nothing dialled. Tests your agent’s reasoning, prompt logic, and tool calls at full speed. This is the default for new integrations and works on any Egma instance with no additional setup.
Phone reach
Egma dials one of your agent’s Retell numbers over a real SIP trunk and Twilio, exactly as a caller would. Tests everything text tests — plus speech recognition, text-to-speech, interruption handling, and the telephone line itself. Requires a phone number configured on your Egma instance.
The same test run over both reaches is the sharpest signal Egma can give you: a test that passes on text and fails on phone means your prompt is fine and your speech stack is not.
Phone reach requirements
Phone reach calls your agent’s number through the public telephone network. Your Egma instance must have a SIP trunk and Twilio carrier configured before you run a phone simulation. Runnpx @egma/cli self-host setup on your instance to configure the phone stack, or contact your Egma admin if you are on a shared instance.
Headless and CI usage
For CI pipelines, automated scripts, or any environment without an interactive terminal, pass the key through the environment and name every choice on the command line:--headless to suppress all prompts. With --headless and no --reach, the command exits with code 5 — Egma will not decide on your behalf whether to dial somebody’s telephone.
All environment variables the command reads:
Running connect more than once
egma connect is idempotent. Running it again over the same Retell agent does not create a duplicate — it adds the new reach as a second connection on the same agent record, or reuses the one it already registered.
The registration: line in the output tells you exactly what happened:
When a connection is added, Egma also prints a
note: line saying so in plain words. One voice agent, two connections, one results history.
Exit codes
What happens after connect
Onceegma connect completes, Egma holds a sealed copy of your Retell credentials and a record of the agent. Nothing in this step writes to your Retell account — every request Egma makes during connect is a read.
From here you can write tests in egma/tests/ and run them with egma run. Each test becomes one simulation per persona, and each simulation calls your agent through the connection Egma just registered.