The Problem
Financial analysts need to turn open‑ended research questions into reproducible, data‑driven answers. Manual workflows involve stitching together market data APIs, document parsing, and iterative reasoning, which is time‑consuming and error‑prone.
What This Does
Dexter is a self‑directed agent that receives a natural‑language query, decomposes it into discrete research steps, selects the appropriate tool (e.g., src/tools/finance/, src/tools/search/), and iterates until a confident answer is produced. Core orchestration lives in src/agent/agent.ts and src/agent/index.ts, while UI components under src/components/ display the scratchpad, tool calls, and final output. The evaluation harness in src/evals/run.ts runs the agent against a CSV of finance questions (src/evals/dataset/financeagent.csv) and reports accuracy via LangSmith.
How To Use It
Setup – the repo targets the Bun runtime (see README.md and bun.lock):
Clone and install
git clone https://github.com/virattt/dexter.git cd dexter bun install # installs dependencies from package.json via Bun cp env.example .env # copy template and add keys
Edit .env to provide the keys referenced in src/utils/env.ts (e.g., OPENAIAPIKEY, FINANCIALDATASETSAPIKEY, EXASEARCHAPIKEY). No additional build step is required; TypeScript is compiled on‑the‑fly by Bun.
Run – the interactive front‑end is started from the root entry point src/index.tsx:
bun start # launches the React UI (served locally) or for live reload during development bun dev
Evaluate – the built‑in evaluation suite can be invoked directly:
bun run src/evals/run.ts # full dataset bun run src/evals/run.ts --sample 10 # random subset
Progress is shown in a React UI (src/evals/components/) and results are pushed to LangSmith (configured via src/utils/config.ts).
Real‑World Use
A hedge‑fund research team could embed Dexter in their internal portal. An analyst submits “What is the projected free cash flow for Company X over the next 5 years?” The agent uses src/tools/finance/fundamentals.ts to fetch statements, src/tools/finance/financial-metrics.ts for ratios, and the DCF skill (src/skills/dcf/*) to compute a valuation, returning a reproducible markdown report that can be archived alongside the trade ticket.
import { runAgent } from "./src/agent"; await runAgent("DCF valuation for TSLA", { model: "gpt-4o" });
Code Health & Issues
Medium – Missing LICENSE – No LICENSE file; redistribution rights are unclear (root). Low – No npm lockfile – Only bun.lock exists; npm‑based CI would be non‑reproducible (package.json). Low – Sparse test coverage – One test (src/utils/cache.test.ts) for a utility module; core agent logic lacks automated tests. Low – Potential runtime errors – src/utils/env.ts reads env vars without fallback, which could cause uncaught exceptions if a required key is absent. Low – CI only runs lint/build – .github/workflows/ci.yml does not enforce test execution or security scanning. Low – Documentation gaps – AGENTS.md and README.md describe usage but omit versioning guidance and detailed error‑handling instructions.
Overall the codebase follows a clear modular pattern (agent → tools → skills) and TypeScript typing is applied across most files, which aids maintainability.
The Bottom Line
Dexter delivers a functional autonomous research loop for finance, with a usable UI and an evaluation harness ready out‑of‑the‑box. It is best suited for teams comfortable with Bun and willing to supply their own API keys. The main drawbacks are limited test coverage, missing licensing, and minimal CI security checks; addressing these would make the project production‑ready for regulated environments.