Model or dataset
virattt/dexter avatar
virattt/dexter

Dexter: an autonomous TypeScript agent for deep financial research

An autonomous agent for deep financial research

27,628 stars3,411 forksTypeScriptLicense varies

At a glance

What is it?
Dexter turns a financial question into a research plan, runs it against live market data, and writes every tool call to a scratchpad. It is a Bun and TypeScript project with an MIT licence, and the README is explicit that it is not built for real trading.
Who is it for?
Dexter suits engineers who want to read an agent's planning loop and its tool-call trail, and who already have an OpenAI key and a Financial Datasets key. It does not suit anyone who needs investment advice, audited numbers, or a supported commercial product: the README carries a disclaimer against real trading, the licence is MIT, and the package version in package.json is 1.0.4 while the latest release tag is v1.0.5.
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 6 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 September 28, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The problem Dexter targets: a financial question that needs several data pulls

A question like how a company's margins moved over five years is not one lookup. It is an income statement pull, a period choice, a comparison, and a judgement about whether the numbers answer the question. Dexter is built for that shape of work. The README describes it as an autonomous agent that "thinks, plans, and learns as it works", and places it next to Claude Code as a comparison point, except that it is aimed at financial research.

The intended user is someone technical enough to hold API keys and run a Bun project, and curious enough to read the agent's intermediate steps. The README's own framing is educational and informational. It carries a disclaimer that the project is not intended for real trading or investment, that outputs may be incorrect, incomplete or out of date, and that past performance does not indicate future results. That is not boilerplate to skip past. It tells you the audience: people studying how a research agent behaves, not people sizing positions.

How the planning, tool calling and self-validation loop fits together

The README lists the capabilities in order: intelligent task planning decomposes a query into structured research steps, autonomous execution selects and executes tools to gather financial data, and self-validation checks the work and iterates until tasks are complete. Real-time financial data comes from income statements, balance sheets and cash flow statements. Safety features are loop detection and step limits, which exist because an agent that plans and re-plans can otherwise keep going.

The repository layout supports that reading. The entry point is src/index.tsx and the dependencies include @langchain/openai, @langchain/anthropic, @langchain/google-genai and @langchain/ollama, so the model backend is a choice rather than a fixed part of the design. Data tooling sits alongside it: exa-js and @langchain/exa for web search, @mozilla/readability, linkedom and turndown for turning fetched pages into text, better-sqlite3 for local storage, and playwright, which the postinstall script installs as Chromium.

The observability story is the part worth copying. Every query produces a new JSONL file under .dexter/scratchpad/, and each line is one of three entry types: init for the original query, tool_result for a tool call with its arguments, raw result and an LLM summary, and thinking for the agent's reasoning steps. The README's example entry shows a get_income_statements call for AAPL with an annual period and a limit of 5, followed by a summary sentence describing revenue growth. That means you can audit what the agent actually fetched, separately from what it said about the fetch.

Installing Dexter with Bun and running a first query

The README requires the Bun runtime at v1.0 or higher, an OpenAI API key, and a Financial Datasets API key. An Exa key is optional and only needed for web search. If Bun is not installed, the README gives a curl installer for macOS and Linux and a PowerShell command for Windows, then asks you to restart the terminal and confirm with bun --version.

With Bun in place, the install is three steps: clone, install dependencies, and create the environment file.

bash
git clone https://github.com/virattt/dexter.git
cd dexter
bun install

The postinstall script runs playwright install chromium, so expect a browser download during bun install even if you never touch the WhatsApp gateway.

Next, copy the example environment file and fill in the keys. The README shows the keys commented out, including optional providers and the local Ollama base URL.

bash
cp env.example .env

At minimum you need OPENAI_API_KEY and FINANCIAL_DATASETS_API_KEY. ANTHROPIC_API_KEY, GOOGLE_API_KEY, XAI_API_KEY, OPENROUTER_API_KEY, OLLAMA_BASE_URL, EXASEARCH_API_KEY and TAVILY_API_KEY are all listed as optional, with Exa preferred and Tavily as the web search fallback.

Then start the interactive session.

bash
bun start

The README also documents bun dev for watch mode. After a query, look in .dexter/scratchpad/ for a timestamped JSONL file, which is where you confirm what the agent actually did.

Evaluating and debugging runs before you trust a single answer

The README ships an evaluation suite rather than leaving accuracy as a matter of opinion. It tests the agent against a dataset of financial questions, uses LangSmith for tracking, and scores correctness with an LLM-as-judge approach. Running the full set and running a random sample are separate commands, and the runner prints a real-time UI with progress, the current question and running accuracy.

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

The sample flag is the one to reach for first, since a full pass costs model calls and time. Results are logged to LangSmith, so you need that side configured to get the analysis the README describes.

Debugging does not depend on LangSmith. The scratchpad files are plain newline-delimited JSON, one per query, and the README documents the three entry types. Reading a tool_result line tells you the tool name, its arguments, the raw result and the model's summary of it. That separation is useful: when an answer looks wrong, you can check whether the retrieval was wrong or the interpretation was.

Where Dexter breaks down, and when it is the wrong tool

The disclaimer is the first limitation and the README states it plainly: outputs may be incorrect, incomplete or out of date, and the project is not intended for real trading or investment. Anyone who needs numbers they can defend to a compliance function should not start here.

The second limitation is the key dependency. Financial data arrives through a Financial Datasets API key, so coverage is whatever that service returns, and the agent's answer is bounded by it. The README does not describe a fallback data provider for the financial statements themselves; Exa and Tavily are web search, not statement data.

The third is operational. Bun v1.0 or higher is required, and the scripts mix bun run with tsx, which the gateway scripts use. The postinstall hook pulls a Chromium build through Playwright. None of that is exotic, but it is a heavier footprint than a single binary, and it is more moving parts than a pure API client.

Finally, the README does not document rollback, migration or data retention behaviour for the scratchpad directory, and it does not say how long files are kept. If you point Dexter at sensitive queries, that gap matters more than any accuracy claim.

How Dexter differs from a general-purpose agent framework

The obvious alternative is a general agent framework such as LangChain's own agent abstractions, which Dexter already depends on (@langchain/core, @langchain/openai and the provider packages). The difference is scope. A general framework gives you the loop and leaves the tools, the evaluation dataset, the scoring method and the trace format to you.

Dexter arrives with those decisions made. Financial statement tools are the default capability rather than an integration you write. The evaluation suite, the LangSmith tracking and the LLM-as-judge scoring are in the repository. The scratchpad JSONL format is defined, with init, tool_result and thinking entry types. The safety features, loop detection and step limits, are part of the agent rather than something you bolt on.

That is a real trade. You get a working research agent faster, and you inherit its choices: its data provider, its trace schema, its scoring approach. If your requirement is a bespoke tool set or a different audit format, a general framework costs more upfront and constrains less later.

Maintenance, release cadence and the MIT licence

The repository is not archived, and the last push was on 2026-08-04. Releases are tagged regularly: v1.0.5 on 2026-08-04, v1.0.4 on 2026-07-17, and Dexter 1.0.2 on 2026-07-10. The version field inside package.json reads 1.0.4, which lags the latest tag, so do not treat that field as the release you are running.

The upgrade cost is mostly dependency churn. package.json pins a wide set of LangChain provider packages, Playwright, better-sqlite3 and the Baileys WhatsApp library at 7.0.0-rc.9, which is a release candidate. Major-version bumps in any of those can change behaviour. There is a typecheck script (tsc --noEmit) and a test script (bun test) you can run before and after an upgrade to catch breakage.

The README states the project is licensed under the MIT License. That is permissive and typical for a tool like this, but the licence file itself is not among the top-level entries listed in the repository layout, so confirm the terms in the repository before you rely on them. Nothing here is legal advice; if the licence matters to your organisation, read the actual file.

Editorial conclusion

Dexter suits engineers who want to read an agent's planning loop and its tool-call trail, and who already have an OpenAI key and a Financial Datasets key. It does not suit anyone who needs investment advice, audited numbers, or a supported commercial product: the README carries a disclaimer against real trading, the licence is MIT, and the package version in package.json is 1.0.4 while the latest release tag is v1.0.5. Before adopting it, run bun run src/evals/run.ts --sample 10 and read the resulting .dexter/scratchpad JSONL files to see whether the agent's reasoning matches your expectations.

Frequently asked questions

How do I install Dexter?

Install the Bun runtime at v1.0 or higher, clone the repository, run bun install, copy env.example to .env and add your keys, then start it with bun start. The README lists OPENAI_API_KEY and FINANCIAL_DATASETS_API_KEY as the required keys, with Exa and Tavily optional for web search.

What does Dexter need before it can run a query?

The README lists Bun v1.0 or higher, an OpenAI API key and a Financial Datasets API key as prerequisites, with an Exa API key optional for web search. The financial statement tools depend on the Financial Datasets key.

Where does Dexter store its debug logs?

Each query creates a new JSONL file in .dexter/scratchpad/, named with a timestamp. The entries are typed as init, tool_result or thinking, and a tool_result line carries the tool name, its arguments, the raw result and an LLM summary.

Can I use Dexter for real trading decisions?

No. The README states the project is for educational, entertainment and informational purposes only, is not intended for real trading or investment, and that outputs may be incorrect, incomplete or out of date.

Official sources

  1. Issues
  2. README
  3. Releases
  4. virattt/dexter on GitHub
For maintainers

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)
Community notes

Community notes