Dexter — Autonomous Financial Research Agent
Dexter is an open-source autonomous agent focused on deep financial research. It was designed to take complex finance questions (for example, multi-company comparisons, time-series financial ratio analysis, or cash-flow investigations), break them into discrete research tasks, run those tasks using live financial datasets and web tools, validate results, and iteratively refine answers until it reaches a confident, data-backed conclusion.
Key capabilities
- Intelligent task planning: automatically decomposes high-level questions into ordered research steps.
- Autonomous execution: selects and runs appropriate tools (data APIs, web search, calculators) to gather and process financial information.
- Self-validation: includes a validation agent that checks results and triggers re-checks or extra steps when necessary.
- Real-time financial data: integrates with financial datasets APIs to fetch income statements, balance sheets, cash flows and other time-series data.
- Safety features: loop detection, step limits and other constraints to avoid runaway or repetitive execution.
Architecture
Dexter uses a multi-agent architecture with distinct components:
- Planning Agent — analyzes user queries and creates a structured task list.
- Action Agent — chooses tools and executes the research steps (API calls, web queries, data transforms).
- Validation Agent — inspects intermediate outputs and decides whether results are sufficient or need rework.
- Answer Agent — synthesizes validated findings into a coherent final response.
The project integrates LLM providers via a LangChain.js-style interface and supports multiple model backends so users can switch models during runtime.
Tech stack and integrations
- Runtime: Bun (v1+)
- Language: TypeScript
- UI: React + Ink (terminal UI)
- LLM integration: multi-provider support (OpenAI, Anthropic, Google, etc.) through LangChain.js-like adapters
- Schema validation: Zod
- Optional local model support: Ollama
- External data: Financial Datasets API (for company financials) and optional web search providers (e.g., Tavily)
Installation & usage (summary)
- Clone the repo and install dependencies with Bun.
- Configure environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, FINANCIAL_DATASETS_API_KEY, etc.).
- Run interactively with
bun startor usebun devfor development. - Use the CLI to switch models (e.g.,
/modelto switch between GPT-4.1, Claude Sonnet 4.5, Gemini 3).
Example queries include:
- "What was Apple's revenue growth over the last 4 quarters?"
- "Compare Microsoft and Google's operating margins for 2023"
- "Analyze Tesla's cash flow trends over the past year"
Dexter will plan tasks, fetch necessary data, perform calculations, and return a comprehensive analysis.
Safety & limitations
Dexter implements loop detection and step limits to mitigate uncontrolled autonomous runs, but users should still supervise analyses that execute external actions or heavy API usage. Results depend on the quality and timeliness of the connected financial data provider and the chosen LLM model.
Community & contribution
The repository is open-source under the MIT License. Typical contribution flow: fork, create a feature branch, make focused pull requests for easier review.
Notes
- Repository created on 2025-10-14 and has gained community attention (stars on GitHub).
- Requires API keys for LLM providers and financial datasets to operate fully.
