╭─────────────────────────────────╮
│ ,______ .______ .______ ,___ │
╭──╮ │ : __ \ \____ |: \ : __| │
│ _│_ │ | \____|/ ____|| _,_ || : | │
│ O O < | : \ \ . || : || | │
│ │╷ │ | |___\ \__:__||___| || | │
│ ││ │ |___| : |___||___| │
│ ─╯│ ╰─────────────────────────────────╯
╰───╯
This repository contains two plugins for radare2:
If you are looking to use radare2 with other agents via MCP:
If you are looking for a radare2 focused autonomous agent:
[0x00000000]> r2ai -q
explain: Explain the current function -
devices: Find and explain devices used -
libs: Group imports by Libraries -
varnames: Better variable names -
autoname: Automatically suggest a better name for this function -
vulns: Find vulnerabilities or bugs in the current function -
signature: Suggest an improved function signature -
dlopen: List libraries loaded with dlopen - Some libraries are loaded
decompile: Augmented decompilation based on LLM -
[0x00000000]>
The recommended way to install any of the r2ai components is via r2pm:
$ r2pm -Uci r2ai
$ r2pm -Uci decai
r2 -qc r2air2pm -r r2aiDrop your API keys in environment variables or use the configuration file:
$ export ANTHROPIC_API_KEY=sk-ant-api03-CENSORED
$ export OPENAI_API_KEY=sk-proj-6rlSPS-zN1v...
Or edit the api keys file ~/.config/r2ai/apikeys.txt run:
You may customize and save your configuration settings using your OS's default settings file (e.g ~/.radare2rc on Linux).
For example, the following configuration sets Claude 3.7 by default, with max output tokens to 64000.
then you can type the commands you want to run when the r2ai plugin is loaded:
r2ai -e api=anthropic
r2ai -e model=claude-3-7-sonnet-20250219
r2ai -e max_tokens=64000