How to Test AI Agents With the TestMu AI Agent Testing CLI
The TestMu AI Agent Testing CLI (agent-testing-cli) tests AI agents from a terminal, with no dashboard clicks. Use it to discover projects and test resources, run Chat and Phone Caller evaluations, retrieve results, and automate tests in a continuous integration and continuous delivery (CI/CD) pipeline.
It runs the same commands on macOS, Linux, and Windows against Chat, Voice, and Phone Caller agents configured in TestMu. You can drive it with direct commands, machine-readable JSON output, or the interactive terminal user interface (TUI), and authenticate with environment variables so suites run without an interactive prompt.
- Run tests from a terminal or IDE: Use the same commands on macOS, Linux, and Windows.
- Test different agent types: Work with Chat, Voice, and Phone Caller agents that are configured in TestMu.
- Choose an operating mode: Use direct commands, machine-readable output, or the interactive terminal user interface (TUI).
- Integrate with CI/CD: Authenticate with environment variables and run suites without an interactive prompt.
# Install
pip install agent-testing-cli
# Authenticate
# Enter your TestMu username and access key when prompted.
agent-testing-cli login
# List your projects
agent-testing-cli projects
How to Set Up Your Credentials
- You need a TestMu AI account. Sign up free if you do not have one.
- Follow Get started with TestMu Agent Testing and open Credentials in the TestMu AI Dashboard. Copy your username and access key.
- Set the credentials as environment variables when you use the CLI in CI/CD or other non-interactive environments.
- macOS or Linux
- Windows PowerShell
export LT_USERNAME="YOUR_USERNAME"
export LT_ACCESS_KEY="YOUR_ACCESS_KEY"
$env:LT_USERNAME = "YOUR_USERNAME"
$env:LT_ACCESS_KEY = "YOUR_ACCESS_KEY"
Which Environments the CLI Supports
The CLI runs in a system terminal or an integrated terminal in an IDE on:
- macOS
- Linux
- Windows
What the CLI Requires
- Python 3.10 or newer
- macOS, Linux, or Windows
- A TestMu account with access to Agent-to-Agent Testing
- At least one TestMu project with an agent and a test suite
How to Choose a Usage Mode
| Mode | Command | Best for |
|---|---|---|
| Interactive TUI | agent-testing-cli tui | Local exploration and suite selection |
| Command mode | agent-testing-cli --project PROJECT_ID run --suite SUITE_ID | Direct execution from a terminal |
| CI/CD mode | agent-testing-cli --project PROJECT_ID --json run ... --yes | Pipelines and scripts |
--yes confirms a test run without an interactive prompt. Use it for CI/CD or after you verify the selected project, suite, workflow, or URL.
Quick Command Reference
| Command | Purpose |
|---|---|
agent-testing-cli login | Validate and save credentials. |
agent-testing-cli auth status | Show the authentication status. |
agent-testing-cli projects | List accessible projects. |
agent-testing-cli --project PROJECT_ID scenarios | List saved scenarios for a project. |
agent-testing-cli --project PROJECT_ID suites | List saved suites for a project. |
agent-testing-cli --project PROJECT_ID endpoint-profiles | List Chat endpoint profiles for a project. |
agent-testing-cli --project PROJECT_ID run --suite SUITE_ID | Start a Phone Caller suite. |
agent-testing-cli results --suite SUITE_ID | Show suite results. |
agent-testing-cli call --id CALL_ID | Show a call result. |
agent-testing-cli tui | Open the interactive TUI. |
agent-testing-cli logout | Delete credentials for the selected profile. |
Run the following command to see all commands:
Verifiedagent-testing-cli --help
Run the following command to see the options for one command:
Verifiedagent-testing-cli COMMAND --help