Utility scripts for deployment verification and operational tasks.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment
uv venv
# Install dependencies
uv pip install -r requirements.txtInteractive chat interface for testing agent invocations with conversation continuity. Automatically detects the agent pattern from infra-cdk/config.yaml.
Modes:
- Remote (default): Test deployed agent via Cognito authentication
- Local (
--local): Test agent running on localhost:8080
Usage:
# Remote mode (prompts for credentials, tests deployed agent)
uv run test-scripts/test-agent.py
# Local mode (auto-starts agent if not running, uses pattern from config.yaml)
uv run test-scripts/test-agent.py --local
# Override pattern for local testing
uv run test-scripts/test-agent.py --local --pattern strands-single-agentSupported Patterns:
strands-single-agent- Basic Strands agentlanggraph-single-agent- LangGraph agent with streaming
Prerequisites:
- Remote: Deployed stack with Cognito user
- Local: Memory ID from deployed stack
Tests AgentCore Memory operations (create, list, get events and pagination).
Usage:
# Auto-discover memory from stack
uv run test-scripts/test-memory.py
# Use specific memory ARN
uv run test-scripts/test-memory.py --memory-arn <arn>Tests:
- Create conversation events
- List events with pagination
- Get specific events by ID
- Session ID validation
- Error handling
Tests the deployed Feedback API endpoint with Cognito authentication.
Prerequisites:
- Stack deployed to AWS
- Cognito user created (see Deployment Guide)
Usage:
uv run test-scripts/test-feedback-api.pyWhat it does:
- Fetches configuration from SSM Parameter Store
- Authenticates with Cognito (prompts for credentials)
- Runs API tests (positive/negative feedback, validation)
- Displays test results
Tests AgentCore Gateway directly without frontend.
Usage:
uv run test-scripts/test-gateway.pyWhat it does:
- Fetches Gateway configuration from SSM Parameter Store
- Authenticates with Cognito (prompts for credentials)
- Tests Gateway endpoints and authentication
- Displays test results
The test scripts use shared utilities from ../scripts/utils.py:
- Stack configuration and SSM parameter retrieval
- Cognito authentication
- AWS client creation
- Session ID generation
- Authentication fails: Verify Cognito user exists and credentials are correct
- Stack not found: Ensure stack is deployed and
config.yamlhas correctstack_name_base - Local agent fails: Check Memory ID and AWS credentials are configured
- Port 8080 in use: Stop other services or use remote mode