{"id":32086132,"url":"https://github.com/virattt/dexter","last_synced_at":"2026-02-06T04:06:19.321Z","repository":{"id":318779789,"uuid":"1076426995","full_name":"virattt/dexter","owner":"virattt","description":"An autonomous agent for deep financial research","archived":false,"fork":false,"pushed_at":"2026-02-06T02:36:09.000Z","size":549,"stargazers_count":10623,"open_issues_count":33,"forks_count":1285,"subscribers_count":81,"default_branch":"main","last_synced_at":"2026-02-06T03:28:15.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/virattt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-14T21:02:00.000Z","updated_at":"2026-02-06T03:22:07.000Z","dependencies_parsed_at":"2025-12-06T22:02:55.408Z","dependency_job_id":null,"html_url":"https://github.com/virattt/dexter","commit_stats":null,"previous_names":["virattt/dexter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/virattt/dexter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virattt%2Fdexter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virattt%2Fdexter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virattt%2Fdexter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virattt%2Fdexter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virattt","download_url":"https://codeload.github.com/virattt/dexter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virattt%2Fdexter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29149706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-19T14:00:59.610Z","updated_at":"2026-02-06T04:06:19.315Z","avatar_url":"https://github.com/virattt.png","language":"TypeScript","readme":"# Dexter 🤖\n\nDexter is an autonomous financial research agent that thinks, plans, and learns as it works. It performs analysis using task planning, self-reflection, and real-time market data. Think Claude Code, but built specifically for financial research.\n\n\u003cimg width=\"1098\" height=\"659\" alt=\"Screenshot 2026-01-21 at 5 25 10 PM\" src=\"https://github.com/user-attachments/assets/3bcc3a7f-b68a-4f5e-8735-9d22196ff76e\" /\u003e\n\n## Table of Contents\n\n- [👋 Overview](#-overview)\n- [✅ Prerequisites](#-prerequisites)\n- [💻 How to Install](#-how-to-install)\n- [🚀 How to Run](#-how-to-run)\n- [📊 How to Evaluate](#-how-to-evaluate)\n- [🐛 How to Debug](#-how-to-debug)\n- [🤝 How to Contribute](#-how-to-contribute)\n- [📄 License](#-license)\n\n\n## 👋 Overview\n\nDexter takes complex financial questions and turns them into clear, step-by-step research plans. It runs those tasks using live market data, checks its own work, and refines the results until it has a confident, data-backed answer.  \n\n**Key Capabilities:**\n- **Intelligent Task Planning**: Automatically decomposes complex queries into structured research steps\n- **Autonomous Execution**: Selects and executes the right tools to gather financial data\n- **Self-Validation**: Checks its own work and iterates until tasks are complete\n- **Real-Time Financial Data**: Access to income statements, balance sheets, and cash flow statements\n- **Safety Features**: Built-in loop detection and step limits to prevent runaway execution\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/virattt?style=social)](https://twitter.com/virattt)\n\n\u003cimg width=\"875\" height=\"558\" alt=\"Screenshot 2026-01-21 at 5 22 19 PM\" src=\"https://github.com/user-attachments/assets/72d28363-69ea-4c74-a297-dfa60aa347f7\" /\u003e\n\n\n## ✅ Prerequisites\n\n- [Bun](https://bun.com) runtime (v1.0 or higher)\n- OpenAI API key (get [here](https://platform.openai.com/api-keys))\n- Financial Datasets API key (get [here](https://financialdatasets.ai))\n- Exa API key (get [here](https://exa.ai)) - optional, for web search\n\n#### Installing Bun\n\nIf you don't have Bun installed, you can install it using curl:\n\n**macOS/Linux:**\n```bash\ncurl -fsSL https://bun.com/install | bash\n```\n\n**Windows:**\n```bash\npowershell -c \"irm bun.sh/install.ps1|iex\"\n```\n\nAfter installation, restart your terminal and verify Bun is installed:\n```bash\nbun --version\n```\n\n## 💻 How to Install\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/virattt/dexter.git\ncd dexter\n```\n\n2. Install dependencies with Bun:\n```bash\nbun install\n```\n\n3. Set up your environment variables:\n```bash\n# Copy the example environment file\ncp env.example .env\n\n# Edit .env and add your API keys (if using cloud providers)\n# OPENAI_API_KEY=your-openai-api-key\n# ANTHROPIC_API_KEY=your-anthropic-api-key (optional)\n# GOOGLE_API_KEY=your-google-api-key (optional)\n# XAI_API_KEY=your-xai-api-key (optional)\n# OPENROUTER_API_KEY=your-openrouter-api-key (optional)\n\n# (Optional) If using Ollama locally\n# OLLAMA_BASE_URL=http://127.0.0.1:11434\n\n# Other required keys\n# FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key\n\n# Web Search (Exa preferred, Tavily fallback)\n# EXASEARCH_API_KEY=your-exa-api-key\n# TAVILY_API_KEY=your-tavily-api-key\n```\n\n## 🚀 How to Run\n\nRun Dexter in interactive mode:\n```bash\nbun start\n```\n\nOr with watch mode for development:\n```bash\nbun dev\n```\n\n## 📊 How to Evaluate\n\nDexter includes an evaluation suite that tests the agent against a dataset of financial questions. Evals use LangSmith for tracking and an LLM-as-judge approach for scoring correctness.\n\n**Run on all questions:**\n```bash\nbun run src/evals/run.ts\n```\n\n**Run on a random sample of data:**\n```bash\nbun run src/evals/run.ts --sample 10\n```\n\nThe eval runner displays a real-time UI showing progress, current question, and running accuracy statistics. Results are logged to LangSmith for analysis.\n\n## 🐛 How to Debug\n\nDexter logs all tool calls to a scratchpad file for debugging and history tracking. Each query creates a new JSONL file in `.dexter/scratchpad/`.\n\n**Scratchpad location:**\n```\n.dexter/scratchpad/\n├── 2026-01-30-111400_9a8f10723f79.jsonl\n├── 2026-01-30-143022_a1b2c3d4e5f6.jsonl\n└── ...\n```\n\nEach file contains newline-delimited JSON entries tracking:\n- **init**: The original query\n- **tool_result**: Each tool call with arguments, raw result, and LLM summary\n- **thinking**: Agent reasoning steps\n\n**Example scratchpad entry:**\n```json\n{\"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\"}\n```\n\nThis makes it easy to inspect exactly what data the agent gathered and how it interpreted results.\n\n## 🤝 How to Contribute\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n**Important**: Please keep your pull requests small and focused.  This will make it easier to review and merge.\n\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n","funding_links":[],"categories":["Trading Bots","TypeScript","Repos","Finance-Specific AI","Python","金融股票","\u003ca name=\"TypeScript\"\u003e\u003c/a\u003eTypeScript","AI \u0026 LLM Agents"],"sub_categories":["AI Trading Agents","Spatial, Satellite and Alternative Data","资源传输下载"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirattt%2Fdexter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirattt%2Fdexter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirattt%2Fdexter/lists"}