How karthik1319/the-courtroom works
The Courtroom takes a Python file and runs it through a prosecutor, defense, and judge. The prosecutor analyzes the code, searches Tavily for vulnerability precedent, and returns findings with an exploit; the defense generates a patch and verification script, then the sandbox executes that script; the judge uses the transcript and actual sandbox result to produce a verdict. The README also describes live Nebius model and sandbox services. Evidence comes from the README and sampled source; edges to external services are documented or visible in the client calls.
Main entry points: main.py Trial runner · config.py Credentials and model config · prosecutor.py Vulnerability analysis · defense.py Patch and retest
Components 12
Trial workflow
- Trial runner
main.py - Vulnerability analysis
agents/prosecutor.py - Precedent search
tools/search.py - Patch and retest
agents/defense.py - Code execution
tools/sandbox.py - Verdict
agents/judge.py
External services
- Nebius model API
- Nebius sandbox service
- Tavily search API
Runtime support
- Credentials and model config
config.py - Transcript output
main.py
Other components
- Code auditor user
Connections 17
- Code auditor user → Trial runner: submits file
README.md - Trial runner → Vulnerability analysis: analyzes code
main.py - Vulnerability analysis → Precedent search: searches precedent
agents/prosecutor.py - Precedent search → Tavily search API: queries
tools/search.py - Vulnerability analysis → Nebius model API: requests analysis
agents/prosecutor.py - Trial runner → Patch and retest: requests patch
main.py - Patch and retest → Code execution: runs test
agents/defense.py - Code execution → Nebius sandbox service: executes remotely
tools/sandbox.py - Patch and retest → Nebius model API: requests patch
agents/defense.py - Trial runner → Verdict: requests verdict
main.py - Verdict → Nebius model API: requests ruling
agents/judge.py - Trial runner → Transcript output: prints transcript
main.py - Vulnerability analysis → Credentials and model config: gets model client
agents/prosecutor.py - Patch and retest → Credentials and model config: gets model client
agents/defense.py - Verdict → Credentials and model config: gets model client
agents/judge.py - Precedent search → Credentials and model config: reads API key
tools/search.py - Code execution → Credentials and model config: reads credentials
tools/sandbox.py