بنقرة واحدة
create-capability-agent
// Scaffolds a new A2A capability agent with Python application, Dockerfile, requirements.txt, and CDK stack. Use when adding a new remote tool or service that the voice agent discovers via CloudMap.
// Scaffolds a new A2A capability agent with Python application, Dockerfile, requirements.txt, and CDK stack. Use when adding a new remote tool or service that the voice agent discovers via CloudMap.
Scaffold a new A2A capability agent with Python application, Dockerfile, requirements.txt, and CDK stack following the project's established patterns
Scaffold a new local tool for the voice agent pipeline with capability-based registration, executor function, ToolDefinition, and tests
Run an ECS scaling validation test with parallel monitoring, baseline enforcement, and automated result documentation
Sets up Daily.co phone number and webhook for PSTN dial-in. Guides through API key verification, phone number purchase, pinless dial-in configuration, and secrets sync. Use after deploying infrastructure, when setting up a phone number, or when configuring dial-in.
Scaffolds a new local tool for the voice agent pipeline with capability-based registration, executor function, and tests. Use when adding a tool that runs inside the voice agent container and may need transport or SIP session access.
Deploys optional A2A capability agents (Knowledge Base, CRM) that extend the voice agent with new skills. Explains the A2A architecture, enables the capability registry, deploys agent stacks, and verifies discovery. Use after the core deployment and Daily setup are complete.
| name | create-capability-agent |
| description | Scaffolds a new A2A capability agent with Python application, Dockerfile, requirements.txt, and CDK stack. Use when adding a new remote tool or service that the voice agent discovers via CloudMap. |
Scaffold all the files needed for a new A2A capability agent in the voice agent platform. This includes:
backend/agents/{name}/main.py)backend/agents/{name}/requirements.txt)backend/agents/{name}/Dockerfile)infrastructure/src/stacks/{name}-agent-stack.ts)index.ts, instantiation in main.ts)Use this skill when you need to create a new capability agent that will be discovered via CloudMap and invoked over the A2A protocol by the voice agent.
Read docs/guides/adding-a-capability-agent.md for the complete developer guide. All templates below are derived from that guide and the shipped KB and CRM agent implementations.
Ask the user for:
inventory-agent). This becomes the directory name and CloudMap service name.@tool docstring, which is critical for LLM tool selection)Existing tool names (avoid conflicts):
| Name | Source | Agent |
|---|---|---|
get_current_time | Local | Voice Agent |
hangup_call | Local | Voice Agent |
transfer_to_agent | Local | Voice Agent |
search_knowledge_base | A2A | KB Agent |
lookup_customer | A2A | CRM Agent |
create_support_case | A2A | CRM Agent |
add_case_note | A2A | CRM Agent |
verify_account_number | A2A | CRM Agent |
verify_recent_transaction | A2A | CRM Agent |
mkdir -p backend/agents/{name}/tests/
Follow the template in docs/guides/adding-a-capability-agent.md (Step 2). Key requirements:
from strands.multiagent.a2a import A2AServer (NOT A2AStarletteApplication)from strands.models import BedrockModel (NOT from strands.models.bedrock)_get_task_private_ip() function (required boilerplate for Agent Card URL)@tool docstrings -- the voice agent's LLM uses these for tool selectiondict (JSON-serializable)DirectToolExecutor and swap it after creating the server:
server.request_handler.agent_executor = DirectToolExecutor(my_tool)
main(): pre-initialize boto3 clients and optionally probe the Strands agentBase dependencies (always required):
strands-agents[a2a]>=1.27.0
requests>=2.31.0
Add boto3>=1.34.0 if calling AWS services. Add cachetools>=5.3.0 if implementing result caching.
Also create requirements-test.txt:
-r requirements.txt
pytest>=8.0.0
pytest-asyncio>=0.23.0
requests-mock>=1.11.0
Use the exact template from docs/guides/adding-a-capability-agent.md (Step 4). Critical requirements:
python:3.12-slimcurl (required for health check)appuser (non-root)/.well-known/agent-card.json (NOT /health)["python", "main.py"]Create infrastructure/src/stacks/{name}-agent-stack.ts following the template in docs/guides/adding-a-capability-agent.md (Step 5). Key patterns:
VoiceAgentConfig from ../configSSM_PARAMS from ../ssm-parametersCapabilityAgentConstruct from ../constructsssm.StringParameter.valueFromLookup (synth-time)ssm.StringParameter.valueForStringParameter (deploy-time)ecr_assets.DockerImageAsset with Platform.LINUX_AMD64CapabilityAgentConstruct with agent-specific configcontainerImage.repository.grantPull(agent.taskDefinition.executionRole!)Add export to infrastructure/src/stacks/index.ts:
export { MyAgentStack, MyAgentStackProps } from './{name}-agent-stack';
Add instantiation to infrastructure/src/main.ts:
const myAgentStack = new MyAgentStack(app, 'VoiceAgentMyAgent', {
env, config,
description: 'Voice Agent - My Capability Agent',
tags: { Project: config.projectName, Environment: config.environment },
});
myAgentStack.addDependency(ecsStack);
Create backend/agents/{name}/tests/__init__.py (empty) and backend/agents/{name}/tests/test_{name}.py.
Follow patterns from existing tests:
backend/agents/crm-agent/tests/test_crm_client.py -- HTTP interactionsbackend/agents/knowledge-base-agent/tests/test_knowledge_base.py -- DirectToolExecutorRun tests:
cd backend/agents/{name} && pip install -r requirements-test.txt && pytest tests/ -v
/.well-known/agent-card.json_get_task_private_ip() function includeddict/.well-known/agent-card.jsoncurl installed in container, non-root userstrands-agents[a2a]>=1.27.0 in requirementsecsStack dependency declared