A fully AI-powered scenario planning platform using Anthropic AI for automated strategic foresight, horizon scanning, and decision support across multiple industries.
Backend: ✅ Live at https://33kvywy84h.execute-api.us-east-1.amazonaws.com
Frontend: 🚀 Deploying with API connection fix...
Branch: ai-platform/ai-foresight-platform-yEVtZ
Last Updated: 2025-12-26
This platform automates the strategic foresight process by:
- Continuously scanning millions of data signals from global sources
- Using AI agents powered by AWS Bedrock (Claude, Llama, Titan, Cohere, and more) to synthesize insights, identify drivers, and generate scenarios
- Intelligent multi-model orchestration with automatic model selection and fallback for optimal cost and performance
- Providing real-time monitoring of scenario signposts and likelihood updates
- Recommending robust actions that work across multiple future scenarios
- Serving enterprise clients across defense, energy, healthcare, finance, technology, commodities, and consumer sectors
Unlike traditional single-model systems, this platform uses AWS Bedrock to orchestrate multiple AI models:
- AI Sonnet 4.5 for complex reasoning and scenario construction
- AI Haiku 3.5 for fast, cost-effective analytical tasks
- Llama 70B as intelligent fallback for complex tasks
- Amazon Titan for embeddings and simple text generation
- Cohere and AI21 for specialized capabilities
- Automatic failover when primary models are unavailable
- Cost optimization by matching model capability to task complexity
┌─────────────────────────────────────────────────────────────┐
│ Frontend (Next.js) │
│ ┌────────────┬────────────┬────────────┬────────────┐ │
│ │ Dashboard │ Scenarios │ Signals │ Actions │ │
│ └────────────┴────────────┴────────────┴────────────┘ │
└───────────────────────────┬─────────────────────────────────┘
│ REST/GraphQL API
┌───────────────────────────┴─────────────────────────────────┐
│ API Gateway │
└─────────────┬─────────────┬────────────┬────────────────────┘
│ │ │
┌────────┴────┐ ┌──────┴──────┐ ┌──┴────────┐
│ │ │ │ │ │
┌────▼──────┐ ┌───▼─────┐ ┌───▼────┐ ┌▼──────────┐
│ Ingestion │ │ Signal │ │ Trend │ │ AI │
│ Service │ │ Service │ │Service │ │Orchestrator│
└─────┬─────┘ └────┬────┘ └───┬────┘ └─────┬─────┘
│ │ │ │
┌─────▼─────────────▼────────────▼────────────▼──────┐
│ Data Lake + Vector Store │
│ (S3/Iceberg + pgvector/Pinecone) │
└────────────────────────────────────────────────────┘
- Ingestion Service - Connects to data sources and ingests evidence
- Enrichment Service - Normalizes, extracts entities, and enriches data
- Signal Service - Detects patterns and weak signals
- Trend Service - Time-series forecasting and trend analysis
- Vector Service - Embeddings and RAG retrieval
- AI Orchestrator - AI agent orchestration with Anthropic Claude
- Scenario Engine - Scenario generation and management
- Monitoring Service - Signpost tracking and alerts
- Action Planner - Strategic recommendations
- Audit Service - Governance and compliance
The platform uses 7 specialized AI agents, each with tailored prompts and output schemas:
- Signal Synthesizer - Analyzes clustered signals to identify emerging themes
- Driver Extractor - Identifies key driving forces and critical uncertainties
- Scenario Constructor - Creates coherent scenario frameworks and logics
- Narrative Generator - Writes rich, evidence-based scenario narratives
- Signpost Designer - Designs monitoring indicators for scenarios
- Action Planner - Recommends robust and contingent strategic actions
- Quality Critic - Reviews scenario sets for quality, consistency, and completeness
Evidence Data → Signal Synthesizer → Emerging Themes
↓
Driver Extractor → Key Drivers + Uncertainties
↓
Scenario Constructor → Scenario Logics
↓
Narrative Generator → Rich Narratives
↓
Signpost Designer → Monitoring Framework
↓
Action Planner → Strategic Recommendations
↓
Quality Critic → Validated Output
- Evidence - Raw data from sources (news, research, patents, economic data)
- Signal - Detected patterns or weak signals
- Trend - Time-series trends with forecasts
- Driver - Key forces shaping the future
- Uncertainty - Critical uncertainties for scenario planning
- Scenario - Plausible future scenario with narrative
- ScenarioSet - Complete set of scenarios exploring uncertainty space
- Signpost - Monitoring indicator for scenario likelihood
- Action - Strategic recommendation
- ActionPlan - Complete action plan with robust and contingent actions
See /backend/shared/models/ for full schema definitions.
- Python 3.10+
- Node.js 18+
- PostgreSQL 15+ (with pgvector extension)
- Redis
- AWS Account with Bedrock access (primary option)
- OR Anthropic API key (alternative option)
git clone <repo-url>
cd SDP
# Backend setup - AWS Bedrock Orchestrator (Recommended)
cd backend/services/bedrock-orchestrator
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env and configure AWS credentials# .env file
AWS_REGION=us-east-1
# Use IAM role (recommended) or access keys
# AWS_ACCESS_KEY_ID=your_key
# AWS_SECRET_ACCESS_KEY=your_secret
COST_TRACKING_ENABLED=true
MONTHLY_BUDGET_USD=10000
ENABLE_MODEL_FALLBACK=trueEnable models in AWS Bedrock Console:
- Anthropic: AI Sonnet 4.5, Haiku 3.5
- Amazon: Titan Text, Titan Embeddings
- Meta: Llama 3.1 70B
- Others: Cohere, AI21
See BEDROCK_DEPLOYMENT.md for detailed setup.
cd backend/services/ai-orchestrator
pip install -r requirements.txt
cp .env.example .env
# Add ANTHROPIC_API_KEY=your_key# Bedrock (recommended)
cd backend/services/bedrock-orchestrator
python multi_model_orchestrator.py
# OR AI direct
cd backend/services/ai-orchestrator
python api.pycurl http://localhost:8001/health
curl http://localhost:8001/agentsimport httpx
import asyncio
async def test_agent():
async with httpx.AsyncClient() as client:
# Prepare request
request = {
"agent_type": "signal_synthesizer",
"context": {
"signals": "...", # Signal data
"evidence": "...", # Evidence data
"industry": "Energy",
"region": "Global",
"horizon": "2030"
}
}
# Call orchestrator
response = await client.post(
"http://localhost:8001/execute",
json=request,
timeout=60.0
)
result = response.json()
print(f"Agent output: {result['output']}")
print(f"Tokens used: {result['tokens_used']}")
print(f"Citations: {result['citations_count']}")
asyncio.run(test_agent())SDP/
├── backend/
│ ├── services/
│ │ ├── ai-orchestrator/ # AI AI orchestration
│ │ │ ├── agents.py # Agent definitions & prompts
│ │ │ ├── orchestrator.py # Core orchestrator
│ │ │ ├── api.py # FastAPI service
│ │ │ ├── config.py # Configuration
│ │ │ └── requirements.txt
│ │ ├── ingestion-service/ # Data ingestion
│ │ │ └── connectors/ # Data source connectors
│ │ ├── vector-service/ # RAG and embeddings
│ │ │ └── rag.py # Context builder
│ │ └── [other services]/
│ └── shared/
│ ├── models/ # Pydantic data models
│ │ ├── evidence.py
│ │ ├── signal.py
│ │ ├── trend.py
│ │ ├── driver.py
│ │ ├── scenario.py
│ │ └── action.py
│ ├── schemas/ # JSON schemas
│ └── utils/ # Shared utilities
├── frontend/
│ └── web-app/ # Next.js application
├── infrastructure/
│ ├── kubernetes/ # K8s manifests
│ ├── terraform/ # IaC
│ └── docker/ # Dockerfiles
├── ai/
│ ├── prompts/ # AI prompt templates
│ ├── agents/ # Agent configurations
│ └── evaluation/ # Model evaluation
└── docs/
├── architecture/ # Architecture docs
├── api/ # API documentation
└── guides/ # User guides
| Parameter | Default | Description |
|---|---|---|
anthropic_api_key |
- | Anthropic API key (required) |
anthropic_default_model |
ai-sonnet-4-5-20250929 | Primary model |
anthropic_fast_model |
ai-haiku-3-5-20241022 | Fast model for simple tasks |
anthropic_max_tokens |
4096 | Max output tokens |
cache_enabled |
true | Enable semantic caching |
cache_ttl_seconds |
3600 | Cache TTL |
pii_detection_enabled |
true | PII detection in inputs |
output_validation_strict |
true | Strict JSON schema validation |
log_prompts |
true | Log prompts for debugging |
log_outputs |
true | Log outputs for audit |
- PII Detection - Scans input context for personally identifiable information
- Input Sanitization - Removes potential prompt injection attempts
- Output Validation - Validates against JSON schemas
- Rate Limiting - Per-tenant quotas and rate limits
- Audit Logging - Complete audit trail of all AI interactions
- Citation Enforcement - Ensures all claims are evidence-backed
- Tenant Isolation - Multi-tenant data segregation
- All prompts and outputs are logged with hash identifiers
- Context hashing for privacy-preserving caching
- Optional on-premise deployment for sensitive clients
- GDPR/CCPA compliance ready
- Request latency by agent type
- Token usage (input/output)
- Cache hit rates
- Citation counts
- Validation pass/fail rates
- Error rates and types
Structured JSON logging with:
- Request/trace IDs
- Tenant/user IDs
- Agent types
- Token counts
- Latencies
- Errors and stack traces
pytest backend/services/ai-orchestrator/tests/pytest backend/tests/integration/pytest ai/evaluation/Once the orchestrator is running, access:
- Swagger UI: http://localhost:8001/docs
- ReDoc: http://localhost:8001/redoc
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/agents |
GET | List available agents |
/execute |
POST | Execute an agent |
/metrics |
GET | Service metrics |
# 1. Synthesize signals into themes
themes_response = await orchestrator.execute({
"agent_type": "signal_synthesizer",
"context": {...}
})
# 2. Extract drivers and uncertainties
drivers_response = await orchestrator.execute({
"agent_type": "driver_extractor",
"context": {
"themes": themes_response['output']['themes'],
...
}
})
# 3. Construct scenarios
scenarios_response = await orchestrator.execute({
"agent_type": "scenario_constructor",
"context": {
"drivers": drivers_response['output']['drivers'],
"uncertainties": drivers_response['output']['critical_uncertainties'],
...
}
})
# 4. Generate narratives for each scenario
for scenario in scenarios_response['output']['scenarios']:
narrative_response = await orchestrator.execute({
"agent_type": "narrative_generator",
"context": {
"title": scenario['title'],
"logic": scenario['core_logic'],
...
}
})
# 5. Design signposts
signposts_response = await orchestrator.execute({
"agent_type": "signpost_designer",
"context": {...}
})
# 6. Generate action plan
actions_response = await orchestrator.execute({
"agent_type": "action_planner",
"context": {
"scenarios": [...],
...
}
})
# 7. Quality check
quality_response = await orchestrator.execute({
"agent_type": "quality_critic",
"context": {
"scenario_set": {...},
...
}
})Generate scenarios for energy transition, renewable adoption, policy changes, and technology breakthroughs.
Plan for pandemic preparedness, personalized medicine, regulatory changes, and demographic shifts.
Model macroeconomic scenarios, regulatory changes, fintech disruption, and market volatility.
Explore geopolitical scenarios, technological warfare, alliance shifts, and security threats.
Anticipate platform shifts, AI disruption, quantum computing, and regulatory impacts.
Track consumer behavior shifts, sustainability trends, economic cycles, and market disruptions.
- Core data models
- AI orchestrator with 7 agents
- Data ingestion connectors
- RAG context builder
- Basic frontend UI
- Scenario generation pipeline
- Real-time data streaming
- Signpost monitoring service
- Alert system
- Multi-tenant isolation
- Enterprise authentication
- Licensed data integrations
- Advanced visualizations
- Export/reporting tools
- Integration APIs
- On-premise deployment option
- Industry-specific modules
- Advanced simulation
- Action automation
- Global expansion
This is an internal project. For questions or contributions, contact the core team.
Copyright © 2025. All rights reserved.
- Built with Anthropic Claude
- Strategic foresight methodology adapted from industry best practices
- Inspired by leading scenario planning frameworks
For technical support:
- Open an issue in the repository
- Contact the development team
- Check documentation in
/docs
Built for the future, powered by AI.