AI & machine learning

dexter - Autonomous Agent for Deep Financial Research

Dexter is an agent for financial research, described in its README as "an autonomous financial research agent that thinks, plans, and learns as it works." The comparison it draws is to Claude Code, "but built...

dexter - Autonomous Agent for Deep Financial Research

Dexter is an agent for financial research, described in its README as “an autonomous financial research agent that thinks, plans, and learns as it works.” The comparison it draws is to Claude Code, “but built specifically for financial research”: you ask a question, it decomposes the work into steps, runs them against live market data, and checks its own results. It is MIT licensed and runs on Bun.

Start with the disclaimer, because it defines the tool

Before anything else, the README is unambiguous about what this is not:

“This project is for educational, entertainment, and informational purposes only.”

“It is not intended for real trading or investment.”

It adds that “Outputs may be incorrect, incomplete, or out of date,” advises consulting a licensed financial advisor before investment decisions, notes that “Past performance does not indicate future results,” and states that the creator and contributors assume no liability for losses.

That framing is not boilerplate to skim — it is the correct lens for the whole project. Read as a research scaffold, Dexter is interesting. Read as something to put money behind, it tells you itself not to.

How it is built

The documented architecture is a planning loop with guardrails:

  • Task planning decomposes a query into structured steps.
  • Autonomous execution picks and runs the tools needed to gather data.
  • Self-validation checks the work and iterates.
  • Safety comes from loop detection and step limits — the unglamorous part that stops an autonomous agent burning tokens in a circle.
  • Debug logging writes a JSONL file per query to .dexter/scratchpad/, with init, tool_result and thinking entries.

That last item deserves a note. A per-query trace of what the agent thought and which tool results it saw is the difference between a plausible answer and an auditable one. If you are evaluating an agent’s financial reasoning, the scratchpad is where the actual work is.

Interfaces are an interactive CLI and a WhatsApp gateway.

Data and models

Financial data comes from the Financial Datasets API — income statements, balance sheets, cash flow statements. Web search uses Exa by preference with Tavily as a fallback, and Exa is optional.

On models, the env template lists OpenAI, Anthropic, Google, xAI, OpenRouter and local Ollama via OLLAMA_BASE_URL, though OpenAI is the only key the prerequisites mark as required. Evaluations are tracked in LangSmith with an LLM-as-judge for scoring — a sign the project takes its own output quality as a measurable thing rather than an assumption.

Running it

Prerequisite is Bun 1.0 or higher:

git clone https://github.com/virattt/dexter.git
cd dexter
bun install
cp env.example .env

Add your keys, then:

bun start      # interactive
bun dev        # watch mode

Evals and the gateway have their own entry points:

bun run src/evals/run.ts --sample 10
bun run gateway:login && bun run gateway

Budget for at least an OpenAI key and a Financial Datasets key; search is optional but the agent is considerably less useful without it.

Where it fits

The honest use case is learning and tooling, not alpha. Two groups get real value: people who want to see how a planning-and-validation agent is actually assembled in TypeScript, and people doing research work where a structured, logged pass over fundamentals and news saves manual gathering — with a human reading the output.

What it is not is a system you point at your brokerage. The project says so first, which is more than many finance-adjacent repositories manage, and the per-query scratchpad means you can at least check its reasoning rather than trusting a conclusion.

If you try it, read a scratchpad file end to end on a company you already understand well. That is the fastest way to calibrate how much of the output is research and how much is confident paraphrase.

Open on github.com

Share

XLinkedIn