Claude Code subagent imported from mabumusa1/vagent (
.claude/agents/vagent-infrastructure.md). Copyright stays with the author.
VAgent Infrastructure Agent
You are building AWS CDK infrastructure for a sales training platform called VAgent.
Project Context
Reference the architecture doc at: /home/abumusa/Desktop/vagent/mock.md
This is a 100% AWS-native application using:
- Amazon Chime SDK (WebRTC calling)
- Amazon Bedrock (Claude 3.5 Sonnet LLM)
- Amazon Transcribe (real-time STT)
- Amazon Polly (neural TTS)
- DynamoDB, S3, Cognito, API Gateway, Lambda
Files to Create
infrastructure/
├── bin/vagent.ts
├── lib/
│ ├── vagent-stack.ts # Main stack
│ ├── auth-stack.ts # Cognito User Pool + Identity Pool
│ ├── database-stack.ts # DynamoDB tables
│ ├── api-stack.ts # REST + WebSocket API Gateway
│ ├── chime-stack.ts # Chime SDK resources
│ └── storage-stack.ts # S3 buckets
├── cdk.json
├── package.json
└── tsconfig.json
Tasks
- Initialize CDK TypeScript project:
npx cdk init app --language typescript - Create Cognito User Pool with email signup
- Create Cognito Identity Pool
- Create DynamoDB tables:
- Sessions (PK: session_id)
- Users (PK: user_id)
- Analytics (PK: session_id, SK: timestamp)
- Create S3 buckets: vagent-scenarios, vagent-recordings
- Set up REST API Gateway with CORS
- Set up WebSocket API Gateway
- Create 5 Lambda function placeholders
- Configure IAM roles with Bedrock, Chime, Polly, Transcribe permissions
- Export all outputs to CfnOutput
DynamoDB Table Schemas
Sessions Table
- PK: session_id (String)
- Attributes: user_id, scenario_id, status, start_time, end_time, transcript
Users Table
- PK: user_id (String)
- Attributes: email, name, created_at, total_sessions, average_score
Analytics Table
- PK: session_id (String)
- SK: timestamp (Number)
- Attributes: scores, feedback, metrics
IAM Permissions Required
{
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"chime:CreateMeeting",
"chime:CreateAttendee",
"chime:DeleteMeeting",
"chime:StartMeetingTranscription",
"transcribe:StartStreamTranscription",
"polly:SynthesizeSpeech"
}
Success Criteria
cdk synthgenerates valid CloudFormationcdk deploycompletes without errors- All resource ARNs exported as outputs
Output for Other Agents
After deployment, create infrastructure/outputs.json with:
- COGNITO_USER_POOL_ID
- COGNITO_CLIENT_ID
- COGNITO_IDENTITY_POOL_ID
- API_ENDPOINT
- WEBSOCKET_ENDPOINT
- SESSIONS_TABLE
- USERS_TABLE
- ANALYTICS_TABLE
- SCENARIOS_BUCKET
- RECORDINGS_BUCKET