How urgetolearn/finlens works
FinLens helps beginners understand current India-focused financial news through a CLI and a story-browser chat. The workflow is user question or story selection → agent conversation loop → model-selected news tools → RSS discovery, source reading, or cross-checking → plain-language explanation and follow-ups. The graph also shows configuration, safety and explanation prompts, the Ollama adapter, concept glossary, and optional Story Time mode. Relationships reflect the shown imports and calls; unsampled UI and CLI details are not expanded beyond the evidence available.
Main entry points: agent.py Tool-using agent · financial_news.py News tool dispatcher · ollama.py Ollama adapter · config.py App settings
Components 17
User experience
- CLI
app/agent.py - News browser
app/ui.py
Agent and guidance
- Tool-using agent
app/agent.py - Safety and prompts
app/prompts.py - Briefing checks
app/agent.py - Story Time
app/agent.py
News tools
- News tool dispatcher
app/tools/financial_news.py - Concept glossary
app/tools/financial_news.py - Daily RSS discovery
app/services/news.py - Article reader
app/services/news.py - Feed cross-check
app/services/news.py
Service adapters
- App settings
app/config.py - Ollama adapter
app/services/ollama.py
Other components
- Beginner
- Ollama service
- RSS publishers
- Publisher pages
Connections 24
- Beginner → CLI: asks
app/agent.py - Beginner → News browser: browses
app/ui.py - CLI → Tool-using agent: invokes
app/agent.py - News browser → Tool-using agent: invokes
app/ui.py - Tool-using agent → Safety and prompts: uses guidance
app/agent.py - Tool-using agent → Ollama adapter: requests replies
app/agent.py - Ollama adapter → Ollama service: sends chat
app/services/ollama.py - Ollama adapter → App settings: reads settings
app/services/ollama.py - Ollama service → Ollama adapter: returns message
- Tool-using agent → News tool dispatcher: dispatches tools
app/agent.py - News tool dispatcher → Concept glossary: explains terms
app/tools/financial_news.py - News tool dispatcher → Daily RSS discovery: fetches stories
app/tools/financial_news.py - News tool dispatcher → Article reader: reads selected source
app/tools/financial_news.py - News tool dispatcher → Feed cross-check: finds candidates
app/tools/financial_news.py - Daily RSS discovery → RSS publishers: requests feeds
app/services/news.py - Feed cross-check → RSS publishers: requests feeds
app/services/news.py - Article reader → Publisher pages: requests article
app/services/news.py - Daily RSS discovery → App settings: reads settings
app/services/news.py - Feed cross-check → App settings: reads timezone
app/services/news.py - News tool dispatcher → App settings: selects feeds
app/tools/financial_news.py - Tool-using agent → Briefing checks: checks briefing
app/agent.py - Briefing checks → Tool-using agent: retries response
app/agent.py - News browser → Story Time: offers analogy
app/ui.py - Story Time → Tool-using agent: generates analogy
app/agent.py