-
-
WhatsApp Path Architecture
-
demo whatsapp 1: Customer asks about vegetarian options and lactose intolerance. Agent instantly provides information from the knowledgebase
-
demo whatsapp 2: Customer books a table for 3 people. Agent checks Calendar availability, creates the appointment, later customer cancels .
-
A2A Path Architecture
-
Payment Flow (AP2 + x402)
-
demo a2a 1: Customer Delegates Task to Claude to book a romantic diner
-
demo a2a 2: Claude Uses Tools - Calendar Check & Restaurant Discovery
-
demo a2a 3: Claude Finds 8 PM Slot & Requests Deposit of 10 USDC via AP2 x402, Human-in-the-Loop - Payment Approval
-
demo a2a 4: Payment Processed & Booking Confirmed
Our Hackathon Journey
What Inspired Us
We witnessed a restaurant owner miss three calls during dinner service. Three lost bookings. $600 in revenue gone. This happens millions of times daily across 50 million small businesses worldwide.
But the real inspiration came from Swami Sivasubramanian's vision: "We're entering the agentic era of AI." When AWS released AgentCore in late 2024, we realized the building blocks were finally here. Agents that reason, plan, and act autonomously. Not science fiction—production-ready primitives on AWS.
We asked: What if every business had an AI agent? What if your personal AI could talk to their AI? What if agents could discover, negotiate, and transact autonomously?
That's the future we're building.
What We Learned
AgentCore changed everything. Before AgentCore, building autonomous agents required months of undifferentiated heavy lifting—memory management, tool orchestration, scaling infrastructure. AgentCore handles this, letting us focus on agent logic.
Key learnings:
- AgentCore Memory with actor isolation: Semantic search across sessions, per-user context persistence
- A2A Protocol: Agent discovery and negotiation without human intervention
- AP2 + x402: Agent-native payments with human-in-the-loop approval
- Serverless scaling: AgentCore Runtime auto-scales to 1000+ concurrent users with zero cold starts
- Open protocols matter: A2A, AP2, and MCP create an interoperable agent ecosystem
The biggest insight: The agentic era isn't about better chatbots. It's about autonomous systems that collaborate across organizational boundaries.
How We Built It
2 weeks. 1 developer. AWS primitives.
Week 1: WhatsApp Path
- Deployed AgentCore Runtime with Strands Agent framework
- Integrated AWS End User Messaging (Social) for WhatsApp (2B users)
- Built knowledge base with restaurant info (menu, allergens, sustainability)
- Connected Google Calendar via AgentCore Gateway
- Implemented AgentCore Memory for conversation persistence
Week 2: A2A Path
- Built A2A protocol handler with Cognito OAuth
- Created MCP server for Claude Desktop integration
- Implemented agent discovery and negotiation flows
- Added AP2 payment protocol (human-in-the-loop)
- Deployed with AWS CDK (infrastructure as code)
Architecture decisions:
- Serverless-first: Lambda + AgentCore Runtime (zero idle costs)
- Memory-first: AgentCore Memory with semantic search (not just chat history)
- Protocol-first: A2A and AP2 for agent interoperability (not proprietary APIs)
Challenges We Faced
1. Memory Persistence Across Sessions
AgentCore Memory uses actor isolation—each user gets their own memory context. Challenge: How do agents remember previous conversations when users return hours later?
Solution: Semantic search across all user sessions. When a customer says "cancel my booking," the agent searches memory for their previous booking context, finds their name and phone number, and handles the cancellation without asking for details.
2. A2A Authentication
Challenge: Cognito ID tokens expire in 1 hour. Manual token refresh every hour isn't scalable for autonomous agents.
Solution: Implemented refresh token authentication with 60-day validity and auto-refresh with 5-minute buffer. Agents now authenticate autonomously without human intervention.
3. Payment Protocol Integration
Challenge: AP2 + x402 is a new standard. No existing libraries. How do we demonstrate agent-native payments without building a full payment infrastructure in 2 weeks?
Solution: Implemented the protocol structure (x402 status codes, payment URLs, human-in-the-loop approval) with placeholder payment execution. Shows where payments integrate without requiring blockchain infrastructure for the demo.
4. Testing Autonomous Agents
Challenge: How do you test agents that make autonomous decisions? Traditional unit tests don't capture emergent behavior.
Solution: Multi-layer testing strategy:
- Unit tests for tools and memory
- Integration tests for A2A endpoints
- E2E tests for complete booking flows
- BDD functional tests (Gherkin) for agent behavior
5. Balancing Vision vs Reality
Challenge: We're building for the agentic era (5-year vision) but need to work today (hackathon demo).
Solution: Transparent implementation status. We clearly document what's production-ready (WhatsApp bot, memory, calendar) vs what's demo (hardcoded discovery, payment placeholders). Judges see both the working system and the future vision.
Public Demo URL: https://cas32gvtkb.execute-api.us-east-1.amazonaws.com/prod/
Built With
- a2a
- a2a-protocol
- amazon-nova-pro
- ap2-protocol
- aws-bedrock-agentcore
- aws-end-user-messaging
- bedrock
- bedrock-knowledge-base
- cdk
- cognito
- google-calendar-api
- kiro
- mcp
- python
- q-developer
- s3
- s3-vector
- strands-agent
- uv
- x402
Log in or sign up for Devpost to join the conversation.