Dexter: An Autonomous Financial Research Agent

Indie Hacker Newsgo watch the original →

Dexter is an open-source TypeScript agent that automates junior analyst tasks like SEC 13F lookups and financial data synthesis through a self-validating loop.

The Breakthrough

Virat Singh developed Dexter, an autonomous financial research agent that functions as a self-correcting analyst desk by planning, executing, and validating multi-step research queries end-to-end.

What Actually Worked

  • Self-Validating Loop: The agent uses a validator model to grade its own tool outputs against the current sub-step, automatically re-running the loop if the result fails to satisfy the requirement.
  • Task Planning: Before executing any tool calls, the agent decomposes complex queries into a multi-step research plan, which is then processed by an async generator in source/agent/agent.ts.
  • Tool Registry: The agent dynamically selects from a registry of approximately a dozen financial tools, including newly added SEC 13F filing lookups, to fetch data based on the specific step in its plan.
  • Auditability: Every interaction is logged to a JSONL scratchpad, recording the original query, tool invocations, arguments, raw results, and model summaries for full transparency.
  • Safety and Persistence: The system includes a loop-detection layer to prevent redundant tool calls, a 10-iteration hard limit per query, and a memory module in source/memory/index.ts that persists context across multiple sessions.

Context

Dexter represents the third iteration in a lineage of open-source financial AI projects by Virat Singh, following his viral AI hedge fund repository. While the tool significantly accelerates the research process by handling data retrieval and synthesis, it is currently limited to US equities and occasionally struggles with multi-year growth calculations or hallucinated figures. Users are advised to treat the output as a research draft rather than an automated trading signal.

Notable Quotes

"Treat it as a junior who hands you research drafts, not somebody who hands you positions to take."

Content References

{"type": "tool", "title": "AI Hedge Fund", "author": "Virat Singh", "url": "https://github.com/virattt/ai-hedge-fund", "context": "mentioned"}, {"type": "tool", "title": "Dexter", "author": "Virat Singh", "url": "https://github.com/virattt/dexter", "context": "reviewed"}, {"type": "tool", "title": "Claude Code", "author": "Anthropic", "context": "mentioned"}, {"type": "tool", "title": "Exa", "url": "https://exa.ai/", "context": "mentioned"}, {"type": "tool", "title": "Bun", "url": "https://bun.sh/", "context": "mentioned"}, {"type": "tool", "title": "Ink", "context": "mentioned"}

  • #ai-agents
  • #fintech
  • #open-source

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.