10 AI agents. Real market data. Your investment philosophy.
Quick Start · Architecture · Agents · Dashboard · Customize · FAQ
An open-source multi-agent system that simulates a complete AI-powered investment firm. 10 specialized agents analyze markets, debate strategy, manage risk, and make decisions — all filtered through your personal investment philosophy.
Unlike other AI trading tools, this system doesn't just analyze markets. It creates a decisional clone of you: an AI CEO (Omega) that reads your philosophy, understands your principles, and ensures every decision aligns with how you think about investing.
Ζ Zeta scans macro conditions → Η Eta reads market sentiment →
Γ Gamma builds strategy → Α Alpha picks stocks & crypto →
Β Beta analyzes fundamentals → Θ Theta sizes positions →
Ε Epsilon backtests → Δ Delta approves or blocks →
Ι Iota audits everything → Ω Omega reviews as CEO
Disclaimer: This is an educational/research project. Not financial advice. Do not trade real money based on this system without your own due diligence.
- 10 specialized AI agents with distinct roles, running a complete investment pipeline
- Philosophy-driven CEO — Omega reads
philosophy.mdand makes decisions like you - Real market data — yfinance (stocks, crypto), FRED (macro), Fear & Greed Index
- Claude AI-powered — investment memos, strategy synthesis, CEO reviews
- Live dashboard — dark-themed HTML dashboard with D3.js charts, real-time feed
- Dual mode — DEMO (simulated) or LIVE (real data from Python agents)
- Fully customizable — swap the philosophy, change the stock pool, adjust risk params
- Python 3.10+ — download
- pip — comes with Python
- macOS, Linux, or WSL — Windows users should use WSL
git clone https://github.com/YOUR_USERNAME/ai-investment-firm.git
cd ai-investment-firm
# Automatic setup (installs deps, creates .env, creates philosophy.md)
bash setup.shOr manually:
pip3 install -r requirements.txt
cp .env.example .env
cp philosophy-template.md philosophy.md
mkdir -p data/macro data/sentiment data/internalOpen .env and add your keys:
nano .env # or use any text editorANTHROPIC_API_KEY=sk-ant-xxxxx # Required — powers 3 agents
FRED_API_KEY=your_key_here # Recommended — macro data
FINNHUB_API_KEY=your_key_here # Optional — news & social sentiment| Key | Required | Free? | Get it at |
|---|---|---|---|
ANTHROPIC_API_KEY |
Yes | Paid (~$0.10/run) | console.anthropic.com |
FRED_API_KEY |
Recommended | Free | fred.stlouisfed.org |
FINNHUB_API_KEY |
Optional | Free | finnhub.io |
Without
ANTHROPIC_API_KEY: Beta, Gamma, and Omega fall back to rule-based analysis (works, but less intelligent). WithoutFRED_API_KEY: Zeta uses yfinance only (fewer macro indicators). WithoutFINNHUB_API_KEY: Eta skips social sentiment and news (still calculates Fear & Greed).
This is what makes the system yours. Open philosophy.md and describe how you think about investing:
nano philosophy.mdThe template guides you through: portfolio structure, core principles, decision framework, books that shaped you, and forbidden actions. Omega will read this file and filter every decision through your worldview.
Skip this step to use conservative defaults. You can always add it later.
# Load your API keys and start the server
source .env && python3 server.pyYou'll see:
╔═══════════════════════════════════════════╗
║ λ AI Investment Firm — API Server ║
║ http://localhost:8080 ║
╚═══════════════════════════════════════════╝
Open http://localhost:8080 in your browser.
In the dashboard:
- Click LIVE (top-right toggle) to switch from demo to real mode
- Click CONTROLS (top-right button)
- Click RUN PIPELINE — all 10 agents execute in sequence (~60s)
- Watch the feed fill with real analysis
Or run from terminal (no dashboard needed):
source .env && python3 agents/run_pipeline.py- Feed — watch agents debate in real-time
- Sidebar — Omega CEO review, macro snapshot, sentiment gauges, strategy, backtest results
- Reports — click any report for detailed analysis (investment memos, backtest, CEO review)
- Toggle IT/EN — interface supports Italian and English
| Problem | Solution |
|---|---|
ModuleNotFoundError: flask |
Run pip3 install -r requirements.txt |
Port 8080 in use |
Kill the old process: lsof -ti :8080 | xargs kill |
| Dashboard shows "Server not reachable" | Make sure server.py is running in another terminal |
| Pipeline hangs for >3 minutes | yfinance can be slow — wait, or check your internet |
NaN or undefined in dashboard |
Restart the server — it sanitizes NaN values automatically |
| Omega says "No philosophy file" | Create philosophy.md in the project root |
◆ FOUNDER (Human)
│ philosophy.md
▼
┌─────────┐
│ Ω Omega │ ← CEO — decisional clone
│ CEO │ reads philosophy, reviews everything
└────┬────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌────────┐ ┌──────────┐ ┌────────────┐
│ Ζ Zeta │ │ Η Eta │ │ Γ Gamma │
│ Macro │ │Sentiment │ │ Strategist │
└───┬────┘ └────┬─────┘ └──────┬─────┘
│ │ │
└────────────────┼────────────────────┘
▼
┌──────────┐
│ Α Alpha │ ← picks stocks & crypto
│ Picker │
└────┬─────┘
▼
┌──────────┐
│ Β Beta │ ← deep analysis (Claude AI)
│ Analyst │
└────┬─────┘
▼
┌─────────┼──────────┐
▼ ▼
┌──────────┐ ┌───────────┐
│ Θ Theta │ │ Ε Epsilon │
│Allocator │ │ Simulator │
└────┬─────┘ └─────┬─────┘
│ │
└────────┬───────────┘
▼
┌──────────┐
│ Δ Delta │ ← APPROVES or BLOCKS
│ Risk │ (has veto power)
└────┬─────┘
▼
┌──────────┐
│ Ι Iota │ ← audit trail
│ Auditor │
└──────────┘
Agents communicate through JSON files. Each agent reads the outputs of previous agents and produces its own. Feedback loops exist:
- Rejection Cascade — Delta blocks → agents revise
- Regime Change — Zeta shifts macro → all agents recalibrate
- Contrarian Mode — Eta detects extreme sentiment → Omega activates
| # | Agent | Role | Data Sources | Output |
|---|---|---|---|---|
| 1 | Ζ Zeta | Macro Sentinel | FRED API, yfinance | Regime classification, market snapshot |
| 2 | Η Eta | Sentiment Analyst | Crypto F&G, VIX proxy, Finnhub | Sentiment score, contrarian signals |
| 3 | Γ Gamma | Strategist | All inputs + Claude AI | Strategy document, sector allocation |
| 4 | Α Alpha | Stock Picker | yfinance (20 stocks + 15 crypto) | Ranked candidates with scores |
| 5 | Β Beta | Analyst | yfinance fundamentals + Claude AI | Investment memos (bull/bear/conviction) |
| 6 | Θ Theta | Allocator | Kelly criterion, correlations | Position sizing, rebalance plan |
| 7 | Ε Epsilon | Simulator | Historical replay, Monte Carlo | Backtest pass rate, stress tests |
| 8 | Δ Delta | Risk Manager | 9 risk checks, veto power | APPROVED / REDUCED / BLOCKED |
| 9 | Ι Iota | Auditor | All agent outputs | Audit log, meeting minutes, scores |
| 10 | Ω Omega | CEO | philosophy.md + all data + Claude |
Executive review, fortress compliance |
The live dashboard shows all agents working in real-time.
Full dashboard: live feed (left), intelligence sidebar (right)
Real-time feed: each agent speaks with its Greek letter and color
Omega CEO review, macro dashboard, sentiment gauges, strategy card
Claude AI-generated investment memo with thesis, bull/bear case, risk factors
Omega reviews every decision through the Founder's philosophy
10 agents running in sequence — from macro analysis to CEO review
DEMO mode: simulated agents making decisions with mock data (works offline)
- Feed Live — real-time messages from all 10 agents
- Sidebar Intelligence — Omega CEO, Macro, Sentiment, Strategy, Backtest, Portfolio, Allocation, Positions
- Report Library — clickable detailed reports (8 types: Briefing, Sentiment, Strategy, Investment Memo, Allocation, Backtest, CEO Review)
- Meeting Room — investment committee records with voting
- Yield Chart — portfolio performance with D3.js
- DEMO — simulated agents with mock data (works fully offline, no API keys needed)
- LIVE — real market data from Python agents via Flask API server
The philosophy.md file is the heart of the system. It's what makes Omega (the CEO) think like you.
cp philosophy-template.md philosophy.md
nano philosophy.mdFill in:
- Your portfolio structure (e.g., 60/40, barbell, 33/33/33)
- Core principles (never sell X, max drawdown Y%)
- Decision framework (what questions to ask for every trade)
- Books/mentors that shaped your investing
- Forbidden actions (what Omega should NEVER do)
Without a philosophy: Omega uses conservative defaults. With your philosophy: Omega becomes your decisional clone.
Edit agents/config.json to change the 20 stocks and 15 crypto assets that Alpha screens.
Delta's risk limits are configurable in agents/delta_risk.py and can be overridden by Zeta's regime-based directives.
ai-investment-firm/
├── server.py ← API server (Flask)
├── index.html ← Live dashboard
├── philosophy.md ← YOUR investment philosophy
├── philosophy-template.md ← Template to get started
├── setup.sh ← One-click setup
├── requirements.txt ← Python dependencies
├── .env.example ← API keys template
│
├── agents/
│ ├── zeta_macro.py ← Ζ Macro Sentinel
│ ├── eta_sentiment.py ← Η Sentiment Analyst
│ ├── gamma_strategist.py ← Γ Strategist
│ ├── alpha_picker.py ← Α Stock Picker
│ ├── beta_analyst.py ← Β Analyst
│ ├── theta_allocator.py ← Θ Portfolio Allocator
│ ├── epsilon_simulator.py ← Ε Market Simulator
│ ├── delta_risk.py ← Δ Risk Manager
│ ├── iota_auditor.py ← Ι Auditor
│ ├── omega_ceo.py ← Ω CEO
│ ├── run_pipeline.py ← Full pipeline orchestrator
│ ├── run_*.py ← Individual agent runners
│ └── config.json ← Asset universe config
│
└── data/ ← Generated by agents (gitignored)
├── macro/briefing.json
├── sentiment/sentiment.json
└── internal/
├── strategy.json
├── picks.json
├── analyses.json
├── allocation.json
├── backtest.json
├── decisions.json
├── portfolio.json
└── ceo_review.json
When running server.py, these endpoints are available:
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Dashboard |
GET |
/api/briefing |
Zeta macro data |
GET |
/api/sentiment |
Eta sentiment data |
GET |
/api/strategy |
Gamma strategy |
GET |
/api/picks |
Alpha picks |
GET |
/api/analyses |
Beta analyses |
GET |
/api/allocation |
Theta allocation |
GET |
/api/backtest |
Epsilon backtest |
GET |
/api/decisions |
Delta decisions |
GET |
/api/portfolio |
Portfolio state |
GET |
/api/all-data |
Everything in one call |
GET |
/api/status |
System status + API key check |
POST |
/api/run-pipeline |
Run full 10-agent pipeline |
POST |
/api/run-agent/<name> |
Run single agent |
Does this make real trades? No. It analyzes and recommends. There's no exchange integration. You make the final call.
How much does Claude API cost per pipeline run? ~$0.05-0.15 per run (3 Claude calls: Beta memos, Gamma strategy, Omega review).
Can I use OpenAI instead of Claude? Not yet. The prompts are optimized for Claude. PRs welcome for multi-LLM support.
Does it work without API keys? Partially. Without Claude, Beta/Gamma/Omega fall back to local rule-based analysis. Without FRED, Zeta uses yfinance only. The dashboard DEMO mode works fully offline.
How often should I run the pipeline? Once a day (market hours) is ideal. The agents analyze current market conditions each run.
PRs welcome! Some ideas:
- Multi-LLM support (OpenAI, Gemini, Ollama)
- Real broker integration (Alpaca, Interactive Brokers)
- More sentiment sources (Reddit, Twitter)
- Mobile-responsive dashboard improvements
- Backtesting framework improvements
MIT License. See LICENSE.
Built with discipline, structure, and AI.
The best time to build your fortress was yesterday. The second best time is now.