TestMu A2A CLI Quickstart for Chat and Phone Agents
The TestMu A2A CLI lets you test chat agents and phone agents directly from your terminal. You can run quick one-off tests, build scenario-driven test suites, perform adversarial security assessments, and integrate everything into your CI/CD pipeline.
Install the CLI
pip install testmu-a2a-cli
Commands on this page are verified against the current testmu-a2a-cli. Run testmu-a2a --version to check your installed build.
Quick Reference
testmu-a2a auth Authenticate with TestMu AI
testmu-a2a test Quick chat agent test (one command)
testmu-a2a init Initialize testmu-a2a.yaml config
testmu-a2a run Run tests from testmu-a2a.yaml
testmu-a2a call Test phone agents with real calls
testmu-a2a redteam Adversarial security testing
testmu-a2a prompts Set agent prompt and upload requirements
testmu-a2a projects Manage projects
testmu-a2a results View chat evaluation results
testmu-a2a workflows Manage chat testing workflows
testmu-a2a sources Upload documents and generate scenarios
testmu-a2a scenarios Manage chat test scenarios
testmu-a2a phone-scenarios Manage phone test scenarios
testmu-a2a suites Manage test suites
testmu-a2a schedules Manage scheduled runs
testmu-a2a call-results View phone call results
testmu-a2a profiles Manage test/agent/endpoint profiles
testmu-a2a recordings Upload and analyze call recordings
testmu-a2a voices Browse available voices
testmu-a2a personas Manage test personas
testmu-a2a phone-numbers Manage phone numbers
testmu-a2a thresholds Manage pass/fail thresholds
testmu-a2a assessments Go-live readiness assessments
testmu-a2a health System health check
testmu-a2a credits View credit balance
Authenticate Your Account
All CLI commands require authentication with your TestMu AI credentials.
Log in Interactively
testmu-a2a auth -u <username> -k <access_key>
You can point to a specific environment by passing --base-url:
# Local development
testmu-a2a auth -u <username> -k <access_key> --base-url http://localhost:8000
# Staging
testmu-a2a auth -u <username> -k <access_key> --base-url https://stage-agent-testing.lambdatestinternal.com
# Production (default)
testmu-a2a auth -u <username> -k <access_key>
Authenticate in CI/CD
For automated environments, set environment variables instead of running testmu-a2a auth:
export TESTMU_USERNAME=<username>
export TESTMU_ACCESS_KEY=<access_key>
export TESTMU_BASE_URL=https://agent-testing.lambdatest.com
TestMu AI aliases are also supported:
export LT_USERNAME=<username>
export LT_ACCESS_KEY=<access_key>
Check Status and Log Out
testmu-a2a auth status
testmu-a2a auth logout
Credentials are stored in ~/.testmu-a2a/credentials.json with owner-only permissions (600).
Test a Chat Agent
The fastest way to test a chat agent is with a single test command. Point it at your agent endpoint, describe what the agent does, and the CLI generates scenarios and evaluates responses automatically.
testmu-a2a test \
--agent https://my-bot.com/api/chat \
--spec "A travel booking assistant that helps users find flights" \
--count 10
If your agent expects a custom request format, specify the body template and response path:
testmu-a2a test \
--agent https://my-bot.com/chat \
--body-template '{"input": "{{message}}"}' \
--response-path "output.text" \
--spec "Customer support bot for an e-commerce store" \
-H "Authorization: Bearer <token>"
| Flag | Description | Default |
|---|---|---|
--agent, -a | Target agent endpoint URL | Required |
--spec, -s | Agent description or path to spec file | None |
--count, -n | Number of test scenarios | 10 |
--categories, -c | Comma-separated categories | All |
--threshold, -t | Pass/fail threshold (0.0-1.0) | 0.80 |
--max-turns | Max conversation turns per scenario | 10 |
--format, -f | Output format (table, json, junit) | table |
--output, -o | Write results to file | None |
--verbose, -v | Show conversation transcripts | false |
--parallel, -p | Number of parallel evaluations | 5 |
--body-template | JSON body with {{message}} placeholder | None |
--response-path | JSONPath to extract agent reply | None |
--method, -m | HTTP method | POST |
--header, -H | Custom header (repeatable) | None |
Run Tests from a Config File
For repeated testing, initialize a config file instead of passing flags every time:
testmu-a2a init --endpoint https://my-bot.com/api/chat
This creates testmu-a2a.yaml and supporting directories:
testmu-a2a.yaml Project configuration
specs/ Spec documents (PDF, DOCX, MD)
scenarios/ Custom scenario YAML files
reports/ Test reports
A typical testmu-a2a.yaml looks like this:
agent:
endpoint: "https://my-bot.com/api/chat"
type: chat
method: POST
headers:
Content-Type: "application/json"
body_template:
message: "{{message}}"
response_path: "data.reply"
scenarios:
generate:
from: ./specs/
categories:
- conversational-flow
- intent-recognition
- context-memory
- error-handling
- security
count: 30
evaluation:
thresholds:
accuracy: 0.80
relevance: 0.80
coherence: 0.80
context_retention: 0.75
max_turns: 10
output_format: table
security:
enabled: true
intensity: intermediate
categories:
- prompt-injection
- jailbreak
- pii-leakage
- data-exfiltration
Then run all tests, a specific category, or output for CI/CD:
testmu-a2a run
testmu-a2a run --category security
testmu-a2a run --format junit --output results.xml
Manage Workflows
Workflows are the execution context for chat test scenarios within a project.
testmu-a2a workflows create --project <project_id>
testmu-a2a workflows list --project <project_id>
testmu-a2a workflows summary <workflow_id>
testmu-a2a workflows rename <workflow_id> --project <project_id> --name "My Workflow"
testmu-a2a workflows files <workflow_id> --project <project_id>
testmu-a2a workflows delete <workflow_id> --project <project_id>
testmu-a2a workflows delete <workflow_id> --project <project_id> --yes # skip confirmation
Chat Testing Flow with Explicit Workflow
Use this when you already have a project and want full control over each step:
# Step 1: Create workflow
testmu-a2a workflows create --project <project_id>
# Step 2: Upload documents
testmu-a2a sources upload \
--workflow <workflow_id> \
--project <project_id> \
--files ./spec.pdf,./faq.md
# Step 3: Generate scenarios from the uploaded docs
testmu-a2a run --workflow <workflow_id> --project <project_id>
# Step 4: View results
testmu-a2a results <workflow_id> --project <project_id>
Or combine upload and generation in one step:
testmu-a2a sources upload-and-generate \
--workflow <workflow_id> \
--project <project_id> \
--files ./spec.pdf,./faq.md \
--categories intent-recognition,context-memory,error-handling
Test a Phone Agent
The CLI can place real phone calls to test inbound and outbound voice agents. You can either run a quick one-shot call or build a full suite-based workflow.
Run a Quick One-Shot Call
testmu-a2a call \
--number <phone_number> \
--persona frustrated \
--scenario "Customer wants to cancel their premium subscription" \
--voice Neha \
--voice-provider vapi
| Flag | Description | Default |
|---|---|---|
--number, -n | Phone number (E.164 format) | Required |
--persona, -p | Test persona | neutral |
--scenario, -s | Scenario description | General inquiry |
--provider | Voice provider (vapi, pipecat, bolna) | vapi |
--voice | Voice ID (e.g., Neha, andrew) | Provider default |
--voice-provider | Voice synthesis (vapi, azure, 11labs, google) | vapi |
--type, -t | Call type (inbound, outbound) | inbound |
--max-duration | Max call duration in seconds | 180 |
--verbose, -v | Show call transcript | false |
--format, -f | Output format (table, json) | table |