How rmjohnson12/ctf_agents works
CTF_Agents is an authorized CTF-solving framework. Its main workflow accepts a natural-language or structured challenge, parses and classifies it, routes work through a coordinator to a specialist, runs bounded tools or playbooks, and records evidence before reporting a verified result or failure. The graph also preserves recovery synthesis, persistent knowledge, live reporting, and the Hack The Box integration. Several subsystem links come from README descriptions; unsampled implementations are represented at their existing directory paths, without asserting internal call details.
Main entry points: coordinator_agent.py Coordinator · specialists Specialist agents · main.py Structured CLI · runtime_synthesis.py Runtime synthesis
Components 23
Entry and routing
- Natural-language CLI
ask.py - Structured CLI
main.py - Challenge parser
challenges/challenge_parser.py - Coordinator
agents/coordinator/coordinator_agent.py - Agent registry
agents/registry.py - Challenge classifier
core/decision_engine/classifier.py - LLM reasoner
core/decision_engine/llm_reasoner.py
Challenge agents
- Specialist agents
agents/specialists - Support agents
agents/support - Agent interface
agents/base_agent.py
Tools and recovery
- Tool runner
tools/common/runner.py - Python tool
tools/common/python_tool.py - Web tools
tools/web - Runtime synthesis
core/runtime_synthesis.py
Evidence and reporting
- Knowledge store
core/knowledge_base/knowledge_store.py - Solve trace store
core/knowledge_base/solve_trace_store.py - Result persistence
core/utils/result_manager.py - Flag validation
core/utils/flag_utils.py - Target and data security
core/utils/security.py - Progress reporter
core/reporting/client.py - Reporting service
core/reporting/server.py
Platform integration
- Hack The Box integration
integrations/hackthebox
Other components
- CTF operator
Connections 23
- CTF operator → Natural-language CLI: submits challenge
README.md - CTF operator → Structured CLI: supplies JSON
README.md - Structured CLI → Challenge parser: parses input
main.py - Structured CLI → Coordinator: starts solve
main.py - Coordinator → Challenge classifier: classifies challenge
- Coordinator → LLM reasoner: requests decisions
agents/coordinator/coordinator_agent.py - Coordinator → Agent registry: routes to agents
- Agent registry → Specialist agents: registers specialists
agents/specialists/web_exploitation/web_agent.py - Coordinator → Specialist agents: dispatches work
README.md - Specialist agents → Agent interface: implements interface
agents/base_agent.py - Specialist agents → Web tools: uses web tools
agents/specialists/web_exploitation/web_agent.py - Specialist agents → Tool runner: runs commands
- Coordinator → Runtime synthesis: requests recovery
agents/coordinator/coordinator_agent.py - Runtime synthesis → Python tool: executes compute
core/runtime_synthesis.py - Runtime synthesis → Web tools: fetches observations
core/runtime_synthesis.py - Coordinator → Knowledge store: uses shared knowledge
agents/coordinator/coordinator_agent.py - Coordinator → Solve trace store: reads solve traces
agents/coordinator/coordinator_agent.py - Coordinator → Result persistence: persists results
agents/coordinator/coordinator_agent.py - Specialist agents → Flag validation: checks flags
agents/specialists/reverse_engineering/reverse_agent.py - Web tools → Target and data security: checks target access
tools/web/dirsearch.py - Coordinator → Progress reporter: sends progress
agents/coordinator/coordinator_agent.py - Progress reporter → Reporting service: posts updates
- CTF operator → Hack The Box integration: uses platform