AI-powered research agent that conducts multi-dimensional analysis using AWS Bedrock AgentCore and LangGraph.
- Multi-Dimensional Research - Breaks topics into dimensions and aspects for comprehensive coverage
- Parallel Processing - Concurrent analysis and synthesis for faster results
- Research Tools - Web search, Wikipedia, ArXiv, financial data, and more
- Real-Time Progress - Live status updates and stage tracking
- Multiple Outputs - Markdown, Word, PDF with embedded charts
- Chat Interface - Ask questions about research with context awareness
git clone <repository-url>
cd sample-deep-research-bedrock-agentcorecp .env.example .env
# Edit .env to add API keys (optional, Tavily recommended)./deploy.shChoose option 5 (Everything) to deploy all components.
After deployment completes, view all URLs, IDs, and ARNs:
./scripts/show-outputs.shOr check the configuration files:
frontend-config.json- Frontend URLs and Cognito details.env- Backend resource IDs
# Use USER_POOL_ID from outputs above
aws cognito-idp admin-create-user \
--user-pool-id <USER_POOL_ID> \
--username [email protected] \
--user-attributes Name=email,[email protected] \
--temporary-password 'TempPass123!' \
--message-action SUPPRESSNavigate to the CloudFront URL from the outputs and log in with your credentials.
Click image to view full size
The system consists of the following key components:
- Frontend Layer: CloudFront + React UI with Cognito authentication
- BFF Layer: ECS/ALB serving Express server
- Agent Runtime:
- Research Agent (LangGraph workflow)
- Chat Agent (Strands conversation)
- AgentCore Services:
- Memory: Chat and research memory with semantic search
- Gateway: MCP-based tool catalog and interfacing
- Code Interpreter: Sandboxed code execution
- AWS Services: DynamoDB, S3, Lambda tools
- Research Tools: Web search, ArXiv, Wikipedia, Financial data
Complete research workflow from configuration to final output
The research process follows a 13-stage workflow:
Key Features:
- Map-Reduce Parallelism - Parallel analysis and synthesis with aggregation barriers
- Reference-Aware - Skips research for questions already answered by references
- Real-Time Status - DynamoDB polling for live UI updates
- Multi-Model - Different models for different stages
- Cancellable - Graceful cancellation at any stage
See RESEARCH_METHODOLOGY.md for detailed workflow explanation.
| Type | Tools | Best For |
|---|---|---|
| Basic Web | DuckDuckGo, Wikipedia | General topics, quick research |
| Advanced Web | Google, Tavily, Wikipedia | In-depth web research |
| Academic | ArXiv, Wikipedia, Google | Scientific papers, research |
| Financial | Stock APIs, news, web | Market research, companies |
| Comprehensive | All tools | Complex multi-domain topics |
| Depth | Dimensions | Aspects/Dim | Total Aspects | Best For |
|---|---|---|---|---|
| Quick | 2 | 2 | 4 | Rapid overview |
| Balanced | 3 | 3 | 9 | Standard research |
| Deep | 5 | 3 | 15 | Comprehensive analysis |
.
├── research-agent/ # LangGraph research workflow
│ ├── src/
│ │ ├── agent.py # Main entrypoint
│ │ ├── workflow.py # LangGraph workflow
│ │ ├── nodes/ # Workflow stage implementations
│ │ ├── catalog/ # Tool discovery and loading
│ │ └── utils/ # Helpers (status, memory, S3)
│ └── Dockerfile
├── chat-agent/ # Strands chat agent
│ ├── src/
│ │ └── handler.py # Chat entrypoint
│ └── Dockerfile
├── frontend/ # React application
│ ├── src/
│ │ ├── pages/ # Overview, CreateResearch, History, Chat
│ │ └── components/ # Cloudscape UI components
│ └── server/ # Express BFF server
├── terraform/ # Infrastructure as Code
│ ├── backend/ # AgentCore, DynamoDB, S3, ECR
│ ├── frontend/ # Cognito, ECS, ALB, CloudFront
│ └── tools/ # Gateway, Lambda functions
├── shared/
│ └── model_registry.json # Model configuration
├── scripts/ # Utilities
│ ├── show-outputs.sh # Display deployment outputs
│ └── update_env.py # Update .env from Terraform
└── deploy.sh # Main deployment orchestrator
- Framework: LangGraph
- Execution: AWS Bedrock AgentCore Runtime
- Memory: AgentCore Memory (6-month retention)
- Tools: 14 tools via AgentCore Gateway
- Output: Markdown, DOCX, PDF reports
- Framework: Strands
- Execution: AWS Bedrock AgentCore Runtime
- Memory: Short-term memory (STM)
- Context: Access to research findings
- Output: Conversational responses
- Framework: React 18
- Design: Cloudscape Design System
- Auth: AWS Cognito + Amplify
- Deployment: ECS Fargate + CloudFront
- Search: DuckDuckGo, Google, Tavily
- Knowledge: Wikipedia, ArXiv
- Financial: Stock quotes, history, news, analysis
- Code: Code Interpreter for data analysis
Auto-populated after backend deployment:
AWS_REGION- AWS regionMEMORY_ID- AgentCore Memory ID
Optional API keys:
TAVILY_API_KEY- Tavily search (recommended)GOOGLE_API_KEY+GOOGLE_SEARCH_ENGINE_ID- Google searchLANGCHAIN_API_KEY- LangSmith tracing
Edit shared/model_registry.json to:
- Add new models
- Configure per-stage model combinations
- Set cost/quality optimization
Customize in research-agent/src/config/research_config.py:
- Research types and tool mappings
- Depth configurations
- Concurrency limits
./deploy.sh # Select option 5./terraform/deploy-backend.sh
./terraform/deploy-frontend.sh
./terraform/deploy-tools.shcd terraform/backend
terraform init
terraform apply
cd ../frontend
terraform init
terraform apply
cd ../tools
terraform init
terraform applySee DEPLOYMENT.md for detailed instructions.
- DEPLOYMENT.md - Comprehensive deployment guide
- RESEARCH_METHODOLOGY.md - Detailed workflow explanation
- MODEL_CONFIGURATION.md - Model setup and customization
- AWS Account with Bedrock enabled
- AWS CLI v2+ configured
- Terraform v1.0+
- Docker installed and running (required for frontend deployment)
- Node.js 18+ (for frontend build)
- Python 3.11+ (for scripts)
# View all deployment outputs (URLs, IDs, ARNs)
./scripts/show-outputs.sh
# Update .env from Terraform outputs
python scripts/update_env.py
# Test gateway connection
python terraform/tools/scripts/test-gateway-simple.py- Documentation: See docs linked above
- Issues: Open GitHub issue
- Logs: Check CloudWatch logs
MIT
Built with:
- AWS Bedrock AgentCore
- LangGraph by LangChain
- React & Cloudscape Design
- Terraform