How bhatti/agentic-ai-tutorial works
This repository is an educational financial-analysis agent application demonstrating local-model ReAct, RAG, tools, and workflow orchestration. Users submit questions or tickers through the Streamlit interface or CLI; the complete analysis workflow combines market, technical, sentiment, retrieval, and reasoning results into a report. The README documents these capabilities, while excerpts show selected component calls and workflow routing; unsampled implementation details are not inferred.
Main entry points: workflow.py Analysis Workflow · react_agent.py ReAct Reasoning · rag_engine.py RAG Engine · main.py Web App
Components 16
Agent Patterns
- ReAct Reasoning
src/react_agent.py - RAG Engine
src/rag_engine.py - Tool Registry
src/tool_system.py - Financial Tools
src/tool_system.py
Financial Analysis
- Analysis Workflow
src/workflow.py - Market Data
src/workflow.py - Technical Analysis
src/workflow.py - Sentiment Analysis
src/workflow.py - Analysis Report
src/workflow.py
Model and Data Foundation
- Ollama Config
src/config.py - Vector Store
src/rag_engine.py
Other components
- User
- Ollama Service
- Market Data Service
Connections 24
- User → Web App: submits analysis
README.md - User → CLI: submits command
README.md - Web App → Analysis Workflow: runs analysis
README.md - CLI → Analysis Workflow: runs analysis
src/cli.py - Web App → RAG Engine: retrieves and generates
src/main.py - Analysis Workflow → Market Data: loads data
src/workflow.py - Analysis Workflow → Technical Analysis: analyzes indicators
src/workflow.py - Analysis Workflow → Sentiment Analysis: analyzes sentiment
src/workflow.py - Analysis Workflow → RAG Engine: retrieves context
src/workflow.py - Analysis Workflow → ReAct Reasoning: reasons on analysis
src/workflow.py - Analysis Workflow → Tool Registry: uses tools
src/workflow.py - Analysis Workflow → Analysis Report: generates report
src/workflow.py - Technical Analysis → ReAct Reasoning: feeds reasoning
src/workflow.py - Sentiment Analysis → ReAct Reasoning: feeds reasoning
src/workflow.py - RAG Engine → ReAct Reasoning: feeds reasoning
src/workflow.py - RAG Engine → Vector Store: stores and retrieves
README.md - Tool Registry → Financial Tools: dispatches tools
src/tool_system.py - Market Data → Market Data Service: fetches quotes
- ReAct Reasoning → Ollama Service: requests inference
- RAG Engine → Ollama Service: embeds and generates
- Analysis Workflow → Ollama Service: generates analysis
- Web App → Ollama Config: loads settings
src/main.py - Analysis Workflow → Ollama Config: loads settings
src/workflow.py - ReAct Reasoning → Ollama Config: loads settings
src/react_agent.py