{"id":30508645,"url":"https://github.com/sagar-n/deepagents","last_synced_at":"2025-08-25T23:02:43.628Z","repository":{"id":309778554,"uuid":"1037528675","full_name":"sagar-n/deepagents","owner":"sagar-n","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-13T18:17:50.000Z","size":1659,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-13T20:39:50.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sagar-n.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-13T17:56:33.000Z","updated_at":"2025-08-13T18:17:53.000Z","dependencies_parsed_at":"2025-08-13T20:39:52.886Z","dependency_job_id":"3f694e9c-43b4-40ee-86cc-bafc08609795","html_url":"https://github.com/sagar-n/deepagents","commit_stats":null,"previous_names":["sagar-n/deepagents"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sagar-n/deepagents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagar-n%2Fdeepagents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagar-n%2Fdeepagents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagar-n%2Fdeepagents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagar-n%2Fdeepagents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagar-n","download_url":"https://codeload.github.com/sagar-n/deepagents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagar-n%2Fdeepagents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272144649,"owners_count":24881141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-25T23:01:36.470Z","updated_at":"2025-08-25T23:02:43.616Z","avatar_url":"https://github.com/sagar-n.png","language":"Python","funding_links":[],"categories":["App","💰 Finance \u0026 Fintech","Python"],"sub_categories":["🟩 Development Tools 🛠️"],"readme":"# 📊 DeepAgent Stock Research Assistant\n\n\u003e **A sophisticated AI-powered stock research agent built with LangChain DeepAgents that provides comprehensive financial analysis comparable to professional analysts.**\n\n[![Python](https://img.shields.io/badge/python-v3.8+-blue.svg)](https://www.python.org/downloads/)\n[![LangChain](https://img.shields.io/badge/langchain-latest-green.svg)](https://langchain.com/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Gradio](https://img.shields.io/badge/interface-gradio-orange.svg)](https://gradio.app/)\n\n## 🚀 Overview\n\nThis project demonstrates how to build advanced AI research capabilities using LangChain's DeepAgent framework. Unlike simple chatbots, this system employs specialized sub-agents, systematic planning, and comprehensive tool integration to deliver professional-grade stock analysis.\n\n\u003c!-- Add hero screenshot here --\u003e\n[▶️ Watch the Demo](./deepagents.mp4)\n\n![Screenshots](./screenshot.jpg)\n\n### ✨ Key Features\n\n- **🎯 Multi-Perspective Analysis**: Combines fundamental, technical, and risk analysis\n- **🤖 Specialized Sub-Agents**: Expert analysts for different aspects of research\n- **📊 Real-Time Data**: Live stock prices, financial statements, and technical indicators\n- **🔄 Systematic Workflow**: Structured research methodology\n- **🖥️ Web Interface**: User-friendly Gradio interface\n- **📈 Professional Reports**: Investment recommendations with price targets\n- **⚡ Fast Analysis**: Reduces research time from hours to minutes\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    User Interface (Gradio)                 │\n└─────────────────────┬───────────────────────────────────────┘\n                      │\n┌─────────────────────▼───────────────────────────────────────┐\n│              Master DeepAgent Orchestrator                 │\n├─────────────────────────────────────────────────────────────┤\n│  Planning Tool | Virtual File System | System Prompt       │\n└─────────────┬───────────────────────────────────┬─────────┘\n              │                                   │\n    ┌─────────▼──────────┐                ┌──────▼──────────┐\n    │   Sub-Agents       │                │  Financial Tools │\n    │                    │                │                  │\n    │ • Fundamental      │                │ • Stock Price    │\n    │ • Technical        │                │ • Financials     │\n    │ • Risk Analysis    │                │ • Technical      │\n    └────────────────────┘                │   Indicators     │\n                                          └──────┬──────────┘\n                                                 │\n                                     ┌──────────▼──────────┐\n                                     │   Data Sources      │\n                                     │                     │\n                                     │ • Yahoo Finance     │\n                                     │ • Real-time APIs    │\n                                     │ • Market Data       │\n                                     └─────────────────────┘\n```\n\n\n\n## 🛠️ Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- Ollama (for local LLM hosting)\n\n### Quick Start\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/yourusername/deepagent-stock-research.git\n   cd deepagent-stock-research\n   ```\n\n2. **Install dependencies**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Set up Ollama**\n   ```bash\n   # Install Ollama (if not already installed)\n   curl -fsSL https://ollama.ai/install.sh | sh\n   \n   # Pull a model\n   ollama pull gpt-oss\n   ```\n\n4. **Run the application**\n   ```bash\n   python researchagent.py\n   ```\n\n5. **Open your browser**\n   Navigate to `http://localhost:7860`\n\n## 📦 Dependencies\n\nCreate a `requirements.txt` file with:\n\n```txt\ndeepagents\nlangchain-ollama\nlangchain-core\nyfinance\ngradio\npandas\nnumpy\n```\n\n## 🎯 Usage\n\n### Basic Analysis\n\n```python\n# Example query\nquery = \"\"\"\nConduct a comprehensive analysis of Apple Inc. (AAPL) for a 6-month investment horizon.\nInclude:\n1. Current financial performance\n2. Technical analysis with trading signals\n3. Risk assessment\n4. Investment recommendation with price targets\n\"\"\"\n```\n\n### Advanced Queries\n\n- **Portfolio Analysis**: \"Compare AAPL, MSFT, and GOOGL for portfolio allocation\"\n- **Sector Research**: \"Analyze the technology sector outlook for Q1 2025\"\n- **Risk Assessment**: \"Evaluate the risks of investing in Tesla (TSLA)\"\n- **Technical Analysis**: \"Provide technical analysis and entry points for NVDA\"\n\n\n## 🔧 Configuration\n\n### Model Configuration\n\n```python\n# Customize the LLM model\nollama_model = ChatOllama(\n    model=\"your-preferred-model\",  # e.g., \"llama2\", \"codellama\"\n    temperature=0,                 # Adjust for creativity vs consistency\n)\n```\n\n### Adding Custom Tools\n\n```python\n@tool\ndef custom_analysis_tool(symbol: str) -\u003e str:\n    \"\"\"Your custom analysis logic here.\"\"\"\n    # Implementation\n    return results\n\n# Add to tools list\ntools = [\n    get_stock_price,\n    get_financial_statements,\n    get_technical_indicators,\n    custom_analysis_tool  # Your custom tool\n]\n```\n\n### Customizing Sub-Agents\n\n```python\n# Add new specialized sub-agent\nesg_analyst = {\n    \"name\": \"esg-analyst\",\n    \"description\": \"Evaluates Environmental, Social, and Governance factors\",\n    \"prompt\": \"\"\"You are an ESG specialist...\"\"\"\n}\n\nsubagents = [fundamental_analyst, technical_analyst, risk_analyst, esg_analyst]\n```\n\n## 📊 Example Output\n\n```\n=== STOCK RESEARCH REPORT ===\n\nAPPLE INC. (AAPL) INVESTMENT ANALYSIS\nGenerated: 2025-08-13 23:28:00\n\nEXECUTIVE SUMMARY\nCurrent Price: $184.12\nRecommendation: BUY\nTarget Price: $210.00 (12-month)\nRisk Level: MODERATE\n\nFUNDAMENTAL ANALYSIS\n• Revenue (TTM): $385.7B (+1.3% YoY)\n• Net Income: $96.9B \n• P/E Ratio: 28.5x (Premium to sector avg: 24.1x)\n• ROE: 147.4% (Excellent)\n• Debt-to-Equity: 1.73 (Manageable)\n\nTECHNICAL ANALYSIS\n• Trend: BULLISH (Price \u003e SMA20 \u003e SMA50)\n• RSI: 62.3 (Neutral-Bullish)\n• Support Levels: $175, $165\n• Resistance Levels: $195, $205\n\nRISK ASSESSMENT\n• Market Risk: MODERATE (Tech sector volatility)\n• Company Risk: LOW (Strong balance sheet)\n• Regulatory Risk: MODERATE (Antitrust concerns)\n\n[Full detailed report continues...]\n```\n\n\n## 🚨 Disclaimer\n\nThis tool is for educational and research purposes only. It does not constitute financial advice. Always consult with qualified financial advisors before making investment decisions. Past performance does not guarantee future results.\n\n## 🙏 Acknowledgments\n\n- **LangChain Team** for the DeepAgent framework\n- **Yahoo Finance** for providing free financial data APIs\n- **Gradio Team** for the excellent UI framework\n- **Ollama** for local LLM hosting capabilities\n\n\n## 🌟 Star the Project\n\nIf you find this project useful, please consider giving it a star ⭐️ on GitHub!\n\n---\n\n**Built with ❤️ using LangChain DeepAgents**\n\n*Transform your investment research with the power of specialized AI agents.*\n\n\u003c!-- Add final demo/banner screenshot here --\u003e\n![Project Banner](screenshots/project-banner.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagar-n%2Fdeepagents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagar-n%2Fdeepagents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagar-n%2Fdeepagents/lists"}