---
title: "We now support VLMs in smolagents!"
description: "smolagents now supports vision language models, letting agents take images either once at start via `agent.run(..., images=[...])` (stored on the TaskStep) or dynamically per step through step callbacks that attach screenshots to `ActionStep.observations_images`."
url: "https://swe.quest/articles/we-now-support-vlms-in-smolagents-ba2750d94b0e21c9"
canonical: "https://huggingface.co/blog/smolagents-can-see"
source: "Hugging Face"
published: "2025-01-24"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["ai-agents","llms","computer-vision","python"]
---

# We now support VLMs in smolagents!

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-01-24, 10 min read, How-to. Original: [https://huggingface.co/blog/smolagents-can-see](https://huggingface.co/blog/smolagents-can-see)

## Summary

smolagents now supports vision language models, letting agents take images either once at start via \`agent.run(..., images=\[...\])\` (stored on the TaskStep) or dynamically per step through step callbacks that attach screenshots to \`ActionStep.observations\_images\`. The mechanism builds on the ReAct-style MultiStepAgent loop, where callbacks run after each action. A full walkthrough builds a vision web-browsing CodeAgent with helium/selenium, custom tools for going back, closing pop-ups and Ctrl+F search, and a screenshot callback that prunes older images to keep context lean. Using TransformersModel with a VLM requires \`flatten\_messages\_as\_text=False\`, and hard browsing tasks succeed more reliably with strong VLMs like Qwen2-VL-72B or GPT-4o.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- LLM agent basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Selenium

## Keywords

smolagents, helium, Selenium, Qwen2-VL, ReAct, SmolVLM, CodeAgent

## Related posts

- [ScreenSuite - The most comprehensive evaluation suite for GUI Agents!](https://swe.quest/articles/screensuite-the-most-comprehensive-evaluation-suite-for-gui-agents-f53b58b8ee14208b.md): Hugging Face · 2025-06-06 · Easy · 5 min read · Evaluation, AI agents, Computer vision
  ScreenSuite unifies 13 benchmarks for evaluating vision language models as GUI agents across perception, grounding, single-step actions and multi-step agentic tasks on mobile, desktop and web.
- [Smol2Operator: Post-Training GUI Agents for Computer Use](https://swe.quest/articles/smol2operator-post-training-gui-agents-for-computer-use-48ab28e5aaf08bd1.md): Hugging Face · 2025-09-23 · Hard · 14 min read · Model training, AI agents, Computer vision, LLMs
  A two-phase supervised fine-tuning recipe turns SmolVLM2-2.2B-Instruct, which starts with no GUI grounding (about 0% on ScreenSpot-v2), into an agentic GUI model that emits code-form actions.
- [SmolVLA: Efficient Vision-Language-Action Model trained on Lerobot Community Data](https://swe.quest/articles/smolvla-efficient-vision-language-action-model-trained-on-lerobot-community-data-99cf2ea745877ec8.md): Hugging Face · 2025-06-03 · Hard · 17 min read · Machine learning, Model training, Inference & serving, Computer vision, Open source
  SmolVLA is a 450M-parameter open-source vision-language-action model for robotics, pretrained on about 10M frames from 487 curated LeRobot community datasets and able to run on consumer hardware.
- [Vision Language Models (Better, faster, stronger)](https://swe.quest/articles/vision-language-models-better-faster-stronger-e122b57ac9aa84ed.md): Hugging Face · 2025-05-12 · Easy · 23 min read · LLMs, Computer vision, Machine learning, RAG & retrieval, Inference & serving
  Vision language models shifted over the past year toward smaller yet stronger models, any-to-any architectures, multimodal reasoning, Mixture-of-Experts decoders and vision-language-action models for robotics.
- [SmolVLM - small yet mighty Vision Language Model](https://swe.quest/articles/smolvlm-small-yet-mighty-vision-language-model-c85d5a6cd246b728.md): Hugging Face · 2024-11-26 · Hard · 12 min read · Computer vision, Model training, Inference & serving, LLMs, Evaluation
  SmolVLM is a 2B-parameter open vision language model built on the Idefics3 architecture with a SmolLM2 1.7B backbone.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
