🔴 Intermediate 📈 Type: AI Financial Research Agent / CLI Tool 💸 Free & Open Source (MIT License) ⭐ 26.9k GitHub Stars
What is Dexter?
Dexter is a free, open-source AI agent that does deep financial research for you — automatically. You type a financial question in plain English, and Dexter takes over: it figures out what data it needs, pulls live market information, checks its own work, and gives you a clear, data-backed answer.
Think of it like having a smart financial analyst who works in your terminal. You ask something like “What is Apple’s revenue growth over the last 3 years?” or “Compare the profit margins of Microsoft and Google” — and Dexter breaks that question into steps, runs the research, and delivers a structured answer, all by itself.
It’s built with TypeScript and runs as a command-line tool (CLI) — meaning you type commands into a terminal window on your computer. It connects to live financial data sources to pull real income statements, balance sheets, cash flow statements, stock prices, SEC filings, insider trades, and more. It can even browse the web for relevant news and reports.
The creator, virattt, describes it as “Claude Code, but built specifically for financial research” — which gives you a sense of how powerful and autonomous it is.
Who is it for?
- Retail investors and stock traders who want to research companies quickly without manually digging through financial reports
- Finance students and self-learners who want to analyse real financial data to understand accounting and valuation concepts
- Developers building fintech tools who want a powerful open-source agent to extend or build on top of
- Analysts and researchers who want to automate repetitive financial data gathering and comparison tasks
- Entrepreneurs and startup founders doing competitive research on public companies in their market
- AI enthusiasts interested in seeing how an autonomous agent reasons through multi-step problems in a real domain
- Anyone who has ever wished they had a financial analyst they could ask questions and get a proper researched answer from — for free
What makes it special?
- Thinks like a real analyst — doesn’t just fetch a number; it decomposes your question into a proper research plan, executes each step, then synthesises everything into a clear answer
- Self-checking — after completing a task, Dexter reviews its own work and re-runs steps if something looks wrong, so you get more reliable results
- Live financial data — pulls real-time market data including stock prices, income statements, balance sheets, cash flow statements, SEC filings, and insider trade records
- Web search built in — not just databases; Dexter can also browse the web for recent news, earnings call transcripts, and analyst reports to add context
- Multi-provider AI support — works with Claude (Anthropic), OpenAI GPT models, and other LLM providers, so you can choose which AI brain it runs on
- Skills system — comes with pre-built research workflows (called “skills”) like DCF valuation that you can run out of the box, and you can add your own
- WhatsApp integration — unusually, you can also connect Dexter to WhatsApp and ask it financial questions directly from your phone
- Safety built in — has loop detection and step limits so it can’t go rogue and run forever burning through your API credits
- 26,900+ GitHub stars — one of the most popular open-source financial AI projects on GitHub, with an active community and Discord server
- MIT license — fully open, commercially usable, no restrictions
Requirements before you start
- Node.js 18 or higher — the programming environment Dexter runs on. Download here. Check your version by running
node --versionin your terminal - Git — to download the project. Download here
- A terminal / command prompt — Mac: use Terminal. Windows: use PowerShell or Command Prompt. Dexter is a CLI tool, so all interaction happens here
- At least one AI API key — Dexter needs an AI model to think with. You need one of these:
- Anthropic (Claude) — get a key at console.anthropic.com
- OpenAI (GPT) — get a key at platform.openai.com
- A financial data API key — for live market data. Dexter supports:
- Financial Modeling Prep (FMP) — free tier available at financialmodelingprep.com
- A web search API key (optional but recommended) — for searching the web during research:
- Exa (preferred) — free tier at exa.ai
- Tavily (fallback) — free tier at tavily.com
- 500 MB free disk space — for the project and dependencies
💡 Cost tip: All the API keys above have free tiers that are more than enough to get started. You only pay if you use large volumes of requests. For casual research use, you can run Dexter at very low or zero cost.
Step-by-step installation
Step 1 — Check your Node.js version
Open your terminal and run:
node --version
You should see v18.x.x or higher. If not, download and install Node.js 18+ from nodejs.org before continuing.
Step 2 — Clone the Dexter repository
This downloads all the project files to your computer:
git clone https://github.com/virattt/dexter.git
cd dexter
Step 3 — Install dependencies
npm install
This downloads all the packages Dexter needs to run. It may take 1–2 minutes. You’ll see packages scrolling by — that’s normal.
Step 4 — Create your environment file
Dexter needs to know your API keys. It reads them from a file called .env. Create it by running:
cp .env.example .env
This copies the example file as a starting point. Now open the .env file in any text editor (Notepad, VS Code, TextEdit) and fill in your keys.
Step 5 — Add your API keys to the .env file
Your .env file will look something like this. Fill in the values you have:
# AI Model (choose at least one)
ANTHROPIC_API_KEY=your_anthropic_key_here
OPENAI_API_KEY=your_openai_key_here
# Financial data (required)
FMP_API_KEY=your_fmp_key_here
# Web search (recommended - at least one)
EXA_API_KEY=your_exa_key_here
TAVILY_API_KEY=your_tavily_key_here
Replace each your_..._key_here with your actual key. Save the file when done.
🔒 Important: Never share your
.envfile with anyone or post it online. Your API keys are like passwords — keep them private.
Step 6 — Build the project
Compile the TypeScript code into runnable JavaScript:
npm run build
Wait for this to finish. You’ll see build output — any errors here usually mean a missing dependency or old Node.js version.
Step 7 — Start Dexter
npm start
Dexter launches in your terminal. You’ll see a welcome screen and a text input box. This is where you type your financial research questions.
Step 8 — Ask your first question
Type a financial research question and press Enter. Some good ones to start with:
What is Apple's revenue and profit margin for the last 3 years?
Compare the free cash flow of Microsoft vs Google for 2024
What are the latest insider trades for Tesla?
Run a DCF valuation for Nvidia
Dexter will show you its reasoning steps as it works — you can watch it plan the research, fetch data, check its work, and build the final answer in real time.
Step 9 — (Optional) Select your AI model
When Dexter starts, it will ask you to select which AI model to use. Use the arrow keys to choose between Claude, GPT-4, or other available models based on which API keys you provided. Claude (Anthropic) and GPT-4o (OpenAI) both work very well for financial analysis.
Step 10 — (Optional) Set up WhatsApp integration
If you want to ask Dexter questions from your phone via WhatsApp, follow the WhatsApp setup instructions in the official README:
https://github.com/virattt/dexter#-how-to-use-with-whatsapp
This requires a few extra steps to connect Dexter to a WhatsApp messaging service.
Common errors and fixes
| Error | What it means | How to fix it |
|---|---|---|
node: command not found | Node.js is not installed or not in your PATH | Download and install Node.js 18+ from nodejs.org, then restart your terminal |
Error: Missing API key or blank response | A required API key is missing or not set correctly in your .env file | Open your .env file and make sure the key is on one line with no spaces, e.g. ANTHROPIC_API_KEY=sk-ant-.... Do not wrap the value in quotes |
npm install fails with permission errors | Permissions issue with npm on your system | On Mac/Linux, try running sudo npm install. On Windows, run PowerShell as Administrator |
npm run build fails with TypeScript errors | Node.js version is too old, or dependencies didn’t install correctly | Run node --version and make sure it shows v18 or higher. If not, upgrade Node.js. Then delete the node_modules folder and re-run npm install |
| Dexter starts but gives no financial data back | Your FMP (Financial Modeling Prep) API key is missing or invalid | Check that FMP_API_KEY is set correctly in your .env file. Log into financialmodelingprep.com and copy your key again |
| Dexter loops or gets stuck on a task | The question is too vague or a data source is unavailable | Press Ctrl + C to stop it. Try rephrasing your question to be more specific — for example, add a specific company name, year, and metric |
| Web search steps fail or return nothing | No web search API key is configured | Add an EXA_API_KEY or TAVILY_API_KEY to your .env file. Both have free tiers |
.env.example file not found | The clone may have been incomplete | Delete the folder and re-clone: git clone https://github.com/virattt/dexter.git |
Free vs Paid comparison
Dexter itself is 100% free and open source. Your costs depend only on which API services you connect it to. Here’s a clear breakdown:
| Service | Free Tier Available? | Free Tier Limits | Paid Plans Start At |
|---|---|---|---|
| Dexter itself | ✅ Always free | No limits | $0 — MIT License |
| Anthropic (Claude) | ✅ Free credits on sign-up | Small welcome credit | Pay-per-use (~$0.003/1k tokens) |
| OpenAI (GPT) | ✅ Free credits on sign-up | Small welcome credit | Pay-per-use (~$0.002/1k tokens) |
| Financial Modeling Prep (FMP) | ✅ Yes | 250 API requests/day | ~$14/month |
| Exa (web search) | ✅ Yes | 1,000 searches/month | Pay-per-use after limit |
| Tavily (web search fallback) | ✅ Yes | 1,000 searches/month | Pay-per-use after limit |
Bottom line: For light personal use — running a few research sessions per week — you can realistically run Dexter for free or near-free using trial credits and free tiers. Heavy daily use with long research sessions will start to accumulate small AI API costs. You’re always in control of what you spend.
Alternatives — 3 similar tools
1. FinRobot (by AI4Finance Foundation)
An open-source AI agent framework specifically designed for financial analysis, built in Python. Supports multiple LLM providers and comes with pre-built financial tools and research workflows. More focused on quantitative modelling and portfolio analysis. Good choice if you prefer Python over a CLI tool.
🔗 github.com/AI4Finance-Foundation/FinRobot
2. OpenBB Terminal
A massive open-source investment research platform — essentially an entire Bloomberg Terminal replacement, free and open source. Has a full web interface, hundreds of data sources, charting, and now AI integration. Much more feature-rich than Dexter but also more complex to set up. Best for users who want a full professional-grade research suite.
🔗 github.com/OpenBB-finance/OpenBB
3. Stock Analysis AI (by virattt — same creator)
An earlier, simpler project by the same developer as Dexter. It’s a Python-based financial analysis agent that uses LangChain. Less autonomous than Dexter but easier to set up and understand for beginners who are just getting started with AI-powered stock research.
🔗 github.com/virattt/financial-agent
🚀 Want more free AI tools like this?
We find, test, and write plain-English setup guides for the best free and open-source AI tools — so you don’t have to dig through GitHub yourself.Browse Free AI Tools at globalaiforce.com/shop →
📸 Follow us for daily AI tool tips and tutorials: instagram.com/globalaiforce