Introducing wrapture
Simon Willison’s Weblog Simon Willison
Graham Dumpleton released Wrapture, a new Python tool that can trace or override functions. It matters because it can watch code without changing it, and its own code was written by an AI assistant.
Based on reporting by Simon Willison’s Weblog, Simon Willison — read the original for the full story.
Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error
Graham Dumpleton has put out Wrapture, a new Python library that takes the monkeypatching ideas behind wrapt and stretches them across testing and tracing at once. The pitch is simple enough: wrap a function or method, watch everything that passes through it, or swap in a different return value when needed.
That makes it useful in two directions. On one side, it works as an alternative to unittest.mock for tests. On the other, it gives you a way to attach tracing to code you don’t control, so you can record what flows through it without disturbing the program under observation.
Wrapture also includes OpenTelemetry support, plus a configuration-only setup for adding tracing to an existing Python project. Graham shows that with a compact config snippet that defines a summary capture, observes a Calculator target, and sends output to JSON lines in trace.jsonl.
The project is only a few weeks old, so this is early days. But there’s a more unusual detail here: every line of code and documentation in wrapture was written by an AI assistant under Graham’s direction. He is careful to draw a line between that and vibe coding, saying this was engineered deliberately by someone who already knew exactly what the result needed to be.
My take — AI-written commentary, not fact-checked reporting
This is the useful version of AI-assisted coding: a domain expert steering a tool, not a prompt goblin hoping for magic. The industry keeps pretending those are the same thing, which is how you get noisy demos and broken software. Wrapture looks more like the future than the hype reels do, and that alone is refreshing.
Read more about this at: Simon Willison’s Weblog
Related stories
Prime Intellect Releases Prime Agent: An Open-Source RLM Harness Where Sub-Agents Are Function Calls Inside Persistent IPython Kernel
MarkTechPost · 4 weeks ago ·
19
Google AI Introduces EnvHarness: A Programmable Layer That Turns Static Agent Environments Into Adaptive Training Worlds
MarkTechPost · 4 days ago ·
22