How daadaismylife/revagent works
revagent is an autonomous Dreamhack reverse-engineering agent. A user supplies a challenge directory; the CLI starts a bounded ReAct solve loop that consults an OpenAI-compatible Qwen service and dispatches analysis, execution, solving, and verification tools. Findings persist in a case file and transcript; the run ends with a verified flag, an unsolved result, or a human runbook. The graph retains README-documented capabilities even where implementation excerpts were unavailable; those links cite the README rather than implying sampled code inspection.
Main entry points: base.py Tool context · agent.py ReAct agent · __main__.py CLI and results · casefile.py Case memory
Components 27
Run entry
- CLI and results
revagent/__main__.py - Sandbox runner
revagent/sandbox.py
Agent loop
- ReAct agent
revagent/agent.py - Qwen client
revagent/llm.py - Tool context
revagent/tools/base.py
Run memory
- Case memory
revagent/casefile.py - Context compaction
revagent/context.py - Console logging
revagent/console.py - Transcript critic
revagent/critic.py - Loop detectors
revagent/detectors.py - Action gate
revagent/gate.py - Output truncation
revagent/truncate.py
Reverse engineering
- Ghidra decompile
revagent/tools/decompile.py - Ghidra integration
revagent/ghidra.py - Function oracle tool
revagent/tools/emulate.py - Unicorn emulator
revagent/emulate.py
Challenge tools
- Shell analysis
revagent/tools/bash.py - Binary runner
revagent/tools/run_binary.py - GUI runner
revagent/tools/run_gui.py - Constraint solver
revagent/tools/solve_check.py - Flag verification
revagent/tools/submit_flag.py - Runbook handoff
revagent/tools/handoff_runbook.py - Notes tool
revagent/tools/notes.py - Summarize tool
revagent/tools/summarize.py - Ask user tool
revagent/tools/ask_user.py
Other components
- Challenge user
- Qwen vLLM
Connections 31
- Challenge user → CLI and results: starts solve
README.md - CLI and results → Sandbox runner: runs isolated
README.md - CLI and results → ReAct agent: starts loop
revagent/__main__.py - CLI and results → Qwen client: loads client
revagent/__main__.py - CLI and results → Console logging: tees output
README.md - ReAct agent → Qwen client: requests completion
revagent/agent.py - Qwen client → Qwen vLLM: streams prompts
README.md - ReAct agent → Tool context: dispatches tools
revagent/agent.py - ReAct agent → Case memory: records run state
revagent/agent.py - ReAct agent → Context compaction: compacts history
revagent/agent.py - Context compaction → Case memory: updates memory
revagent/context.py - ReAct agent → Transcript critic: requests critique
revagent/agent.py - ReAct agent → Action gate: checks tool calls
revagent/agent.py - Action gate → Loop detectors: uses signals
revagent/gate.py - ReAct agent → Output truncation: truncates output
revagent/agent.py - Tool context → Ghidra decompile: exposes tool
README.md - Ghidra decompile → Ghidra integration: invokes
revagent/tools/decompile.py - Tool context → Function oracle tool: exposes tool
README.md - Function oracle tool → Unicorn emulator: calls oracle
revagent/tools/emulate.py - Tool context → Shell analysis: exposes tool
README.md - Tool context → Binary runner: exposes tool
README.md - Tool context → GUI runner: exposes tool
README.md - Tool context → Constraint solver: exposes tool
README.md - Tool context → Flag verification: exposes tool
README.md - Tool context → Runbook handoff: exposes tool
README.md - Tool context → Notes tool: exposes tool
README.md - Tool context → Summarize tool: exposes tool
README.md - Tool context → Ask user tool: exposes tool
README.md - Binary runner → Case memory: records observations
README.md - GUI runner → Case memory: records observations
revagent/tools/run_gui.py - Flag verification → CLI and results: returns run result