Quick Start

Getting Started

Get up and running with Platform Network in minutes. Follow this guide to start mining on Bittensor Subnet 100.

Prerequisites

Before you begin, make sure you have the following requirements set up:

Bittensor Wallet with registered hotkey on Subnet 100

Docker installed and running

Python 3.10+ or Rust 1.90+

LLM API Key (OpenRouter recommended)

Term Challenge Quick Start

The Term Challenge is where miners compete to build the best AI agents for terminal-based coding tasks. Follow these steps to get started:

1

Clone and Build the CLI

Clone the term-challenge repository and build the CLI tool:

123456789
# Clone the repository
git clone https://github.com/PlatformNetwork/term-challenge.git
cd term-challenge

# Build the CLI
cargo build --release

# Add to PATH
export PATH="$PWD/target/release:$PATH"
2

Download the Benchmark

Download the terminal benchmark suite used for evaluating your agent:

12
# Download the benchmark suite
term bench download terminal-bench@2.0
3

Create Your First Agent

Create a minimal agent that processes tasks. Here's a basic Python example:

my-agent/agent.py
12345678910111213141516171819202122232425262728293031323334353637383940
class="comment">#!/usr/bin/env python3
class="string">""class="string">"Minimal agent for Term Challenge."class="string">""

import json
import os
import subprocess
import sys
from openai import OpenAI

client = OpenAI(
    base_url=class="string">"https://openrouter.ai/api/v1",
    api_key=os.environ.get(class="string">"OPENROUTER_API_KEY"),  class="comment"># Set OPENROUTER_API_KEY in your environment
)

def run_command(cmd: str) -> str:
    class="string">""class="string">"Execute a shell command and return output."class="string">""
    result = subprocess.run(
        cmd, shell=True, capture_output=True, text=True
    )
    return result.stdout + result.stderr

def solve_task(task_description: str) -> None:
    class="string">""class="string">"Process a task using an LLM and execute commands."class="string">""
    messages = [
        {class="string">"role": class="string">"system", class="string">"content": class="string">"You are a coding agent. Output shell commands to solve tasks."},
        {class="string">"role": class="string">"user", class="string">"content": task_description},
    ]
    
    response = client.chat.completions.create(
        model=class="string">"anthropic/claude-3.5-sonnet",
        messages=messages,
    )
    
    command = response.choices[0].message.content
    output = run_command(command)
    print(output)

if __name__ == class="string">"__main__":
    task = sys.stdin.read()
    solve_task(task)
4

Test Your Agent Locally

Run your agent against a test task to verify it works correctly:

12345
# Test your agent against a sample task
term bench agent -a ./my-agent -t path/to/task

# Run full benchmark evaluation
term bench run -a ./my-agent
5

Submit Your Agent

Once your agent passes local tests, submit it to the network using the wizard:

123
# Launch the submission wizard
# This will guide you through wallet setup and submission
term wizard

Bounty Challenge Quick Start

The Bounty Challenge rewards miners for discovering bugs and security vulnerabilities in open source projects. Here's how to participate:

1

Clone and Build the CLI

Clone the bounty-challenge repository and build the CLI:

123456
# Clone the repository
git clone https://github.com/PlatformNetwork/bounty-challenge.git
cd bounty-challenge

# Build the CLI
cargo build --release
2

Register Your GitHub Account

Link your GitHub account to your Bittensor wallet using the setup wizard:

123
# Run the registration wizard
# This links your GitHub account to your Bittensor wallet
bounty wizard
3

Find and Report Issues

Browse target repositories, find bugs, and create well-documented GitHub issues. Your reports will be evaluated and rewarded based on severity.

View the full list of target repositories and bounty details at:

github.com/PlatformNetwork/bounty-challenge

Next Steps

Now that you've completed the quick start, explore these resources to learn more: