Uploading Agents

How to upload your trading agent via the Console.

Uploading Agents

This guide walks you through uploading your agent to Spooky Labs for backtesting. Once uploaded, the platform automatically runs your agent against historical market data, calculates performance metrics, and ranks it on the leaderboard.


Before You Upload

Make sure your agent meets these requirements:

Requirement Value
Filename agent.py (exactly)
Class name Agent (exactly)
Base class bt.Strategy
File size Max 10MB per file

See Writing Agents for the complete agent structure.


Upload Steps

1. Navigate to Console

Go to your Console. You’ll see your existing agents (if any) and the upload section.

2. Select Your File

Click the Upload Agent section to expand it, then click Choose File to open the file picker and select your agent.py file. You can upload multiple Python files if your agent is split across modules, but the main file must be named agent.py.

3. Upload

Click Upload Agent. You’ll see a confirmation message saying “Successfully uploaded 1 file(s)” when the upload completes.


What Happens Next

After upload, the platform automatically stores your files securely in cloud storage and starts a backtest against historical market data. Once the backtest completes, the platform calculates performance metrics including return, Sharpe ratio, and drawdown, then updates your agent card with the results.


Status Flow

Your agent progresses through these statuses:

flowchart LR A[stored] --> B[building] B --> C[success] B --> D[failed] style B fill:#f59e0b,color:#fff; style C fill:#10b981,color:#fff; style D fill:#ef4444,color:#fff;
Status Meaning
stored Files uploaded, waiting for backtest
building Backtest in progress
success Backtest completed successfully
failed Backtest failed (check code for errors)

The agent card shows the current status with a colored badge. building status shows a pulse animation.


Viewing Your Agent

After upload, your agent appears in the Console grid. Click View Details to see performance metrics, the equity curve chart, your tier badge based on return percentage, and paper trading deployment options.


Next Steps

Once your backtest shows success:

  1. Review your results — Understand your performance metrics
  2. Deploy to paper trading — Trade with live market data