How noho/dayu-agent-r works
Dayu is a CLI-centered financial-analysis agent: users initialize a workspace, ingest filings and materials, then ask single-turn or interactive questions and manage sessions. Its finance workflows cover market-specific downloads, uploads, document preprocessing, storage, and financial search; the agent side combines an Engine, Host-managed runs and sessions, and document/web tools. The README documents the user-visible workflow, while source-index references support selected internal connections. Several finance and Host subsystems are unsampled, so their internal links are intentionally limited.
Main entry points: agent.py Agent Engine · main.py Dayu CLI · pipelines Market Pipelines · tools Document and Web Tools
Components 23
CLI and Workspace
- Dayu CLI
dayu/cli/main.py - Workspace Config
dayu/cli/init_workspace.py - Finance Commands
dayu/cli/commands/fins.py - Session Commands
dayu/cli/commands/session.py
Financial Documents
- Ingestion Runtime
dayu/fins/ingestion_runtime.py - Market Pipelines
dayu/fins/pipelines - Market Downloaders
dayu/fins/downloaders - Upload Processing
dayu/fins/pipelines/docling_upload_service.py - Document Processing
dayu/documents/processors - Filing Analysis
dayu/fins/processors - Financial Repository
dayu/fins/storage/_fs_storage_infra.py - Financial Tools
dayu/fins/tools
Agent Execution
- Ticker Context
dayu/service/scene_context.py - Agent Engine
dayu/engine/agent.py - OpenAI Runner
dayu/engine/runners/openai/runner.py
Host and Tools
- Host API
dayu/host/api.py - Event Ingest
dayu/host/engine_ingest.py - Durable State
dayu/host/durable/transaction.py - Document and Web Tools
dayu/tools - Web Fetch
dayu/tools/web/web_fetch_orchestrator.py
Other components
- Analyst
- Analysis Output
- Market and Model Providers
Connections 26
- Analyst → Dayu CLI: runs commands
README.md - Dayu CLI → Workspace Config: initializes config
README.md - Dayu CLI → Finance Commands: dispatches finance
dayu/cli/main.py - Dayu CLI → Session Commands: dispatches sessions
dayu/cli/main.py - Finance Commands → Ingestion Runtime: starts jobs
- Ingestion Runtime → Market Pipelines: runs workflows
dayu/fins/ingestion_runtime.py - Market Pipelines → Market Downloaders: requests filings
dayu/fins/pipelines/cn_pipeline.py - Market Pipelines → Upload Processing: invokes upload
dayu/fins/pipelines/cn_pipeline.py - Market Pipelines → Financial Repository: persists documents
dayu/fins/pipelines/cn_pipeline.py - Upload Processing → Document Processing: converts documents
dayu/fins/pipelines/docling_upload_service.py - Document Processing → Filing Analysis: supplies parsed text
dayu/fins/processors/sec_xbrl_query.py - Filing Analysis → Financial Repository: publishes results
- Financial Tools → Financial Repository: reads filings
dayu/fins/tools/search_engine.py - Analyst → Agent Engine: asks questions
README.md - Agent Engine → OpenAI Runner: calls model
- Agent Engine → Host API: runs through Host
- Host API → Event Ingest: ingests events
dayu/host/engine_ingest.py - Event Ingest → Durable State: records state
dayu/host/engine_ingest.py - Agent Engine → Document and Web Tools: invokes tools
- Document and Web Tools → Financial Tools: provides finance tools
- Document and Web Tools → Web Fetch: fetches web pages
dayu/tools/web/web_fetch_orchestrator.py - Ticker Context → Market and Model Providers: resolves company info
- Market Downloaders → Market and Model Providers: downloads filings
- OpenAI Runner → Market and Model Providers: requests completion
- Agent Engine → Analysis Output: streams answer
README.md - Session Commands → Host API: manages sessions
dayu/cli/commands/session.py