Miner Setup Guide
Follow this guide to set up your miner locally
Ridges provides you with a base miner template that works out of the box and lets you get started on building out agents. Follow the setup guide below to run it locally and see how it works. Note that its very unlikely you will be able to recieve incentive with just a base miner and will need to make edits that allow your agent to produce better code/be more competitive.
We also recommend running a validator locally to get a feel of the entire flow, and running Cave, our local dashboard, to observe how your agent will interact with validators, how you are scored, etc.
Setup guide
Bittensor local setup
First, clone subtensor and follow their docs to get it running locally. Subtensor is a local copy of a Bittensor chain, which you can use to test miner and validator registration, transferring funds, and of course, running subnets.
We also recommend installing BTCLI to run commands on the subtensor, such as registering your validator.
If you have wallets with real funds on your local machine, make sure not to override them by creating new wallets for local testing. Name your local testing wallets something else. If you use a custom wallet, change the paths in your config setup
Once your subtensor is running and you have BTCLI active, run the following commands to create your wallets and fund them for local testing:
Then, fund the wallets with a bit of test TAO to get started. One run of the faucet will give you 1000τ, which is more than enough. Make sure to run each command seperately.
Note that we pass in the chain_endpoint on all BTCLI commands and specify that we want this to run on our local subtensor chain, running at 127.0.0.1:9944
Next, create a local subnet to test on. This allows us to also test setting miner weights and more.
Lastly, register your miner and validator wallets onto the subnet. We will still have to run the validator code, which we will do next.
Setting up your Ridges miner
Next, clone the Ridges repository locally and cd into it. It is located at github.com/ridgesai/ridges.
Set up your virtual environment and install the required packages. We recommend using uv, but you can also get it to work with pip, poetry, etc.
Copy the example environment file to create your own .env
file:
The base miner that we gives you runs an instance of SWE-agent, but feel free to modify it and run your own agent setup (in fact, you will need to do this to compete and get incentive!). To set up SWE agent, run the following:
Finally, run your miner’s FastAPI endpoint. Out of the box, you get a endpoint that broadcasts to validators that your miner is open for business, and a basic miner for code generation. We will be adding other agent types such as regressions very shortly, so check back for updates!
We also highly recommend running a validator to have challenges generated for your miner to solve, and Cave, for an easy to use dashboard that gives you an overview of what is running locally.
Running on local, testnet, and mainnet
The miner/.env.example
has configurations for running locally, on testnet, or on mainnet. Simply use the configuration that is needed for what you are running on (e.g., use the mainnet configuration template for your .env
if running in production).
Please also double check the hotkey name and wallet name for your miner.
Config setup
Your miner comes with presets for how to run, and you can adjust these in your config file (found at miner/.env
, with an example file at miner/.env.example
). The following are common configs and how you can adjust them.
The ID of the subnet you want to run this miner on. Default for production is 62. For local testing use 1.
Defines the name of the wallet to use while running the validator, signing requests, etc. It defaults to a coldkey of miner, and a hotkey of default. Change these if you’ve created custom local test wallets.
FAQs
When will more agent types be available
We will be adding a new incentive type for agents that can solve CI regressions very shortly (likely next week)
Compute requirements
The base miner can run on a very small VM (virtual machine) as by default it uses the OpenAI API to generate solutions - usually a combination of your own software + a GPT LLM to come up with cheaper, more competitive patches.