š PeterAgents ā NGX Stock Picker
An AI-powered multi-agent system that finds trending companies on the Nigerian Exchange (NGX), researches them, and picks the best investment candidate. Built with CrewAI , Serper API, and custom tools.
š Features
š Find Trending NGX Companies in a given sector
š Research Reports on company performance, market position, and outlook
š Stock Picker Agent chooses the best company and explains why
š¾ Decision Logs saved locally for reference
š” Push Notifications for instant results
āļø Installation
- Clone the Repo git clone https://github.com/Peter-ConX/PeterAgents.git cd PeterAgents
- Setup Virtual Environment uv venv source .venv/bin/activate # macOS/Linux .venv\Scripts\activate # Windows PowerShell
- Install Dependencies pip install -r requirements.txt š Environment Variables
You need a Serper API key:
macOS/Linux
export SERPER_API_KEY=your_key_here
Windows PowerShell
$env:SERPER_API_KEY="your_key_here"
ā¶ļø Usage
Run the crew with a sector of your choice (Technology, Banking, Oil & Gas, Consumer Goods, etc.): python src/stock_picker/main.py
Output:
Console: final decision
output/decision.log: saved decision report
š Project Structure PeterAgents/ āāā src/stock_picker/ ā āāā crew.py # Crew + Agents + Tasks ā āāā main.py # Entry point ā āāā tools/ # Custom tools (PushNotificationTool) āāā config/ ā āāā agents.yaml # Agent roles, goals, backstories ā āāā tasks.yaml # Task descriptions, expected outputs āāā output/ # Saved reports & logs
š Common Errors & Fixes
- NameError: name 'CrewBase' is not defined
CrewAI >=0.186.0 removed CrewBase.
Fix: Remove @CrewBase, just use class StockPicker:.
- Failed Search the internet with Serper
Usually caused by invalid API key or queries too strict.
Fix:
Ensure $SERPER_API_KEY is set.