How ronakparmar11/buildingblocks_maharashtra_round works
Black Box records AI-agent task executions, then helps engineers locate a failing step, verify blame through replay, and assess or apply targeted repairs. The main workflow runs an agent under tracing, persists runs and steps, and exposes them for inspection; replay can reuse prior work with overrides. Separate capabilities support fault injection, feature-based failure prediction, evaluation, and a web UI. The excerpts show core replay, tracing, retrieval, and persistence behavior; several API and analysis modules are represented from the source index, so their internal links are limited to documented references.
Main entry points: engine.py Replay Engine · app.py HTTP API · db.py SQLite Store · tracer.py Execution Tracer
Components 23
User Experience
- Web Console
frontend/src/App.tsx - HTTP API
blackbox/api/app.py - Run Views
blackbox/api/runs.py - Compare and Eval
blackbox/api/compare.py - Fleet and Lab
blackbox/api/fleet.py - Replay API
blackbox/api/replay.py
Agent Execution
- Task Agent
blackbox/agent/agent.py - Passage Retrieval
blackbox/corpus/retriever.py - Execution Tracer
blackbox/sdk/tracer.py - Execution Context
blackbox/sdk/context.py
Failure Diagnosis
- Fault Injection
blackbox/faults/inject.py - Feature Extraction
blackbox/features/extract.py - Blame Verification
blackbox/labeling/counterfactual.py - Failure Prediction
blackbox/model/predict.py - Evaluation
blackbox/model/evaluate.py
Replay and Repair
- Replay Engine
blackbox/replay/engine.py - Targeted Repair
blackbox/repair/repair.py
Data and Integrations
- LLM Clients
blackbox/llm/base.py - Call Cassette
blackbox/sdk/cassette.py - Run Repository
blackbox/store/repo.py - SQLite Store
blackbox/store/db.py - Settings
blackbox/config.py
Other components
- Engineer
Connections 31
- Engineer → Web Console: inspects runs
- Web Console → HTTP API: requests data
- HTTP API → Run Views: registers routes
blackbox/api/app.py - HTTP API → Compare and Eval: registers routes
blackbox/api/app.py - HTTP API → Fleet and Lab: registers routes
blackbox/api/app.py - HTTP API → Replay API: registers routes
blackbox/api/app.py - HTTP API → SQLite Store: initializes
blackbox/api/app.py - Replay API → Replay Engine: invokes replay
blackbox/api/replay.py - Replay API → Targeted Repair: invokes repair
blackbox/api/replay.py - Replay Engine → Task Agent: runs task
blackbox/replay/engine.py - Replay Engine → Passage Retrieval: gets retriever
blackbox/replay/engine.py - Replay Engine → Execution Context: builds context
blackbox/replay/engine.py - Replay Engine → Execution Tracer: creates tracer
blackbox/replay/engine.py - Task Agent → Execution Tracer: records steps
blackbox/agent/agent.py - Task Agent → Passage Retrieval: searches passages
blackbox/agent/agent.py - Execution Tracer → Call Cassette: caches calls
blackbox/sdk/tracer.py - Execution Tracer → Run Repository: persists steps
blackbox/sdk/tracer.py - Call Cassette → SQLite Store: reads and writes
blackbox/sdk/cassette.py - Run Repository → SQLite Store: persists records
- Execution Tracer → LLM Clients: requests completion
blackbox/sdk/tracer.py - Fault Injection → Task Agent: injects faults
blackbox/faults/inject.py - Feature Extraction → SQLite Store: reads run data
blackbox/features/extract.py - Blame Verification → Replay Engine: tests counterfactuals
blackbox/labeling/counterfactual.py - Failure Prediction → Feature Extraction: extracts features
blackbox/model/predict.py - Failure Prediction → SQLite Store: loads model data
blackbox/model/predict.py - Evaluation → Failure Prediction: evaluates predictions
blackbox/model/evaluate.py - Evaluation → Targeted Repair: evaluates repairs
blackbox/model/evaluate.py - Targeted Repair → Replay Engine: tries repairs
blackbox/repair/repair.py - Targeted Repair → Failure Prediction: uses prediction
blackbox/repair/repair.py - Settings → Passage Retrieval: configures retrieval
blackbox/corpus/retriever.py - Settings → SQLite Store: configures database
blackbox/store/db.py