How lakshmanpanda/aegis works
AEGIS is a two-service competitive-intelligence product: its scraper resolves a product and extracts market signals; the core service turns those signals into graph-backed analysis, a scored strategy, and an executive report. The primary workflow runs through the core API and LangGraph agents, with the API conditionally requesting fresh scraper data. The README documents additional monitoring and email-alert capabilities. Some subsystem links are based on README documentation because their implementation excerpts were not provided.
Main entry points: main_agent.py Extraction workflow · mcp_client.py MCP client · workflow.py Agent workflow · routes.py Core API
Components 25
Market sensor
- Scraper API
Scrapper/api.py - Product search
Scrapper/agents/amazon_search_agent.py - Extraction workflow
Scrapper/main_agent.py - Page fetcher
Scrapper/agents/fetcher.py - HTML cleaner
Scrapper/utils/html_cleaner.py - Pricing signals
Scrapper/agents/pricing_agent.py - Sentiment signals
Scrapper/agents/sentiment_agent.py - Market signals
Scrapper/agents/market_intel_agent.py - Competitor signals
Scrapper/agents/competitor_intel_agent.py
Intelligence workflow
- Core API
aegis_core/app/api/routes.py - Agent workflow
aegis_core/app/graph/workflow.py - Perception scout
aegis_core/app/agents/perception_scout.py - Graph architect
aegis_core/app/agents/graph_architect.py - Wargaming strategist
aegis_core/app/agents/wargame_strategist.py - Pivot scoring
aegis_core/app/core/mathematics.py - Execution commander
aegis_core/app/agents/execution_commander.py - Shared agent state
aegis_core/app/models/state.py
Graph and alerts
- MCP client
aegis_core/app/core/mcp_client.py - Neo4j graph
- Graph tools
aegis_core/app/mcp_servers/intel_server.py - Inventory tools
aegis_core/app/mcp_servers/command_server.py - Mail server
aegis_core/app/mcp_servers/mcp_server_mail.py - Monitor scheduler
aegis_core/app/api/routes.py
User interface
- Command center
aegis_core/streamlit_app.py
Other components
- Seller
Connections 29
- Seller → Command center: submits target
README.md - Command center → Core API: requests analysis
README.md - Core API → Scraper API: requests scrape
aegis_core/app/api/routes.py - Scraper API → Extraction workflow: invokes pipeline
Scrapper/api.py - Extraction workflow → Product search: resolves product
Scrapper/main_agent.py - Extraction workflow → Page fetcher: fetches page
Scrapper/main_agent.py - Extraction workflow → Pricing signals: extracts pricing
Scrapper/main_agent.py - Extraction workflow → Sentiment signals: extracts sentiment
Scrapper/main_agent.py - Extraction workflow → Market signals: extracts market
Scrapper/main_agent.py - Extraction workflow → Competitor signals: finds competitors
Scrapper/main_agent.py - Pricing signals → HTML cleaner: cleans HTML
Scrapper/agents/pricing_agent.py - Sentiment signals → HTML cleaner: cleans HTML
Scrapper/agents/sentiment_agent.py - Market signals → HTML cleaner: cleans HTML
Scrapper/agents/market_intel_agent.py - Core API → Agent workflow: runs analysis
aegis_core/app/api/routes.py - Agent workflow → Perception scout: dispatches
aegis_core/app/graph/workflow.py - Agent workflow → Graph architect: dispatches
aegis_core/app/graph/workflow.py - Agent workflow → Wargaming strategist: dispatches
aegis_core/app/graph/workflow.py - Agent workflow → Execution commander: dispatches
aegis_core/app/graph/workflow.py - Wargaming strategist → Pivot scoring: calculates score
aegis_core/app/agents/wargame_strategist.py - Graph architect → MCP client: uses tools
aegis_core/app/agents/graph_architect.py - Wargaming strategist → MCP client: invokes tools
aegis_core/app/agents/wargame_strategist.py - Execution commander → MCP client: uses tools
aegis_core/app/agents/execution_commander.py - MCP client → Graph tools: starts subprocess
aegis_core/app/core/mcp_client.py - MCP client → Inventory tools: starts subprocess
aegis_core/app/core/mcp_client.py - MCP client → Mail server: starts subprocess
aegis_core/app/core/mcp_client.py - Graph tools → Neo4j graph: queries graph
README.md - Inventory tools → Neo4j graph: reads inventory
README.md - Execution commander → Mail server: sends alerts
README.md - Core API → Monitor scheduler: schedules monitoring
aegis_core/app/api/routes.py