Skip to content

Commit 069e775

Browse files
authored
Merge pull request #2842 from harsha509/update/a2a-cli-guide
Update A2A CLI guide with complete command reference
2 parents 477e41b + 9979e4a commit 069e775

1 file changed

Lines changed: 154 additions & 13 deletions

File tree

docs/testmu-a2a-cli.md

Lines changed: 154 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,37 @@ The TestMu A2A CLI lets you test chat agents and phone agents directly from your
5353
---
5454

5555
```bash
56-
pip install -e .
56+
pip install testmu-a2a-cli
5757
```
5858

59-
Or run directly from the project:
59+
## Quick Reference
60+
---
6061

61-
```bash
62-
python -m cli.main --help
62+
```
63+
testmu-a2a auth Authenticate with TestMu
64+
testmu-a2a test Quick chat agent test (one command)
65+
testmu-a2a init Initialize testmu-a2a.yaml config
66+
testmu-a2a run Run tests from testmu-a2a.yaml
67+
testmu-a2a call Test phone agents with real calls
68+
testmu-a2a redteam Adversarial security testing
69+
testmu-a2a prompts Set agent prompt and upload requirements
70+
testmu-a2a projects Manage projects
71+
testmu-a2a results View chat evaluation results
72+
testmu-a2a workflows Manage chat testing workflows
73+
testmu-a2a scenarios Manage chat test scenarios
74+
testmu-a2a phone-scenarios Manage phone test scenarios
75+
testmu-a2a suites Manage test suites
76+
testmu-a2a schedules Manage scheduled runs
77+
testmu-a2a call-results View phone call results
78+
testmu-a2a profiles Manage test/agent/endpoint profiles
79+
testmu-a2a recordings Upload and analyze call recordings
80+
testmu-a2a voices Browse available voices
81+
testmu-a2a personas Manage test personas
82+
testmu-a2a phone-numbers Manage phone numbers
83+
testmu-a2a thresholds Manage pass/fail thresholds
84+
testmu-a2a assessments Go-live readiness assessments
85+
testmu-a2a health System health check
86+
testmu-a2a credits View credit balance
6387
```
6488

6589
## Authenticate Your Account
@@ -220,6 +244,52 @@ testmu-a2a run --category security
220244
testmu-a2a run --format junit --output results.xml
221245
```
222246

247+
## Manage Workflows
248+
---
249+
250+
Workflows are the execution context for chat test scenarios within a project.
251+
252+
```bash
253+
testmu-a2a workflows create --project <project_id>
254+
testmu-a2a workflows list --project <project_id>
255+
testmu-a2a workflows summary <workflow_id>
256+
testmu-a2a workflows rename <workflow_id> --project <project_id> --name "My Workflow"
257+
testmu-a2a workflows files <workflow_id> --project <project_id>
258+
testmu-a2a workflows delete <workflow_id> --project <project_id>
259+
testmu-a2a workflows delete <workflow_id> --project <project_id> --yes # skip confirmation
260+
```
261+
262+
### Chat Testing Flow with Explicit Workflow
263+
264+
Use this when you already have a project and want full control over each step:
265+
266+
```bash
267+
# Step 1: Create workflow
268+
testmu-a2a workflows create --project <project_id>
269+
270+
# Step 2: Upload documents
271+
testmu-a2a sources upload \
272+
--workflow <workflow_id> \
273+
--project <project_id> \
274+
--files ./spec.pdf,./faq.md
275+
276+
# Step 3: Generate scenarios from the uploaded docs
277+
testmu-a2a run --workflow <workflow_id> --project <project_id>
278+
279+
# Step 4: View results
280+
testmu-a2a results <workflow_id> --project <project_id>
281+
```
282+
283+
Or combine upload and generation in one step:
284+
285+
```bash
286+
testmu-a2a sources upload-and-generate \
287+
--workflow <workflow_id> \
288+
--project <project_id> \
289+
--files ./spec.pdf,./faq.md \
290+
--categories intent-recognition,context-memory,error-handling
291+
```
292+
223293
## Test a Phone Agent
224294
---
225295

@@ -266,20 +336,52 @@ Note the project ID from the output.
266336

267337
**Step 2: Set the agent prompt.** This is the most important step - the prompt drives scenario generation, evaluation criteria, and go-live assessments.
268338

339+
From a YAML file (recommended — define everything in one place):
340+
341+
```bash
342+
testmu-a2a prompts set --project <project_id> --from-file prompt.yaml
343+
```
344+
345+
`prompt.yaml`:
346+
347+
```yaml
348+
prompt: |
349+
You are an airline booking assistant. You help customers find flights,
350+
make reservations, handle cancellations, and process refunds.
351+
Always verify the customer's identity before making changes.
352+
Never share other customers' booking information.
353+
354+
# Or reference a separate file (path relative to this YAML)
355+
# prompt_file: ./agent_system_prompt.md
356+
357+
context: "Agent must comply with DOT airline passenger rights regulations"
358+
359+
files:
360+
- ./compliance_rules.pdf
361+
- ./fare_structure.docx
362+
```
363+
364+
Inline:
365+
269366
```bash
270-
# Inline
271367
testmu-a2a prompts set --project <project_id> \
272368
--prompt "You are an airline booking assistant. You help customers find
273369
flights, make reservations, handle cancellations, and process refunds.
274370
Always verify the customer's identity before making changes.
275371
Never share other customers' booking information.
276372
If the customer is upset, empathize before offering solutions."
373+
```
277374

278-
# From a file
375+
From a prompt file:
376+
377+
```bash
279378
testmu-a2a prompts set --project <project_id> \
280379
--prompt-file ./agent_system_prompt.md
380+
```
381+
382+
With additional requirement documents (compliance rules, product specs, etc.):
281383

282-
# With additional requirement documents (compliance rules, product specs, etc.)
384+
```bash
283385
testmu-a2a prompts set --project <project_id> \
284386
--prompt-file ./agent_prompt.md \
285387
--files ./compliance_rules.pdf,./fare_structure.docx \
@@ -472,19 +574,58 @@ Output includes a letter grade (A+ through F) and per-category breakdown.
472574

473575
The prompt is the single most important input - it tells TestMu AI what your agent does so it can generate relevant scenarios and evaluate correctly.
474576

577+
### Set Prompt from YAML (recommended)
578+
579+
Define prompt, files, and context in one file:
580+
581+
```bash
582+
testmu-a2a prompts set --project <project_id> --from-file prompt.yaml
583+
```
584+
585+
`prompt.yaml`:
586+
587+
```yaml
588+
prompt: |
589+
You are a customer support agent for a SaaS product.
590+
You help users with billing, account issues, and technical troubleshooting.
591+
Always verify the user's email before making account changes.
592+
Escalate to a human if the customer asks for a refund over $500.
593+
594+
# Or reference a separate file:
595+
# prompt_file: ./agent_system_prompt.md
596+
597+
context: "Agent must comply with GDPR and never store PII in logs"
598+
599+
files:
600+
- ./compliance_rules.pdf
601+
- ./product_catalog.docx
602+
- ./faq.md
603+
```
604+
605+
All file paths in the YAML are resolved relative to the YAML file's location.
606+
607+
### Set Prompt Inline
608+
475609
```bash
476-
# Set inline
477610
testmu-a2a prompts set --project <project_id> \
478611
--prompt "You are a customer support agent for a SaaS product.
479612
You help users with billing, account issues, and technical troubleshooting.
480613
Always verify the user's email before making account changes.
481614
Escalate to a human if the customer asks for a refund over $500."
615+
```
482616

483-
# Set from file
617+
### Set Prompt from File
618+
619+
```bash
484620
testmu-a2a prompts set --project <project_id> \
485621
--prompt-file ./agent_system_prompt.md
622+
```
623+
624+
### Set Prompt with Additional Requirements
486625

487-
# Set with additional requirement documents
626+
Upload compliance docs, product specs, or knowledge base files alongside the prompt:
627+
628+
```bash
488629
testmu-a2a prompts set --project <project_id> \
489630
--prompt-file ./agent_prompt.md \
490631
--files ./compliance_rules.pdf,./product_catalog.docx,./faq.md \
@@ -521,9 +662,9 @@ testmu-a2a projects create \
521662
--description "Agent description" \
522663
--type chat
523664
524-
python -m cli.main projects update <project_id> --name "New Name"
525-
python -m cli.main projects update <project_id> --description "Updated description"
526-
python -m cli.main projects update <project_id> \
665+
testmu-a2a projects update <project_id> --name "New Name"
666+
testmu-a2a projects update <project_id> --description "Updated description"
667+
testmu-a2a projects update <project_id> \
527668
--name "New Name" \
528669
--description "Updated description"
529670

0 commit comments

Comments
 (0)