Repository navigation
Release v2.0 — Modular Stock Research Agent (Env + Config Refactor)
🚀 Overview
This release introduces a major refactor of the Stock Research Agent built on LangChain DeepAgents, making it fully modular, configurable, and scalable.
The new version focuses on clean configuration management, reduced context size for small models, and improved reliability in tool coordination.
✨ Key Highlights
🧩 Modular Architecture
- All configuration, tool definitions, and model setup are now modular.
- Centralized configuration via config.py and .env for easy environment-based tuning.
⚙️ Configurable Agent Instructions
- The entire agent workflow, rules, and sub-agent prompts are now externalized.
- Supports updating research instructions and sub-agent roles directly from the .env file or external .txt files (no code changes required).
🔧 Improved Tool Integration
- Unified Brave Search and Tavily Search under a single web_search abstraction.
- Automatically detects available API keys and loads the appropriate provider.
- Added safe JSON parsing (safe_json_parse) to prevent crashes from malformed LLM outputs.
📉 Optimized for Small Models
- Reduced token footprint in system prompts for efficient execution with models like gpt-oss:20B.
- Enforced single-JSON tool output to avoid recursive loops and parsing failures.
- Added explicit stop conditions to prevent DeepAgents recursion issues.
🧠 Smarter Sub-Agent Design
- Sub-agents (Fundamental, Technical, Risk Analysts) fully configurable via .env or config.py.
- Each agent prompt trimmed and optimized for clarity and token efficiency.
- Supports future expansion (e.g., sentiment, ESG, or macroeconomic agents).