{"owner":"virattt","repo":"dexter","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# Repository Guidelines\n\n- Repo: https://github.com/virattt/dexter\n- Dexter is a CLI-based AI agent for deep financial research, built with TypeScript, Ink (React for CLI), and LangChain.\n\n## Project Structure\n\n- Source code: `src/`\n  - Agent core: `src/agent/` (agent loop, prompts, scratchpad, token counting, types)\n  - CLI interface: `src/cli.tsx` (Ink/React), entry point: `src/index.tsx`\n  - Components: `src/components/` (Ink UI components)\n  - Hooks: `src/hooks/` (React hooks for agent runner, model selection, input history)\n  - Model/LLM: `src/model/llm.ts` (multi-provider LLM abstraction)\n  - Tools: `src/tools/` (financial search, web search, browser, skill tool)\n  - Tool descriptions: `src/tools/descriptions/` (rich descriptions injected into system prompt)\n  - Finance tools: `src/tools/finance/` (prices, fundamentals, filings, insider trades, etc.)\n  - Search tools: `src/tools/search/` (Exa preferred, Tavily fallback)\n  - Browser: `src/tools/browser/` (Playwright-based web scraping)\n  - Skills: `src/skills/` (SKILL.md-based extensible workflows, e.g. DCF valuation)\n  - Utils: `src/utils/` (env, config, caching, token estimation, markdown tables)\n  - Evals: `src/evals/` (LangSmith evaluation runner with Ink UI)\n- Config: `.dexter/settings.json` (persisted model/provider selection)\n- Environment: `.env` (API keys; see `env.example`)\n- Scripts: `scripts/release.sh`\n\n## Build, Test, and Development Commands\n\n- Runtime: Bun (primary). Use `bun` for all commands.\n- Install deps: `bun install`\n- Run: `bun run start` or `bun run src/index.tsx`\n- Dev (watch mode): `bun run dev`\n- Type-check: `bun run typecheck`\n- Tests: `bun test`\n- Evals: `bun run src/evals/run.ts` (full) or `bun run src/evals/run.ts --sample 10` (sampled)\n- CI runs `bun run typecheck` and `bun test` on push/PR.\n\n## Coding Style & Conventions\n\n- Language: TypeScript (ESM, strict mode). JSX via React (Ink for CLI rendering).\n- Prefer strict typing; avoid `any`.\n- Keep files concise; extract helpers rather than duplicating code.\n- Add brief comments for tricky or non-obvious logic.\n- Do not add logging unless explicitly asked.\n- Do not create README or documentation files unless explicitly asked.\n\n## LLM Providers\n\n- Supported: OpenAI (default), Anthropic, Google, xAI (Grok), OpenRouter, Ollama (local).\n- Default model: `gpt-5.5`. Provider detection is prefix-based (`claude-` -> Anthropic, `gemini-` -> Google, etc.).\n- Fast models for lightweight tasks: see `FAST_MODELS` map in `src/model/llm.ts`.\n- Anthropic uses explicit `cache_control` on system prompt for prompt caching cost savings.\n- Users switch providers/models via `/model` command in the CLI.\n\n## Tools\n\n- `financial_search`: primary tool for all financial data queries (prices, metrics, filings). Delegates to multiple sub-tools internally.\n- `financial_metrics`: direct metric lookups (revenue, market cap, etc.).\n- `read_filings`: SEC filing reader for 10-K, 10-Q, 8-K documents.\n- `web_search`: general web search (Exa if `EXASEARCH_API_KEY` set, else Tavily if `TAVILY_API_KEY` set).\n- `browser`: Playwright-based web scraping for reading pages the agent discovers.\n- `skill`: invokes SKILL.md-defined workflows (e.g. DCF valuation). Each skill runs at most once per query.\n- Tool registry: `src/tools/registry.ts`. Tools are conditionally included based on env vars.\n\n## Skills\n\n- Skills live as `SKILL.md` files with YAML frontmatter (`name`, `description`) and markdown body (instructions).\n- Built-in skills: `src/skills/dcf/SKILL.md`.\n- Discovery: `src/skills/registry.ts` scans for SKILL.md files at startup.\n- Skills are exposed to the LLM as metadata in the system prompt; the LLM invokes them via the `skill` tool.\n\n## Agent Architecture\n\n- Agent loop: `src/agent/agent.ts`. Iterative tool-calling loop with configurable max iterations (default 10).\n- Scratchpad: `src/agent/scratchpad.ts`. Single source of truth for all tool results within a query.\n- Context management: Anthropic-style. Full tool results kept in context; oldest results cleared when token threshold exceeded.\n- Final answer: generated in a separate LLM call with full scratchpad context (no tools bound).\n- Events: agent yields typed events (`tool_start`, `tool_end`, `thinking`, `answer_start`, `done`, etc.) for real-time UI updates.\n\n## Environment Variables\n\n- LLM keys: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `XAI_API_KEY`, `OPENROUTER_API_KEY`\n- Ollama: `OLLAMA_BASE_URL` (default `http://127.0.0.1:11434`)\n- Finance: `FINANCIAL_DATASETS_API_KEY`\n- Search: `EXASEARCH_API_KEY` (preferred), `TAVILY_API_KEY` (fallback)\n- Tracing: `LANGSMITH_API_KEY`, `LANGSMITH_ENDPOINT`, `LANGSMITH_PROJECT`, `LANGSMITH_TRACING`\n- Never commit `.env` files or real API keys.\n\n## Version & Release\n\n- Version format: SemVer `MAJOR.MINOR.PATCH`. Tag prefix: `v`.\n- Release script: `bash scripts/release.sh [version]` (defaults to today's date).\n- Release flow: bump version in `package.json`, create git tag, push tag, create GitHub release via `gh`.\n- Do not push or publish without user confirmation.\n\n## Testing\n\n- Framework: Bun's built-in test runner (primary), Jest config exists for legacy compatibility.\n- Tests colocated as `*.test.ts`.\n- Run `bun test` before pushing when you touch logic.\n\n## Security\n\n- API keys stored in `.env` (gitignored). Users can also enter keys interactively via the CLI.\n- Config stored in `.dexter/settings.json` (gitignored).\n- Never commit or expose real API keys, tokens, or credentials.\n"},"files":{"AGENTS.md":"# Repository Guidelines\n\n- Repo: https://github.com/virattt/dexter\n- Dexter is a CLI-based AI agent for deep financial research, built with TypeScript, Ink (React for CLI), and LangChain.\n\n## Project Structure\n\n- Source code: `src/`\n  - Agent core: `src/agent/` (agent loop, prompts, scratchpad, token counting, types)\n  - CLI interface: `src/cli.tsx` (Ink/React), entry point: `src/index.tsx`\n  - Components: `src/components/` (Ink UI components)\n  - Hooks: `src/hooks/` (React hooks for agent runner, model selection, input history)\n  - Model/LLM: `src/model/llm.ts` (multi-provider LLM abstraction)\n  - Tools: `src/tools/` (financial search, web search, browser, skill tool)\n  - Tool descriptions: `src/tools/descriptions/` (rich descriptions injected into system prompt)\n  - Finance tools: `src/tools/finance/` (prices, fundamentals, filings, insider trades, etc.)\n  - Search tools: `src/tools/search/` (Exa preferred, Tavily fallback)\n  - Browser: `src/tools/browser/` (Playwright-based web scraping)\n  - Skills: `src/skills/` (SKILL.md-based extensible workflows, e.g. DCF valuation)\n  - Utils: `src/utils/` (env, config, caching, token estimation, markdown tables)\n  - Evals: `src/evals/` (LangSmith evaluation runner with Ink UI)\n- Config: `.dexter/settings.json` (persisted model/provider selection)\n- Environment: `.env` (API keys; see `env.example`)\n- Scripts: `scripts/release.sh`\n\n## Build, Test, and Development Commands\n\n- Runtime: Bun (primary). Use `bun` for all commands.\n- Install deps: `bun install`\n- Run: `bun run start` or `bun run src/index.tsx`\n- Dev (watch mode): `bun run dev`\n- Type-check: `bun run typecheck`\n- Tests: `bun test`\n- Evals: `bun run src/evals/run.ts` (full) or `bun run src/evals/run.ts --sample 10` (sampled)\n- CI runs `bun run typecheck` and `bun test` on push/PR.\n\n## Coding Style & Conventions\n\n- Language: TypeScript (ESM, strict mode). JSX via React (Ink for CLI rendering).\n- Prefer strict typing; avoid `any`.\n- Keep files concise; extract helpers rather than duplicating code.\n- Add brief comments for tricky or non-obvious logic.\n- Do not add logging unless explicitly asked.\n- Do not create README or documentation files unless explicitly asked.\n\n## LLM Providers\n\n- Supported: OpenAI (default), Anthropic, Google, xAI (Grok), OpenRouter, Ollama (local).\n- Default model: `gpt-5.5`. Provider detection is prefix-based (`claude-` -> Anthropic, `gemini-` -> Google, etc.).\n- Fast models for lightweight tasks: see `FAST_MODELS` map in `src/model/llm.ts`.\n- Anthropic uses explicit `cache_control` on system prompt for prompt caching cost savings.\n- Users switch providers/models via `/model` command in the CLI.\n\n## Tools\n\n- `financial_search`: primary tool for all financial data queries (prices, metrics, filings). Delegates to multiple sub-tools internally.\n- `financial_metrics`: direct metric lookups (revenue, market cap, etc.).\n- `read_filings`: SEC filing reader for 10-K, 10-Q, 8-K documents.\n- `web_search`: general web search (Exa if `EXASEARCH_API_KEY` set, else Tavily if `TAVILY_API_KEY` set).\n- `browser`: Playwright-based web scraping for reading pages the agent discovers.\n- `skill`: invokes SKILL.md-defined workflows (e.g. DCF valuation). Each skill runs at most once per query.\n- Tool registry: `src/tools/registry.ts`. Tools are conditionally included based on env vars.\n\n## Skills\n\n- Skills live as `SKILL.md` files with YAML frontmatter (`name`, `description`) and markdown body (instructions).\n- Built-in skills: `src/skills/dcf/SKILL.md`.\n- Discovery: `src/skills/registry.ts` scans for SKILL.md files at startup.\n- Skills are exposed to the LLM as metadata in the system prompt; the LLM invokes them via the `skill` tool.\n\n## Agent Architecture\n\n- Agent loop: `src/agent/agent.ts`. Iterative tool-calling loop with configurable max iterations (default 10).\n- Scratchpad: `src/agent/scratchpad.ts`. Single source of truth for all tool results within a query.\n- Context management: Anthropic-style. Full tool results kept in context; oldest results cleared when token threshold exceeded.\n- Final answer: generated in a separate LLM call with full scratchpad context (no tools bound).\n- Events: agent yields typed events (`tool_start`, `tool_end`, `thinking`, `answer_start`, `done`, etc.) for real-time UI updates.\n\n## Environment Variables\n\n- LLM keys: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `XAI_API_KEY`, `OPENROUTER_API_KEY`\n- Ollama: `OLLAMA_BASE_URL` (default `http://127.0.0.1:11434`)\n- Finance: `FINANCIAL_DATASETS_API_KEY`\n- Search: `EXASEARCH_API_KEY` (preferred), `TAVILY_API_KEY` (fallback)\n- Tracing: `LANGSMITH_API_KEY`, `LANGSMITH_ENDPOINT`, `LANGSMITH_PROJECT`, `LANGSMITH_TRACING`\n- Never commit `.env` files or real API keys.\n\n## Version & Release\n\n- Version format: SemVer `MAJOR.MINOR.PATCH`. Tag prefix: `v`.\n- Release script: `bash scripts/release.sh [version]` (defaults to today's date).\n- Release flow: bump version in `package.json`, create git tag, push tag, create GitHub release via `gh`.\n- Do not push or publish without user confirmation.\n\n## Testing\n\n- Framework: Bun's built-in test runner (primary), Jest config exists for legacy compatibility.\n- Tests colocated as `*.test.ts`.\n- Run `bun test` before pushing when you touch logic.\n\n## Security\n\n- API keys stored in `.env` (gitignored). Users can also enter keys interactively via the CLI.\n- Config stored in `.dexter/settings.json` (gitignored).\n- Never commit or expose real API keys, tokens, or credentials.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# Repository Guidelines\n\n- Repo: https://github.com/virattt/dexter\n- Dexter is a CLI-based AI agent for deep financial research, built with TypeScript, Ink (React for CLI), and LangChain.\n\n## Project Structure\n\n- Source code: `src/`\n  - Agent core: `src/agent/` (agent loop, prompts, scratchpad, token counting, types)\n  - CLI interface: `src/cli.tsx` (Ink/React), entry point: `src/index.tsx`\n  - Components: `src/components/` (Ink UI components)\n  - Hooks: `src/hooks/` (React hooks for agent runner, model selection, input history)\n  - Model/LLM: `src/model/llm.ts` (multi-provider LLM abstraction)\n  - Tools: `src/tools/` (financial search, web search, browser, skill tool)\n  - Tool descriptions: `src/tools/descriptions/` (rich descriptions injected into system prompt)\n  - Finance tools: `src/tools/finance/` (prices, fundamentals, filings, insider trades, etc.)\n  - Search tools: `src/tools/search/` (Exa preferred, Tavily fallback)\n  - Browser: `src/tools/browser/` (Playwright-based web scraping)\n  - Skills: `src/skills/` (SKILL.md-based extensible workflows, e.g. DCF valuation)\n  - Utils: `src/utils/` (env, config, caching, token estimation, markdown tables)\n  - Evals: `src/evals/` (LangSmith evaluation runner with Ink UI)\n- Config: `.dexter/settings.json` (persisted model/provider selection)\n- Environment: `.env` (API keys; see `env.example`)\n- Scripts: `scripts/release.sh`\n\n## Build, Test, and Development Commands\n\n- Runtime: Bun (primary). Use `bun` for all commands.\n- Install deps: `bun install`\n- Run: `bun run start` or `bun run src/index.tsx`\n- Dev (watch mode): `bun run dev`\n- Type-check: `bun run typecheck`\n- Tests: `bun test`\n- Evals: `bun run src/evals/run.ts` (full) or `bun run src/evals/run.ts --sample 10` (sampled)\n- CI runs `bun run typecheck` and `bun test` on push/PR.\n\n## Coding Style & Conventions\n\n- Language: TypeScript (ESM, strict mode). JSX via React (Ink for CLI rendering).\n- Prefer strict typing; avoid `any`.\n- Keep files concise; extract helpers rather than duplicating code.\n- Add brief comments for tricky or non-obvious logic.\n- Do not add logging unless explicitly asked.\n- Do not create README or documentation files unless explicitly asked.\n\n## LLM Providers\n\n- Supported: OpenAI (default), Anthropic, Google, xAI (Grok), OpenRouter, Ollama (local).\n- Default model: `gpt-5.5`. Provider detection is prefix-based (`claude-` -> Anthropic, `gemini-` -> Google, etc.).\n- Fast models for lightweight tasks: see `FAST_MODELS` map in `src/model/llm.ts`.\n- Anthropic uses explicit `cache_control` on system prompt for prompt caching cost savings.\n- Users switch providers/models via `/model` command in the CLI.\n\n## Tools\n\n- `financial_search`: primary tool for all financial data queries (prices, metrics, filings). Delegates to multiple sub-tools internally.\n- `financial_metrics`: direct metric lookups (revenue, market cap, etc.).\n- `read_filings`: SEC filing reader for 10-K, 10-Q, 8-K documents.\n- `web_search`: general web search (Exa if `EXASEARCH_API_KEY` set, else Tavily if `TAVILY_API_KEY` set).\n- `browser`: Playwright-based web scraping for reading pages the agent discovers.\n- `skill`: invokes SKILL.md-defined workflows (e.g. DCF valuation). Each skill runs at most once per query.\n- Tool registry: `src/tools/registry.ts`. Tools are conditionally included based on env vars.\n\n## Skills\n\n- Skills live as `SKILL.md` files with YAML frontmatter (`name`, `description`) and markdown body (instructions).\n- Built-in skills: `src/skills/dcf/SKILL.md`.\n- Discovery: `src/skills/registry.ts` scans for SKILL.md files at startup.\n- Skills are exposed to the LLM as metadata in the system prompt; the LLM invokes them via the `skill` tool.\n\n## Agent Architecture\n\n- Agent loop: `src/agent/agent.ts`. Iterative tool-calling loop with configurable max iterations (default 10).\n- Scratchpad: `src/agent/scratchpad.ts`. Single source of truth for all tool results within a query.\n- Context management: Anthropic-style. Full tool results kept in context; oldest results cleared when token threshold exceeded.\n- Final answer: generated in a separate LLM call with full scratchpad context (no tools bound).\n- Events: agent yields typed events (`tool_start`, `tool_end`, `thinking`, `answer_start`, `done`, etc.) for real-time UI updates.\n\n## Environment Variables\n\n- LLM keys: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `XAI_API_KEY`, `OPENROUTER_API_KEY`\n- Ollama: `OLLAMA_BASE_URL` (default `http://127.0.0.1:11434`)\n- Finance: `FINANCIAL_DATASETS_API_KEY`\n- Search: `EXASEARCH_API_KEY` (preferred), `TAVILY_API_KEY` (fallback)\n- Tracing: `LANGSMITH_API_KEY`, `LANGSMITH_ENDPOINT`, `LANGSMITH_PROJECT`, `LANGSMITH_TRACING`\n- Never commit `.env` files or real API keys.\n\n## Version & Release\n\n- Version format: SemVer `MAJOR.MINOR.PATCH`. Tag prefix: `v`.\n- Release script: `bash scripts/release.sh [version]` (defaults to today's date).\n- Release flow: bump version in `package.json`, create git tag, push tag, create GitHub release via `gh`.\n- Do not push or publish without user confirmation.\n\n## Testing\n\n- Framework: Bun's built-in test runner (primary), Jest config exists for legacy compatibility.\n- Tests colocated as `*.test.ts`.\n- Run `bun test` before pushing when you touch logic.\n\n## Security\n\n- API keys stored in `.env` (gitignored). Users can also enter keys interactively via the CLI.\n- Config stored in `.dexter/settings.json` (gitignored).\n- Never commit or expose real API keys, tokens, or credentials.\n","category":"root","tokens":1373}]}