Skip to content

travis-burmaster/agent-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent OS - Trading Agent System

A comprehensive AI-powered trading agent system built with Agno framework that provides real-time stock analysis, market research, and trading recommendations. Compatible with os.agno.com.

Features

  • Day Trading Analysis Team: Multi-agent system with specialized roles:

    • Market Research Agent: Real-time market data gathering
    • Stock Analysis Agent: Technical and fundamental analysis
    • Recommendation Agent: Trading recommendations with risk management
    • Portfolio Manager: Team coordination and portfolio analysis
  • Real-time Market Data: Integration with MarketStack API for live stock data

  • Multi-Agent Collaboration: Coordinated team approach for comprehensive analysis

  • Web Interface: Compatible with os.agno.com platform

  • Risk Management: Built-in risk assessment and position sizing

Prerequisites

  • macOS (tested on macOS 14+)
  • Python 3.9 or higher
  • Git

Setup Instructions for macOS

1. Clone the Repository

git clone <your-repository-url>
cd agent-os

2. Create Python Virtual Environment

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate

# Verify activation (should show the venv path)
which python

3. Install Dependencies

# Upgrade pip
pip install --upgrade pip

# Install required packages
pip install -r requirements.txt

4. Environment Configuration

Create a .env file in the project root:

# Copy the example or create new .env file
touch .env

Add your API keys to .env:

GOOGLE_API_KEY="your_google_api_key_here"
MARKETSTACK_API_KEY="your_marketstack_api_key_here"

Required API Keys:

5. Run the Trading Agent System

# Ensure virtual environment is activated
source venv/bin/activate

# Run the main trading agent system
python my_os.py

The system will start on http://localhost:7777 and will be accessible from os.agno.com.

6. Verify Setup

  1. Check that the server starts without errors
  2. Visit os.agno.com
  3. Your agent should appear as "Trading Agent OS"
  4. Test with a stock analysis request like "Analyze AAPL, GOOGL, MSFT"

Project Structure

agent-os/
├── my_os.py                    # Main AgentOS application
├── requirements.txt            # Python dependencies
├── .env                       # Environment variables (create this)
├── trader/                    # Trading agent modules
│   ├── marketstack_client.py  # MarketStack API client
│   └── indicators.py          # Technical indicators
│  
└── tmp/                       # Temporary files and vector database

Available Agents

Individual Agents

  • assistant: Main trading assistant
  • portfolio_manager: Portfolio coordination and management
  • market_research_agent: Market data gathering and analysis
  • stock_analysis_agent: Technical and fundamental analysis
  • recommendation_agent: Trading recommendations

Teams

  • day_trading_team: Coordinated multi-agent trading analysis team

Usage Examples

Once running, you can interact with the system through os.agno.com:

"Analyze AAPL for day trading opportunities"
"What are the market conditions for tech stocks?"
"Provide trading recommendations for TSLA, NVDA"
"Analyze the portfolio: AAPL, GOOGL, MSFT, AMZN"

API Endpoints

The system also exposes REST API endpoints:

  • GET /: System information
  • GET /health: Health check
  • POST /analyze: Stock analysis (JSON payload with symbols array)

Troubleshooting

Common Issues

1. Import Errors

# Ensure virtual environment is activated
source venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txt

2. API Key Issues

  • Verify .env file exists and contains valid API keys
  • Check that environment variables are loaded correctly

3. Port Already in Use

# Kill existing processes on port 7777
lsof -ti:7777 | xargs kill -9

4. Connection Issues with os.agno.com

  • Ensure the server is running on http://localhost:7777
  • Check firewall settings
  • Verify CORS configuration allows os.agno.com

Debugging

Enable debug mode by running:

# Run with verbose output
python my_os.py --debug

Check logs in the terminal output for detailed error messages.

Development

Testing Different Configurations

# Test with AgentOS (recommended)
python my_os.py

Adding New Agents

  1. Create new agent in trader/ directory
  2. Import and add to my_os.py
  3. Update team configuration as needed

License

[Add your license information here]

Contributing

[Add contribution guidelines here]

Support

For issues and questions:

  1. Check the troubleshooting section above
  2. Review terminal output for error messages
  3. Ensure all API keys are valid and properly configured

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages