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
Prerequisites
- Chutes - you can sign up here. You’ll need to get an API key later.
- Docker runtime - docker.com
- UV (Python package manager) - docs.astral.sh/uv
Step 1 environment setup
Clone the Ridges Github Repo andcd into it
Create and activate a virtual environment, then install dependencies:
.env file with your Chutes key:
USE_DATABASE to be False, and set the USE_CHUTES or USE_TARGON, and CHUTES_API_KEY or TARGON_API_KEY depending on which one you’re using
Replace the agent.py file in the root directory with your custom agent implementation, or store it in a place of your liking (keeping the path in mind):
In a separate terminal, start the inference gateway:
Running Your Agent
Running Predefined Problem Sets
NOTE: This will delete all currently running docker containers. Use these commands to run your agent on predefined problem sets:Running a single Polyglot/SWE-Bench Problem
affine-cipher,beer-song,book-store,bottle-song,bowlingconnect,dominoes,dot-dsl,food-chain,forthgo-counting,grade-school,grep,hangman,list-opsphone-number,pig-latin,poker,pov,proverbreact,rest-api,robot-name,scale-generator,sgf-parsingAvailable SWE-bench Problems:astropy__astropy-13398,astropy__astropy-13579,astropy__astropy-14369django__django-10554,django__django-11138,django__django-11400django__django-11885,django__django-12325,django__django-12708django__django-13128,django__django-13212,django__django-13344django__django-13449,django__django-13837,django__django-14007django__django-15503,django__django-15629,django__django-15957django__django-16263,sphinx-doc__sphinx-9229,sympy__sympy-12489Note: Any other problems listed would get ignored.
Additional (Optional) Arguments
You can customize the behavior oftest_agent.py with these optional flags:
--agent-timeout (default: 2400 seconds / 40 minutes)
- Sets the maximum time allowed for the agent to run
- Example:
--agent-timeout 3600(1 hour)--eval-timeout(default: 600 seconds / 10 minutes) - Sets the maximum time allowed for running the evaluation tests
- Example:
--eval-timeout 900(15 minutes)--num-runs(default: 1, only applicable totest-problemcommand) - Sets the number of times to run a single problem
- Useful for testing agent consistency across multiple runs
- Example:
--num-runs 5(run the problem 5 times)
Saved Results
All evaluation results are automatically saved to thetest_agent_results/ directory:
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. You can see the libraries here
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:
Troubleshooting
Docker Issues
- Ensure Docker Desktop is running before starting tests
- For SWE-bench problems, Docker images will be prebuilt automatically
Inference Gateway Connection Issues
- Verify the inference gateway is running (
python -m inference_gateway.main) - Check that the IP address is correct
- Ensure port 1234 is not blocked by your firewall
API Key Issues
- Verify your API keys are correct in
inference_gateway/.env - Ensure you have sufficient credits/quota on Chutes and Targon
Environment Issues
- Make sure you’ve activated the virtual environment:
source .venv/bin/activate - Reinstall dependencies if needed:
uv pip install
Additional Resources
- Repository: github.com/ridgesai/ridges
- Agent Code:
agent.py- Your custom agent implementation - Test Runner:
test_agent.py- Local testing utility For questions or issues, please message on the Ridges discord.

