How yijia-xiao/financeharness works
FinanceHarness turns a financial question into a planned, evidence-backed analysis and cited report. The CLI is the one-shot entry point; the optional HTTP/SSE service adds clarification, streaming, and resumable sessions. The runtime agent uses provider profiles and a tool registry to coordinate web research, financial data, and calculations, then attaches citations. The README also documents reference-chaining and skills for reusable workflows. Paths identify the relevant source modules or enclosing directories; some subsystem wiring is based on documented capabilities because those implementations were not sampled.
Main entry points: dispatch.py Tool dispatch · research.py Research entry · app.py HTTP/SSE service · agent.py Agent loop
Components 22
User interfaces
- CLI
financeharness/cli.py - HTTP/SSE service
financeharness/service/app.py - Session store
financeharness/service/sessions.py
Research runtime
- Question scoping
financeharness/clarify.py - Research entry
financeharness/research.py - Agent loop
financeharness/runtime/agent.py - Tool registry
financeharness/runtime/tool_registry.py - Tool dispatch
financeharness/runtime/dispatch.py - Skill registry
financeharness/runtime/skill_registry.py
Model providers
- Provider client
financeharness/providers/client.py
Evidence gathering
- Web search
financeharness/tools/research/search.py - Search backend
financeharness/tools/research/search_backends.py - Page reading
financeharness/tools/research/visit.py - Fetch cache
financeharness/tools/research/cache.py - Citation assembly
financeharness/tools/research/citations.py
Financial analysis
- Equity and market data
financeharness/tools/data - Valuation and risk
financeharness/tools/compute - Exact arithmetic
financeharness/tools/compute/arithmetic.py
Other components
- Researcher
- Model backbone
- Market data provider
- Cited report
Connections 28
- Researcher → CLI: asks via CLI
- Researcher → HTTP/SSE service: submits request
- CLI → Research entry: runs research
- HTTP/SSE service → Question scoping: scopes question
- HTTP/SSE service → Research entry: runs research
- HTTP/SSE service → Session store: reads or commits
- Research entry → Agent loop: starts trajectory
- Research entry → Tool registry: assembles tools
- Research entry → Skill registry: loads skills
- Agent loop → Provider client: requests completion
- Provider client → Model backbone: sends prompt
- Model backbone → Provider client: returns completion
- Agent loop → Tool dispatch: dispatches calls
- Tool dispatch → Tool registry: resolves tools
- Tool dispatch → Web search: invokes tool
- Tool dispatch → Page reading: invokes tool
- Tool dispatch → Equity and market data: invokes tools
- Tool dispatch → Valuation and risk: invokes tools
- Tool dispatch → Exact arithmetic: invokes tool
- Web search → Search backend: searches queries
- Web search → Fetch cache: records results
- Search backend → Web search: returns hits
- Page reading → Fetch cache: reads and warms
- Page reading → Citation assembly: records sources
- Equity and market data → Market data provider: fetches market data
- Research entry → Citation assembly: finalizes citations
- Agent loop → Cited report: produces answer
- Research entry → Cited report: attaches citations