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:
| 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:
- Review your results — Understand your performance metrics
- Deploy to paper trading — Trade with live market data