Skip to main content
The fastest path to your first Egma test run is the CLI wizard. Run it from your voice agent’s repository and it handles everything in sequence: signing in, registering your agent, generating tests with your existing coding agent, and starting a run. This guide walks you through each step so you know exactly what to expect before you press a key.
You need Node 22 or newer and a coding agent installed — Claude Code or Codex both work. You do not need a global egma install; npx fetches the latest version on each run.

Step 1 — Install and launch the wizard

Open a terminal in the repository that contains your voice agent and run:
The wizard opens on the terminal’s alternate screen. It tells you what it is about to do and waits for one keystroke before it starts. If you are running in CI or want plain output without the interactive UI, pass --headless:
If you self-host Egma, pass --url to point the wizard at your instance. The wizard records your instance’s verified identity in egma/config.yaml and every subsequent command in the repository finds it there automatically.

Step 2 — Authenticate with egma login

The wizard signs this machine in automatically as part of the flow, but you can also run the login step on its own — for example in CI, or to sign in to a self-hosted instance before running self-host setup.
Egma displays a short code, opens your browser on a page that already has the code in the field, and waits for you to approve it there. No secret is ever typed into the terminal. Expected output:
The key is written to ~/.egma/credentials, readable only by you. Set EGMA_HOME to store it somewhere else. On a machine with no browser — over SSH, in a container — press [c] after the code appears and Egma copies the approval URL to your clipboard. Open it in a browser on another machine, approve it, then paste back the full address, the ?user_code=… part, or just the code.

Step 3 — Register your agent with egma connect

The wizard handles agent registration as part of its flow, but you can run it separately — useful for headless environments or registering an agent without running the full wizard.
The CLI asks for your Retell API key (or LiveKit credentials) and then asks how Egma should reach the agent:
  • Text — Egma exchanges messages with your agent. No phone call, nothing dialled. Exercises the prompt, reasoning, and tools.
  • Phone — Egma dials one of your agent’s numbers over the telephone network. Exercises the full speech stack and the carrier path as well.
Egma creates the one connection type you choose and never both. If you want both, run egma connect twice and choose a different reach each time. The second run reuses the same agent registration and adds the new connection to it.
Pass credentials through environment variables rather than as arguments — arguments are visible to every process on your machine and are saved in shell history:
Expected output:

Step 4 — Initialize the test folder with egma init

Egma stores your tests as Markdown files in your repository. egma init creates the folder structure:
This creates:
Everything in this folder is committed to version control. No secrets ever land here.

Step 5 — Generate your first test suite

Back in the full wizard flow, once your agent is connected and the folder is initialized, the wizard asks your coding agent to read your repository — the prompt, tools, and framework — and write a first suite of tests into egma/tests/. Tests arrive one file at a time on screen while the coding agent works. If you already have test cases written down in a spreadsheet or document, pass the path and the wizard converts them first:
Each generated test file looks like this:
Before starting the run, the wizard shows you the full list of generated tests and pauses:
Press [e] to open any test in $EDITOR before committing to the run. Press [q] to exit with all files saved to your repository — you can push and run them later with egma push and egma run.

Step 6 — Run tests with egma run

Press [enter] in the wizard, or run the command directly after pushing your tests:
The simulator claims each simulation, conducts the conversation, and the grader writes one verdict per expected behavior as each call ends. The wizard follows the run live:
The wizard closes after the first verdict arrives. The run continues on Egma — closing your terminal never stops a run. Full egma run output:
Pass --no-follow to start a run and return immediately without waiting for verdicts. The run carries on on Egma and you can read results in the dashboard at the URL printed on the results: line.

Keeping tests in sync

After the first run, use pull and push to keep your local files and Egma in step:
egma push refuses when Egma holds a newer version than your local file, naming each conflict. Run egma pull first, review what changed, then push again.

CLI Reference

Every command, option, and exit code — including egma self-host for running your own instance.

Self-Hosting

Run Egma on your own infrastructure with Docker Compose.