Rikugan 六眼

A reverse-engineering AI agent for IDA Pro and Binary Ninja that lives inside your disassembler.

Generator-based Loop 4-Phase Exploration 63+ Tools 12 Skills 6 LLM Providers
Get Started Read the Docs Architecture Reference
Binary Ninja Rikugan in Binary Ninja
IDA Pro Rikugan in IDA Pro
Philosophy
Not another MCP client.

Rikugan is a full agent — its own agentic loop, context management, role prompt, and in-process tool orchestration. It doesn't talk to your disassembler through a server — it lives inside it.

User Message
LLM Stream
Tool Execution
Yield Events
Next Turn
Features
Everything you need for AI-assisted RE
🔧
63+ Native Tools
Navigation, decompiler, disassembly, xrefs, strings, annotations, type engineering, microcode/IL read+write, and scripting — all callable by the agent.
🎯
12 Built-in Skills
Malware analysis, deobfuscation, vulnerability audit, driver analysis, CTF solving, and more. Create your own custom skills too.
🤖
6 LLM Providers
Anthropic (Claude), OpenAI, Google Gemini, MiniMax, Ollama for local inference, and any OpenAI-compatible endpoint.
🔍
Exploration Mode
4-phase autonomous flow: Explore the binary, Plan modifications, Execute patches, Save with approval gate. Full undo support.
📋
Plan Mode
Multi-step workflows with plan generation, user approval, and step-by-step execution with progress tracking.
↩️
Mutation Undo
Every database mutation is tracked with reverse operations. Type /undo to roll back renames, comments, type changes, and more.
💬
Multi-Tab Chat
Multiple independent conversations per file. Fork sessions to branch analysis from a checkpoint. Auto-save across restarts.
🔌
MCP Client
Connect external MCP servers — their tools appear alongside built-in ones. Full JSON-RPC 2.0 with heartbeat monitoring.
🛡️
Script Approval
execute_python always asks permission. See the full code with syntax highlighting before allowing execution.
📤
Chat Export
Export conversations to Markdown with syntax-highlighted code blocks. Tool calls formatted with proper language tags.
🧠
Persistent Memory
RIKUGAN.md stores facts per binary. Findings persist across sessions. The agent remembers what it learned before.
Skills
Specialized analysis workflows

Type / to see available skills with autocomplete. Create custom skills in your user directory.

/malware-analysisWindows PE malware triage, IOCs, ATT&CK
/linux-malwareELF malware analysis & persistence
/deobfuscationString decryption, CFF, opaque predicates
/vuln-auditBuffer overflows, fmt strings, memory safety
/driver-analysisWindows kernel driver analysis
/ctfCapture-the-flag challenge solving
/generic-reGeneral reverse engineering
/ida-scriptingIDAPython API reference
/binja-scriptingBinary Ninja Python API
/modifyAutonomous binary modification
/smart-patch-idaIDA-specific binary patching
/smart-patch-binjaBN-specific binary patching
Exploration Mode
Deep binary analysis with subagents

Type /explore — the agent maps the binary, then spawns isolated subagents to analyze different areas in parallel.

1
ORIENT
Reads imports, exports, strings, key functions — builds a map of the binary
2
DELEGATE
Spawns subagents with focused tasks: "analyze this function", "trace this struct"
3
ANALYZE
Subagents run in complete isolation — independent instances with zero prior context
4
SYNTHESIZE
Orchestrator collects findings, renames functions, delivers a full analysis report
Natural Language Patching
Modify binaries with natural language

A binary is code, code is text, and LLMs are good at text. /modify does what agentic coding does for source — on compiled binaries.

You type
/modify make this maze game easy, let me walk through walls
1
EXPLORE
Investigate the binary, understand its structure and logic
2
PLAN
Synthesize findings into a concrete patch plan for your review
3
PATCH
Apply IL-level writes and byte patches in-memory
4
SAVE
User approval gate before persisting changes to file
Deobfuscation
Deobfuscate binaries smartly

/deobfuscation reads the IL, identifies the technique, and uses IL write primitives to undo it — with your review before every patch.

🔀
CFF Removal
Dispatcher loops with state variables
👁
Opaque Predicates
Always-true/false conditions, algebraic & call-based
🧮
MBA Simplification
Complex expressions that reduce to trivial ops
🗑
Junk Code
Dead stores and instructions with no effect
IL Read
get_ilget_cfgtrack_variable_ssa
IL Write
il_replace_expril_set_conditionil_nop_expril_remove_blockpatch_branchwrite_bytesinstall_il_workflow
CFF Removal Demo
Providers
Choose your LLM

Switch providers anytime from the settings panel. Supports prompt caching, retry logic, and streaming.

Anthropic
Claude • OAuth auto-detect • Prompt caching
OpenAI
GPT-4o, o1, o3 • Standard SDK
Google Gemini
Gemini Pro • google-genai SDK
MiniMax
M2.5 / M2.5 Highspeed
Ollama
Local inference
OpenAI-Compatible
Any custom endpoint • Custom base URL
Under the Hood
Deeply engineered internals

Rikugan has a sophisticated architecture built for reliability, extensibility, and safety.

🔄
Agentic Loop
Generator-based turn cycle with streaming events
📡
TurnEvent System
23 event types for UI communication
🧰
Tool Framework
@tool decorator, coercion, timeout, categories
🔍
Subagents
Isolated context for parallel task execution
↩️
Mutation Tracking
Full reverse operation for every mutation
📊
Context Window
Auto-compaction at 80% threshold
🧵
Thread Safety
@idasync marshalling, queue-based answers
💾
Session Persistence
Auto-save/restore across restarts
🛡️
Error Recovery
Retry with backoff, consecutive error tracking
📝
Structured Logging
JSONL + debug file + IDA output

Ready to get started?

Clone the repo, run the installer, and start reversing with AI.

Installation Guide View on GitHub