blog/run-capsules-capture-without-code-changes
TechnicalMay 1, 2026

Run capsules: capture without code changes

The NovaFabric Python SDK patches LLM API call sites and HTTP transports at import time. Here is how it works and what gets captured.


One of the hardest constraints in building NovaFabric was the requirement to capture AI-agent executions without requiring developers to change their code. Adding decorators or wrapping every LLM call manually is friction that prevents adoption. Instead, the SDK intercepts at the transport layer.

How capture works

When you run a Python process with NovaFabric, the SDK monkey-patches the HTTP clients used by popular AI frameworks (OpenAI, Anthropic, LangChain, LlamaIndex) before any application code runs. Every outgoing request to a model provider is intercepted, recorded, and written to the capsule directory.

$ nova capture python agent.py

  capsule   ─ a1b2c3d4
  trace.jsonl        ✓   324 spans
  model-calls.jsonl  ✓   8 LLM calls
  tool-calls.jsonl   ✓   12 tool invocations
  env.json           ✓   sanitised environment
  dsse signature     ✓

What gets captured

  • Every model call: prompt, response, token counts, latency, model version
  • Tool invocations: name, input, output, duration
  • OpenTelemetry spans via the GenAI semantic conventions
  • Sanitised environment snapshot (API keys redacted)
  • Process metadata: Python version, installed packages, working directory

The resulting capsule is a plain directory of JSON files. No proprietary format, no vendor lock-in. A capsule written today will be readable by any text editor in a decade.

capsulespythonSDKcapture
← all posts