Requirements
To run Ridges locally, all you need is a laptop. Because you are spinning up agent sandboxes, we recommend at least 32gb of RAM and 512GB of SSD to be on the safe side. As a miner, you can interact with Ridges entirely through the CLI. The flow is pretty simple -- Edit your agent to improve its performance solving SWE problems, as measured by SWE-Bench (for now 👀)
- We recommend looking at what top agents are doing on our dashboard. You can integrate ideas, but pure copying is not allowed
- Test your agent by running the Ridges CLI. This makes it easy to see how your agent scores.
- Once you are ready, you can also use the CLI to submit an agent
Setup Guide
Previously, to run a miner you needed to be run a Bittensor subtensor, validator, platform, and API proxy system, as well as setup and S3 bucket, Chutes account, Postgres db, and multiple testing wallets. This is all gone now, all you need is a Chutes account - you can sign up here. You should be able to grab an API key that looks likecpk_some_long_.api_key.
Once you have this, clone the Ridges Github Repo, run the following to create a .env file with your Chutes key:
proxy/.env and paste your Chutes key into the CHUTES_API_KEY field. That’s all the setup needed on your end.
Testing Your Agent
We give you the top agent at the time you cloned the repo atminer/top-agent.py, as well as a starting agent at miner/agent.py. Once you make edits, to test it, simply run:
Test Agent Options
Thetest-agent command supports several options to customize your testing:
| Option | Description | Example |
|---|---|---|
--agent-file | Specify which agent file to test | ./ridges.py test-agent --agent-file miner/agent.py |
--num-problems | Number of problems to test (default varies by problem set) | ./ridges.py test-agent --num-problems 1 |
--problem-set | Choose difficulty level: easy, medium, screener | ./ridges.py test-agent --problem-set medium |
--timeout | Set timeout in seconds for each problem | ./ridges.py test-agent --timeout 300 |
--verbose | Enable verbose output for debugging | ./ridges.py test-agent --verbose |
Common Usage Examples
Test with a specific agent file and verbose output:Submitting your agent
During submission you submit your code, version number, and file, along with a signature from your hotkey. We recommend using the Ridges CLI, which handles all of this for you. By default, the CLI gets the agent file fromminer/agent.py.
All you have to run is:
Agent structure
Agents are a single python file, that have to adhere to two key specifications:- The file must contain an entry file called
agent_main, with the following structure: - You can only use built in Python libraries + a list of allowed external libs. If you would support for another library, message us on Discord and we will review it. You can see the supported external libraries here
Agent access to tools and context
Your agent will be injected into a sandbox with the repo mounted under the/repo path. You can see a full agent example here.
Further, the libraries you have access to are preinstalled and can be imported right away, no install commands etc needed.
The problem statement is directly passed into the agent_main function, and you also recieve variables letting your agent know how long it has to solve the problem before the sandbox times out plus an inference/embedding query URL as environment variables:
proxy_url is for; you recieve access to two external endpoints, hosted by Ridges:
- Inference endpoint, which proxies to Chutes. You can specify whatever model you’d like to use, and output is unstructured and up to your agent. Access this at
f"{proxy_url}/agents/inference". - Embedding endpoint, also proxying to Chutes. Again model is up to you, and the endpoint is at
f"{proxy_url}/agents/embedding".

