Installation Guide

Step-by-step instructions for installing and setting up the AgentX Crypto Trading Framework

System Requirements

Before installing AgentX, ensure your system meets the following requirements:

Component Minimum Recommended
Operating System Linux (Ubuntu 20.04+), macOS (10.15+), or Windows 10/11 Linux (Ubuntu 22.04+)
CPU 2+ cores 4+ cores
Memory 8GB RAM 16GB RAM
Storage 10GB free disk space 20GB+ free disk space
Python Version 3.10+ Version 3.11+
Node.js Version 20.0+ Version 20.0+
Network Stable internet connection High-speed internet connection

Installation Steps

1. Install Dependencies

# Update package lists
sudo apt update

# Install Python and pip
sudo apt install python3 python3-pip python3-venv

# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Install development tools
sudo apt install build-essential git
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Python
brew install python@3.10

# Install Node.js
brew install node@20

# Install git
brew install git

For Windows, download and install the following:

  1. Download and install Python 3.10+ from python.org
  2. Download and install Node.js 20+ from nodejs.org
  3. Download and install Git from git-scm.com

2. Clone the Repository

# Clone the repository
git clone https://github.com/yourusername/agentx.git

# Navigate to the project directory
cd agentx

3. Set Up Python Environment

# Create a virtual environment
python3 -m venv venv

# Activate the virtual environment
# On Linux/macOS:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt

4. Install Node.js Dependencies

# Navigate to the dashboard directory
cd src/dashboard

# Install Node.js dependencies
npm install

# Return to the project root
cd ../..

5. Configure the System

# Create a local configuration file
cp config/default.json config/local.json

Edit config/local.json with your preferred text editor and update the following:

  • Exchange API keys and secrets
  • Monitored trading pairs
  • Risk parameters
  • System settings

6. Create Log Directory

# Create logs directory
mkdir -p logs/agents

7. Run the System

# Ensure virtual environment is activated
# On Linux/macOS:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate

# Run the main application
python src/main.py

8. Access the Dashboard

Open your web browser and navigate to:

http://localhost:5000

System Configuration

The main configuration file is located at config/local.json. Here's an example configuration:

{
  "system": {
    "name": "AgentX Trading System",
    "update_interval": 1.0,
    "log_level": "INFO"
  },
  "agents": {
    "executive": {
      "chief_coordinator": {
        "update_frequency": 0.5,
        "allocation_limits": {
          "max_per_asset": 0.2,
          "max_per_strategy": 0.3
        }
      },
      "risk_manager": {
        "update_frequency": 0.5,
        "risk_limits": {
          "max_drawdown": 0.1,
          "max_volatility": 0.2,
          "max_correlation": 0.7
        }
      },
      "performance_analyst": {
        "update_frequency": 0.5,
        "metrics": ["returns", "sharpe", "drawdown", "win_rate"]
      }
    },
    "strategy": {
      "market_research": {
        "update_frequency": 0.5,
        "data_sources": ["twitter", "news", "reddit"]
      },
      "technical_analysis": {
        "update_frequency": 0.5,
        "indicators": ["sma", "ema", "rsi", "macd"]
      },
      "fundamental_analysis": {
        "update_frequency": 0.5,
        "metrics": ["active_addresses", "nvt_ratio", "development_activity"]
      },
      "macro_analysis": {
        "update_frequency": 0.5,
        "indicators": ["market_dominance", "correlation_traditional", "risk_metrics"]
      },
      "correlation_agent": {
        "update_frequency": 0.5,
        "correlation_window": 30,
        "min_correlation": 0.5
      }
    },
    "execution": {
      "trade_execution": {
        "update_frequency": 0.5,
        "supported_strategies": ["market", "limit", "twap", "vwap", "iceberg"]
      },
      "liquidity_monitoring": {
        "update_frequency": 0.5,
        "liquidity_thresholds": {
          "low": 100000,
          "medium": 1000000,
          "high": 10000000
        }
      },
      "order_book": {
        "update_frequency": 0.5,
        "order_book_depth_levels": 10
      }
    }
  },
  "exchanges": {
    "binance": {
      "api_key": "YOUR_API_KEY",
      "api_secret": "YOUR_API_SECRET"
    },
    "coinbase": {
      "api_key": "YOUR_API_KEY",
      "api_secret": "YOUR_API_SECRET"
    }
  },
  "assets": {
    "monitored_pairs": [
      "BTC/USDT", "ETH/USDT", "BNB/USDT", "SOL/USDT", "ADA/USDT"
    ]
  }
}
For detailed information about configuration parameters, refer to the User Guide.

Docker Installation (Alternative)

If you prefer using Docker, follow these steps:

1. Install Docker

Follow the instructions for your operating system at docker.com.

2. Clone the Repository

# Clone the repository
git clone https://github.com/yourusername/agentx.git

# Navigate to the project directory
cd agentx

3. Configure the System

# Create a local configuration file
cp config/default.json config/local.json

Edit config/local.json with your preferred text editor as described in the Configuration section.

4. Build and Run with Docker Compose

# Build and start the containers
docker-compose up -d

# View logs
docker-compose logs -f

5. Access the Dashboard

Open your web browser and navigate to:

http://localhost:5000

Troubleshooting

Common Installation Issues

If you encounter errors during Python dependencies installation:

# Update pip
pip install --upgrade pip

# Install wheel
pip install wheel

# Try installing dependencies again
pip install -r requirements.txt

If you encounter errors during Node.js dependencies installation:

# Clear npm cache
npm cache clean --force

# Try installing dependencies again
npm install

If you encounter permission issues:

# Fix permissions
chmod +x src/main.py

# If using Docker
sudo chown -R $USER:$USER .

If port 5000 is already in use:

  1. Edit src/dashboard.py and change the port number (e.g., from 5000 to 5001)
  2. Restart the application

Verifying Installation

To verify that the installation was successful:

  1. Check that the system starts without errors
  2. Access the dashboard in your web browser
  3. Navigate to the Agents section and verify all agents are initialized
  4. Check the logs directory for any error messages
If you can see the dashboard and all agents are initialized, your installation is successful!

Next Steps

After successful installation:

  1. Review the User Guide for detailed usage instructions
  2. Configure your trading strategies in the configuration file
  3. Set up exchange API keys with appropriate permissions
  4. Start the system and monitor performance through the dashboard

Support

If you encounter any issues during installation:

  1. Check the logs in the logs directory
  2. Refer to the Troubleshooting section in the User Guide
  3. Open an issue on GitHub with detailed information about the problem