A multi-agent stock research system. Type a company name, get a full technical analysis with 5 charts.
Walks through: Orchestrator → Data flow → Researcher → Analyst → Sandbox → Full lifecycle
| Stage | Folder | Status |
|---|---|---|
| 1 — LangChain multi-agent | 1-deepagent/ |
✅ Done |
| 2 — MCP server | 2-mcp-server/ |
✅ Done · Open interactive explainer |
| 3 — Agent-to-agent (A2A) | 3-a2a/ |
✅ Done · Open interactive explainer |
Part 1 of this project is complete. All three stages (LangChain multi-agent, MCP server, A2A protocol) are fully working.
Part 2 is underway — AWS-hosted, continuously evolving with new agents.
The system runs five independent A2A services coordinated by an orchestrator:
User query
│
▼
Orchestrator (main.py)
│
├── Researcher Agent (port 8001) — fetches price, fundamentals, news via MCP
│
├── Analyst Agent (port 8002) — technical analysis + 5 charts
│
└── Sentiment Agent (port 8003) — StockTwits sentiment (runs in parallel with analyst)
subagents/sentiment_agent.py — A2A service on port 8003.
Fetches social media data from StockTwits and uses GPT-4o-mini to extract investment-relevant sentiment:
- Fetches 2 pages (up to 60 messages) per ticker — safe rate limit for bulk use (40 req/2 min, well within the ~200/hr free tier)
- Tags each message as Bullish, Bearish, or Neutral based on StockTwits metadata
- GPT-4o-mini extracts overall sentiment, confidence level, and 3–5 key themes from the messages
- Result includes counts and themes displayed in a dedicated panel on the dashboard
- Runs in parallel with the Analyst agent to keep total latency down
- Deployed on AWS EC2 (t3.small, ap-south-1)
- Docker + Docker Compose for container orchestration
- ECR for Docker image registry
- GitHub Actions CI/CD pipeline (auto deploy on push to main)
- AWS Parameter Store for secrets management
- Nginx reverse proxy
sentiment_agent.py— A2A service on port 8003- Fetches StockTwits messages per ticker (2 pages = 60 messages)
- GPT-4o-mini extracts themes and overall sentiment
- Sentiment panel displayed on dashboard
- Runs in parallel with researcher + analyst
- Alpaca paper trading account integration
trading_agent.py— A2A service- Value screening: P/E, ROE, profit margins, free cash flow
- Position sizing rules (max 10% per stock, 20% cash reserve)
- Stop loss (-15%) and take profit (+30%) rules
- Paper trades on Alpaca
- Connect to Alpaca API directly
- Daily + weekly portfolio performance summary
- P&L breakdown per position
- All buy/sell orders fetched from Alpaca (no separate DB needed)
- WhatsApp notifications via Twilio Sandbox (free, personal use)
- EOD report sent to your WhatsApp automatically
- Buy/sell execution alerts in real time
- On demand portfolio summary
- Feed generated charts to GPT-4o vision
- Visual pattern observations (head & shoulders, support/resistance)
- Pattern analysis added to final report
- Short term trade suggestions (2-4hr or 1-3 day timeline)
- Separate from value investment (Phase 3 is long term)
- Based on technical indicators + sentiment signals