PyVision: Agentic Vision with Dynamic Tooling
Shitian Zhao, Haoquan Zhang, Shaoheng Lin, Ming Li, Qilong Wu, Kaipeng Zhang, Chen Wei
TL;DR
PyVision introduces an agentic, multi-turn framework that lets multimodal LLMs dynamically generate and execute Python-based tools to solve visual reasoning tasks. By replacing static toolchains with on-the-fly, task-tailored tooling and a robust runtime loop, the approach yields consistent, model-dependent performance gains across diverse benchmarks. The work provides a taxonomy of generated tools and analyzes how tool usage varies with domain and task, demonstrating that dynamic tooling amplifies the strengths of the backend model. These findings suggest a shift toward genuinely autonomous visual reasoning where models invent and refine computational aids as needed. Practically, PyVision improves capability in perception-heavy and abstract-reasoning tasks and highlights the importance of cross-turn code generation and safe runtime execution for scalable multimodal reasoning.
Abstract
LLMs are increasingly deployed as agents, systems capable of planning, reasoning, and dynamically calling external tools. However, in visual reasoning, prior approaches largely remain limited by predefined workflows and static toolsets. In this report, we present PyVision, an interactive, multi-turn framework that enables MLLMs to autonomously generate, execute, and refine Python-based tools tailored to the task at hand, unlocking flexible and interpretable problem-solving. We develop a taxonomy of the tools created by PyVision and analyze their usage across a diverse set of benchmarks. Quantitatively, PyVision achieves consistent performance gains, boosting GPT-4.1 by +7.8% on V* and Claude-4.0-Sonnet by +31.1% on VLMsAreBlind-mini. These results point to a broader shift: dynamic tooling allows models not just to use tools, but to invent them, advancing toward more agentic visual reasoning.
