Description - InfraResilience Agent is a Memory + Chain-of-Thought + Persona (MCP) powered LangChain agent designed for infrastructure modernization and resilience test planning. It accepts a description of a legacy technology stack and an optional outage scenario, then generates: Modernization Plan — technology upgrades, migration paths, best practices Resilience Strategy — test scenarios, fault-injection drills, disaster recovery ideas Reasoning Summary — short, human-readable rationale Features - MCP: Conversation memory for multi-turn context LangChain Agent: Tool-using agent with deterministic helpers Toolbelt Included: Modernization suggestions Event decoupling (SQS/SNS) API hardening (Gateway/WAF) Caching strategies (Redis/ElastiCache) Resilience drills (Oracle, Kafka, S3, Redis) FastAPI HTTP interface for easy integration Reusable template for agentic AI projects Example Input: { "legacy_stack": { "scheduler": "Autosys", "language": "Java 8", "architecture": "monolith", "dependencies": ["Oracle DB", "FTP transfer"], "use_case": "end-of-day batch risk reporting" }, "outage_scenario": "Oracle DB unavailable for 30 minutes" } Example Output: { "modernization_plan": [ "Replace Autosys with Apache Airflow or AWS Step Functions", "Upgrade Java 8 → Java 17 and containerize workloads", "Refactor monolith into microservices and add API Gateway" ], "resilience_strategy": [ "Test RDS Multi-AZ failover for Oracle DB", "Implement circuit breaker on DB calls", "Run DR simulation and validate RTO/RPO" ], "reasoning_summary": "Legacy stack has aging orchestration, outdated language, and tight coupling..." } Quick Start Install dependencies: pip install fastapi uvicorn langchain langchain-openai openai pydantic Export your LLM API key: export OPENAI_API_KEY=sk-... Run API: uvicorn main:app --reload --port 8000 POST to /analyze-stack with JSON payload. Project Structure agent.py → LangChain agent w/ MCP + CoT tools.py → Modernization + resilience toolbelt main.py → FastAPI HTTP API