Overview
Run Claude Code with the Agentic Algorithm Engineering skill on a graph algorithm codebase, so each optimization starts as a testable hypothesis, is benchmarked and checked for correctness, then kept or reverted.
Problem or Objective
- Which agents search for faster algorithms or new mathematical constructions?
- Which agents run and log experiments without supervision?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code · Agentic Algorithm Engineering · Git
- Prerequisites
- Claude Code with the AAE plugin or a clone of its repository, a repeatable benchmark and a correctness check for your code, and Python 3 with LaTeX if you want the PDF report.
How It Works
Install the Agentic Algorithm Engineering (AAE) plugin in Claude Code with the commands in the project's README, or clone it into your skills folder as the README shows. Work on a branch or a disposable copy of your graph code. Start the skill and say what should get faster or better. In setup, agree on the benchmark, the metric, the correctness assertions and an experiment count or time budget, and tell the agent to wait for your approval of that setup before it changes code. The documented cycle then states a falsifiable hypothesis with a predicted effect, makes a minimal change committed to Git with the assertions checked, runs the benchmark, and keeps the change only if it is better and still correct, otherwise reverts it. Afterwards, read the numbered patches in patches/ and the report, rerun the benchmark yourself on inputs the agent did not tune on, and apply or merge only the patches you approve.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code.
- Connect the toolsConnect the tools this workflow relies on: Claude Code, Agentic Algorithm Engineering, Git.
- Check the prerequisitesClaude Code with the AAE plugin or a clone of its repository, a repeatable benchmark and a correctness check for your code, and Python 3 with LaTeX if you want the PDF report.
- Gather your detailsCollect what the prompt asks for: Code folder, Benchmark command, Metric to improve, Correctness rule, Experiment limit.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at github.com before you rely on it.
Practical Starter Prompt: Run a hypothesis-driven optimization session
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Use Agentic Algorithm Engineering on the code in [Code folder], on a new branch. The benchmark command is [Benchmark command] and the metric is [Metric to improve]. Results count as correct only if [Correctness rule]. Run at most [Experiment limit] experiments. Before changing any code, show me the benchmark, metric, correctness assertions and budget and wait for my approval. For every experiment, write the hypothesis and predicted effect before measuring, keep one patch per accepted change, and revert anything that fails the check. Do not push, merge or publish; leave the patches and report for me to review.Approve the setup before the loop starts, keep the run on a branch or copy, and read each patch before you apply or merge it yourself.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The AAE README and project page document the setup agreement, the hypothesis cycle, the patches and the report, and publish the authors' own results on open-source codes, which were not reproduced here. Whether your algorithm improves is for your own benchmarks to show.
Limitations and Considerations
The README also describes ways to keep the loop running unattended, including starting an agent with permission prompts switched off; for Codex it says to do that only in a trusted, externally isolated environment. For a first run keep prompts on, or use a disposable container that holds no credentials. The README says the PDF report needs Python 3 and LaTeX, and that without LaTeX the session still keeps the patches. A correctness assertion proves only what it checks, and a gain on one machine and input set may not carry over to another. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
Original Implementation
The code published by the people behind this use case.
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)chszlab.github.io
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- CHSZLab/AgenticAlgorithmEngineering README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 2 Dec 2026, 16:40 UTC
What this source supports
- The agent first agrees with you on the benchmark, the metric, the correctness checks and the budget, then runs the loop on its own and leaves the accepted patches and a report.
- Use it in a trusted, externally isolated environment such as a dedicated container or VM.
- Agentic Algorithm Engineering (AAE) (opens in a new tab)
Project documentation · chszlab.github.io · Undated · Source checked 2 Dec 2026, 16:40 UTC
What this source supports
- A skill for Claude Code and Codex, from the Algorithm Engineering Group at Heidelberg University.
- Run the benchmark; keep the change only if it is better and still correct, otherwise revert.
- anthropics/claude-code README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 2 Dec 2026, 13:21 UTC
What this source supports
- Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows -- all through natural language commands.
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 2 Dec 2026, 13:21 UTC
What this source supports
- Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.

