How aaronemmatty/apexcode_college_round works
AgentBreak is a controlled harness for attacking a synthetic tool-using agent, evaluating security invariants, comparing defenses, and inspecting reproducible traces. The main workflow runs from the web workbench through the API and trial orchestrator to scenario loading, agent/tool execution, evaluation, and persisted results; users then inspect or compare outcomes. Major documented branches include adaptive attack discovery, permission audits, replay, and Markdown reporting. Some connections rely on README statements or SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: orchestrator.py Trial orchestrator · api API endpoints · pages Workbench views · evaluator.py Invariant evaluator
Components 26
Web workbench
- Workbench routes
frontend/src/App.tsx - Workbench views
frontend/src/pages - Typed API client
frontend/src/api/client.ts - Trace visualizations
frontend/src/components
API and orchestration
- FastAPI entry
backend/app/main.py - API endpoints
backend/app/api - Trial orchestrator
backend/app/orchestrator.py - Campaign discovery
backend/app/discovery/campaign.py
Trial execution
- Scenario loader
backend/app/attacks/loader.py - Task registry
backend/app/agent/tasks.py - Scripted agent
backend/app/agent/agent.py - Ollama agent
backend/app/agent/ollama.py - Agent connector
backend/app/agent/adapter.py - Tool execution
backend/app/agent/executor.py - Mock tool sandbox
backend/app/sandbox/tools.py - Synthetic documents
backend/app/sandbox/data.py
Security analysis
- Security gateway
backend/app/gateway - Invariant evaluator
backend/app/evaluator/evaluator.py - Permission audit
backend/app/sandbox/audit.py - Metrics and reports
backend/app/reports/metrics.py
Trace and state
- Trace event contract
backend/app/events.py - Run and trace store
backend/app/db/models.py - Database sessions
backend/app/db/session.py - Replay capability
backend/app/replay
Other components
- Security tester
- Local Ollama service
Connections 29
- Security tester → Workbench routes: uses
- Workbench routes → Workbench views: routes to
frontend/src/App.tsx - Workbench views → Typed API client: requests data
frontend/src/pages/AttackLab.tsx - Workbench views → Trace visualizations: renders traces
frontend/src/pages/AttackLab.tsx - Typed API client → API endpoints: calls API
- FastAPI entry → API endpoints: registers routes
backend/app/main.py - API endpoints → Trial orchestrator: starts trials
backend/app/api/custom_attack.py - API endpoints → Campaign discovery: starts campaigns
backend/app/api/campaigns.py - Campaign discovery → Trial orchestrator: runs trials
backend/app/api/campaigns.py - Trial orchestrator → Scenario loader: loads attacks
backend/app/orchestrator.py - Scenario loader → Task registry: builds task specs
backend/app/attacks/loader.py - Task registry → Scenario loader: loads scenarios
backend/app/agent/tasks.py - Trial orchestrator → Scripted agent: runs agent
backend/app/orchestrator.py - Trial orchestrator → Ollama agent: selects backend
backend/app/orchestrator.py - Trial orchestrator → Agent connector: selects connector
backend/app/orchestrator.py - Scripted agent → Tool execution: executes requests
backend/app/agent/agent.py - Tool execution → Mock tool sandbox: invokes tools
- Mock tool sandbox → Synthetic documents: reads data
backend/app/sandbox/tools.py - Trial orchestrator → Security gateway: configures defenses
backend/app/orchestrator.py - Trial orchestrator → Invariant evaluator: evaluates trial
backend/app/orchestrator.py - Invariant evaluator → Synthetic documents: checks sandbox state
backend/app/evaluator/evaluator.py - Invariant evaluator → Permission audit: assesses capabilities
- API endpoints → Permission audit: serves audit
- Trial orchestrator → Trace event contract: records events
backend/app/orchestrator.py - Trial orchestrator → Run and trace store: persists results
backend/app/orchestrator.py - Database sessions → Run and trace store: creates tables
backend/app/db/session.py - API endpoints → Replay capability: supports replay
- API endpoints → Metrics and reports: exports reports
- Ollama agent → Local Ollama service: queries model