Model or dataset
virattt/dexter avatar
virattt/dexter

Dexter plans, calls tools, and writes every step to disk

An autonomous agent for deep financial research

27,838 stars3,435 forksTypeScriptLicense varies

At a glance

What is it?
Dexter is a TypeScript agent for financial research that decomposes a question into steps, calls market data tools, validates its own work, and logs everything to a JSONL scratchpad. It is not intended for real trading or investment, the thresholds of its agent loop's brakes are undocumented, and its WhatsApp mode drives your own chat session.
Who is it for?
Dexter fits a reader who wants to see an agent loop that leaves its own audit trail, and it fits a builder who wants plan, act and validate wired to income statements, balance sheets and cash flow statements.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 53 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • virattt/dexter27,838 ★ · +210
Star history
Repository2026-09-282026-11-15
virattt/dexter27.6k27.8k

210 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Task planning and self-validation drive the loop, and the only brakes are a step limit and loop detection

Dexter's cycle is plan, act, check. A complex financial question is decomposed into structured research steps, the agent selects and executes the tools it thinks it needs, then it checks its own work and iterates until the tasks are complete. Real-time market data is the input, and the named statements are income statements, balance sheets and cash flow statements. Two safety features sit between that loop and a runaway: built-in loop detection and step limits. Those two are the whole braking system, and neither is given a number. No threshold is stated for the step limit, no way to configure it appears anywhere, and nothing describes what happens when it is hit, whether the agent halts, truncates its answer or tries a different path. For anyone budgeting a run this matters, because every extra self-validation round is another set of tool calls against the Financial Datasets API and another set of tokens on whichever provider key you configured.

Every query writes a plain-text JSONL scratchpad holding arguments, raw results and reasoning

Every run leaves a file behind. Dexter logs all tool calls to a scratchpad file, and each query creates a new JSONL file in `.dexter/scratchpad/`. Each line is one entry: `init` holds the original query, `thinking` holds the agent's reasoning steps, and `tool_result` holds each tool call with its arguments, the raw result and an LLM summary. A single entry looks like this:

json
{"type":"tool_result","timestamp":"2026-01-30T11:14:05.123Z","toolName":"get_income_statements","args":{"ticker":"AAPL","period":"annual","limit":5},"result":{...},"llmSummary":"Retrieved 5 years of Apple annual income statements showing revenue growth from $274B to $394B"}

That is genuinely useful for debugging, because you can see exactly which data was gathered and how it was read back. It is also a record of everything, in plain text, one file per query. No retention policy, no redaction step and no switch to disable it appear anywhere in the setup, so reasoning traces and raw financial payloads accumulate indefinitely. On a shared or backed-up machine, treat that directory as sensitive rather than as a log you can rotate away.

bun install pulls Chromium through a postinstall script whether you use it or not

Installing dependencies is not only a dependency install. The manifest defines a `postinstall` script that runs `playwright install chromium`, so a plain install fetches a browser binary whether or not you need it. Playwright and `qrcode-terminal` are both runtime dependencies, alongside a wide tail: `@langchain/anthropic`, `@langchain/core`, `@langchain/exa`, `@langchain/google-genai`, `@langchain/ollama`, `@langchain/openai`, `@langchain/tavily`, `better-sqlite3`, `croner`, `axios`, `dotenv`, `exa-js`, `gray-matter`, `langsmith`, `linkedom`, `lru-cache`, `turndown` and `zod`. One entry deserves a second look. `@whiskeysockets/baileys` is pinned at `7.0.0-rc.9`, a release candidate with no caret or tilde, and it is the library behind the WhatsApp link. The other consequence is quieter: because the browser fetch runs from `postinstall`, an install on a host with restricted egress resolves every dependency and then fails at the last step.

bun.lock, package-lock.json and jest.config.js describe two different test setups at once

The tree carries two ecosystems. `bun.lock` and `package-lock.json` sit side by side at the top level, so npm and Bun resolutions can drift apart without either lockfile being regenerated. The scripts point at Bun for testing, with `test` running `bun test` and `test:watch` running `bun test --watch`, yet `jest.config.js` is present and `jest`, `ts-jest`, `babel-jest`, `babel-jest` peer `@babel/core` and `@babel/preset-env` all sit in dev dependencies. Both runners are wired up and the setup never says which one is authoritative. The consequence is practical: a red test tells you almost nothing until you know whether you reproduced it under Bun's runner or Jest's, and the two do not discover or interpret the same files. `typecheck` runs `tsc --noEmit` with `typescript` as a dev dependency, so type checking is the one check that does not depend on picking a runner.

package.json still says 1.0.6 while the newest tag is v1.1.0

Version numbers here move fast, and the manifest is not always the newest thing in the repository. `package.json` declares version `1.0.6`. The tags are v1.0.5 dated 2026-08-04, v1.0.6 dated 2026-09-22, and v1.1.0 dated 2026-09-23, and the last push is 2026-09-23 as well. So the newest tag is a minor bump ahead of the version string compiled into the manifest, published one day after the 1.0.6 tag and on the same day as the final push. The discrepancy is not explained in the setup docs. The manifest also names the package `dexter-ts`, exposes a binary named `dexter-ts` pointing at `./src/index.tsx`, and sets `type` to `module`, so the npm-facing identity already differs from the repository name. Before pinning anything, decide whether you are tracking a tag or the manifest, because a fresh source checkout gives you code whose version string still says 1.0.6.

The eval suite grades itself with an LLM judge and no documented pass mark

The evaluation suite is the closest thing to a correctness story in this project, and it is worth reading carefully. Dexter ships evals that test the agent against a dataset of financial questions, using LangSmith for tracking and an LLM-as-judge approach for scoring correctness. Two commands run them:

bash
bun run src/evals/run.ts
bun run src/evals/run.ts --sample 10

The runner displays a real-time UI showing progress, the current question and running accuracy statistics, and results are logged to LangSmith for analysis. What that arrangement does not give you is a fixed bar to clear. A judge model decides what counts as correct, no threshold is given at which a run counts as a regression, no judge configuration is exposed, and the sample flag is described only as a random sample of data. The accuracy figure in the UI is therefore produced by a model you also configured and a dataset you also control, which is fine for catching regressions and is not the same as a measurement of the agent on its own.

Four optional provider keys sit in env.example with no stated precedence

The environment file is where the cost hides. Setup copies the example file across:

bash
# Copy the example environment file
cp env.example .env

# Edit .env and add your API keys (if using cloud providers)
# OPENAI_API_KEY=your-openai-api-key
# ANTHROPIC_API_KEY=your-anthropic-api-key (optional)
# GOOGLE_API_KEY=your-google-api-key (optional)
# XAI_API_KEY=your-xai-api-key (optional)
# OPENROUTER_API_KEY=your-openrouter-api-key (optional)

# Institutional-grade market data for agents
# FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key

# (Optional) If using Ollama locally
# OLLAMA_BASE_URL=http://127.0.0.1:11434

Only the OpenAI key and the Financial Datasets key are stated prerequisites, with the Exa key marked optional for web search and the comment naming Exa as preferred with Tavily as fallback. Four other provider keys are listed as optional; the dependency list has LangChain integrations for Anthropic and Google, but none for XAI or OpenRouter. What the setup does not say is which provider wins when several keys are present. Filling in all of them to be safe is the natural move, and it leaves an open question about where your prompts and your financial queries are actually sent.

The WhatsApp gateway answers your own chat through a release candidate library

The WhatsApp path is the least conventional part of the system. You link your phone by scanning a QR code, start the gateway, open WhatsApp, go to your own chat, message yourself, and the agent processes what you wrote and replies to the same conversation.

bash
# Link your WhatsApp account (scan QR code)
bun run gateway:login

# Start the gateway
bun run gateway

The two scripts map to `tsx src/gateway/index.ts login` and `tsx src/gateway/index.ts run`, so the gateway runs under tsx while the main entry runs under Bun, giving one process tree two TypeScript execution paths. Two consequences follow. The documented input is a message you send to yourself, and that message reaches an agent with paid API keys behind it on your real linked account rather than on a sandbox. That account is driven through `@whiskeysockets/baileys` at `7.0.0-rc.9`, a pinned release candidate, so the link sits on the least settled dependency in the tree. Longer setup notes live under `src/gateway/channels/whatsapp/`.

Editorial conclusion

Dexter fits a reader who wants to see an agent loop that leaves its own audit trail, and it fits a builder who wants plan, act and validate wired to income statements, balance sheets and cash flow statements. It does not fit anyone who needs an answer to act on financially: the project states it is not intended for real trading or investment, its step limits and loop detection thresholds are never given as numbers, and its reasoning traces are written unredacted to local disk. Before the first run, work out which two keys you must supply, decide which optional provider key you are willing to send prompts to, and read the disclaimer rather than skimming it.

Frequently asked questions

How do I install Dexter?

Clone the repository with `git clone https://github.com/virattt/dexter.git`, change into the `dexter` directory, run `bun install`, then copy `env.example` to `.env` and add your keys. You need the Bun runtime v1.0 or higher, an OpenAI API key and a Financial Datasets API key; an Exa key is optional and only used for web search.

How do I run Dexter once it is installed?

Run `bun start` for interactive mode, which the manifest maps to `bun run src/index.tsx`. For development there is `bun dev`, mapped to `bun --watch run src/index.tsx`. A type check is available as `bun run typecheck`, which runs `tsc --noEmit`.

Which API keys does Dexter need?

The stated prerequisites are the Bun runtime at v1.0 or higher, an OpenAI API key, and a Financial Datasets API key. An Exa API key is optional and needed for web search. The example environment file also carries optional entries for Anthropic, Google, XAI and OpenRouter, plus an Ollama base URL for local use.

How can I see what Dexter looked up during a run?

Every query writes a new JSONL file into `.dexter/scratchpad/`. Each line is an entry of type `init`, `tool_result` or `thinking`, and a `tool_result` entry carries the tool name, its arguments, the raw result and an LLM summary, so you can inspect exactly which data was gathered and how it was interpreted.

Official sources

  1. Issues
  2. README
  3. Releases
  4. virattt/dexter on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/virattt-dexter.svg)](https://hysenlabs.com/projects/virattt-dexter)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/virattt-dexter.svg)](https://hysenlabs.com/projects/virattt-dexter)

Was this useful?