How dryxio/reagent works
ReAgent is an AI-assisted binary reverse-engineering tool: users select or plan functions, gather Ghidra and nearby-source evidence, generate and review candidate C/C++ implementations, then apply structural, build/test/runtime, and parity checks. The CLI and configuration layer support the workflow, while manifests, session history, checkpoints, and reports track progress. README documents several capabilities whose internal wiring was not sampled; those are shown at subsystem level, and uncertain call relationships are omitted.
Main entry points: single.py Single reversal · main.py CLI commands · loop.py Review and fix loop · registry.py Backend registry
Components 21
User entry
- CLI commands
src/re_agent/cli/main.py - Configuration
src/re_agent/config/loader.py
Target analysis
- Function planning
src/re_agent/core/target_plan.py - Backend registry
src/re_agent/backend/registry.py - Ghidra bridge
src/re_agent/backend/ghidra_bridge.py - Source context
src/re_agent/agents/source_context.py
Reconstruction
- Single reversal
src/re_agent/orchestrator/single.py - Review and fix loop
src/re_agent/agents/loop.py - Reverser agent
src/re_agent/agents/reverser.py - Checker agent
src/re_agent/agents/checker.py - LLM providers
src/re_agent/llm/registry.py
Validation
- Structural verifier
src/re_agent/verification/objective.py - Candidate validation
src/re_agent/verification/candidate.py - Parity analysis
src/re_agent/parity/engine.py
Progress and reports
- Session history
src/re_agent/core/session.py - Reports and coverage
src/re_agent/reports/coverage.py - Target manifest
src/re_agent/core/target_plan.py
Other components
- Engineer
- Target project
- Ghidra analysis
- LLM service or CLI
Connections 26
- Engineer → CLI commands: invokes
- CLI commands → Configuration: loads settings
- CLI commands → Function planning: plans targets
- Function planning → Backend registry: queries targets
- Function planning → Target manifest: exports plan
- CLI commands → Single reversal: starts reversal
- Single reversal → Backend registry: requests evidence
- Backend registry → Ghidra bridge: dispatches queries
- Ghidra bridge → Ghidra analysis: runs analysis
- Single reversal → Review and fix loop: runs loop
- Review and fix loop → Source context: gathers context
- Source context → Target project: reads source
- Review and fix loop → Reverser agent: requests candidate
- Review and fix loop → Checker agent: requests review
- Reverser agent → LLM providers: generates code
- Checker agent → LLM providers: reviews code
- LLM providers → LLM service or CLI: sends prompts
- Single reversal → Structural verifier: checks structure
- Single reversal → Candidate validation: validates candidate
- Candidate validation → Target project: builds and tests
- Single reversal → Parity analysis: checks parity
- Parity analysis → Backend registry: fetches Ghidra data
- Single reversal → Session history: records results
- CLI commands → Reports and coverage: reports status
- Reports and coverage → Session history: reads progress
- Reports and coverage → Target manifest: reconciles targets