Vision-capable models let an agent consume pixels the same way it consumes tokens: as evidence for the next decision.
That single capability turns screenshots, UI states, diagrams, and scanned pages into first-class agent inputs rather than something you must pre-convert to text with a separate OCR pipeline.
Text-only agents are limited to what APIs, HTML dumps, and human paste supply.
Multi-modal agents can see what a user would see, which is often the only reliable signal when the DOM is hostile, the PDF is a scan, or the diagram never had structured metadata.
Multi-modal models accept image (and sometimes video) payloads alongside text so the agent loop can reason over visual evidence, not only strings.
Insight: Many real tasks live in UIs, PDFs, charts, and photos where text extraction is incomplete, expensive, or wrong.
Key Concepts:image message parts, screenshot as observation, grounding, vision tokens / cost, DOM vs pixels, structured extract after vision.
When to Use: Browser control, document intake, UI QA, diagram interpretation, and any tool path where visual state beats brittle selectors.
Limitations/Trade-offs: Higher latency and cost per turn; weaker spatial precision than DOM; risk of hallucinated UI elements; privacy exposure of screen content.
Related Topics: browser agents with Playwright, vision-grounded clicks, document-processing agents, tool design for multi-modal inputs.
A classical agent loop is: perceive → reason → act → observe.
With text-only models, "perceive" means reading tool returns, user messages, and memory as strings.
With a vision model, "perceive" can include encoded images in the message history, usually as base64 or a URL the provider can fetch.
What changes architecturally is not the loop shape.
What changes is the observation channel.
Typical visual inputs for agents:
Input
Common source
Agent use
Full-page or viewport screenshot
Browser automation (Playwright, CDP)
Decide next click, detect errors, verify UI state
Cropped UI region
Host crops after a heuristic
Focus OCR / label reading without full-page noise
Scanned PDF page / photo
Document upload pipeline
Extract fields, classify form type
Chart or diagram
File or rendered report
Summarize trends, read annotations
Camera / product image
Mobile or warehouse feed
Identify object class or damage (domain-dependent)
Analogy: giving an agent vision is like giving a remote operator a webcam into the environment instead of only a terminal log.
The operator still needs a keyboard (tools).
They just stop guessing when the log and the screen disagree.
Providers differ on max image size, count per request, resolution handling, and pricing (verify at build).
Your host should normalize images (resize, format, strip EXIF when policy requires) before the model call.
user goal + tools -> model (text + optional images) -> tool call OR final answer -> tool runs (e.g. screenshot, click, OCR helper) -> observation (text and/or new image) -> loop
Most OpenAI-compatible APIs represent multi-modal user (or tool) content as a list of parts: text parts and image parts.
The agent host must serialize screenshots into that schema after each relevant tool.
Conceptual payload (not provider-specific):
messages = [ { "role": "user", "content": [ {"type": "text", "text": "What is broken on this page?"}, { "type": "image_url", "image_url": {"url": f"data:image/png;base64,{b64}"}, }, ], }]
Keep the text instruction explicit.
Models do not magically know whether you want a description, a JSON extract, or a next action.
Use DOM when present, vision as fallback or verifier
More host complexity
Prefer DOM (or accessibility snapshots) when they are trustworthy.
Use vision when the page is effectively a picture, when you need visual verification, or when you must operate a third-party UI you cannot instrument.
Screenshots can include PII, secrets in password managers, internal dashboards, and session cookies in visible URLs.
Treat image observations like sensitive logs: retention limits, redaction where possible, and no training on customer captures unless policy allows.
Never paste vision outputs into privileged tools without the same untrusted-content discipline you use for web HTML.
Support agents that open admin UIs and confirm a setting matches a ticket.
QA agents that assert "error toast visible" from a screenshot after a deploy.
Intake agents that classify invoices and extract totals into JSON for ERP tools.
Research agents that read charts in PDFs when table extraction fails.
Advanced loop design: plan in text, use vision only at decision points, and require a second tool (schema validate, DOM re-query, human approve) before irreversible actions.
An agent whose model calls can include non-text parts (usually images) in the conversation, and whose tools can produce those parts as observations for the next turn.
Do I need a special framework?
No. Any host that can attach image parts to messages and run tools works. Frameworks help with loops and tracing, not with the core vision idea.
Should screenshots go in tool results or user messages?
Either can work. Prefer a consistent host convention (often tool result with image + short text) so traces stay readable.
How many images per turn is reasonable?
Start with one current viewport. Add crops only when the task needs zoom. More than a few full pages per turn is usually waste.
Can vision models read tiny text in UI?
Sometimes, often not reliably. Zoom crops, increase capture scale, or fall back to DOM text when fidelity matters.
Is video supported the same way as images?
Some providers accept video or frame sequences; others expect you to sample frames. Verify provider docs at build and treat video as higher cost.
How does this relate to RAG?
Vision can replace or complement OCR before indexing. For agents, the more common pattern is online vision on the current artifact, not only offline embedding of images.
What model should I pick?
Choose a multi-modal model with strong UI or document performance for your domain, then route cheaper text models for pure language steps. OpenRouter-style routing can separate vision and text models if your host supports it (verify at build).
How do I eval vision agents?
Build a fixture set of real screenshots/PDFs with expected extracts or action labels. Score structured fields and click success, not only free-text fluency.
What fails first in production?
Cost spikes from screenshot spam, wrong clicks from poor grounding, and privacy incidents from retaining full-desktop captures.
Can the agent "see" after a tool mutates the page?
Only if you capture a new observation. Stale images in history cause actions based on outdated UI.
Should I show the model the accessibility tree and the screenshot?
Hybrid inputs often work well: tree for structure, screenshot for visual confirmation. Cap size so context does not explode.
How is this different from classic computer vision?
You are not training a detector per UI. You are using a general multi-modal LLM with tools. That is flexible but less precise than a purpose-trained detector when you control the domain.
When should I stay text-only?
When tools already return clean structured data and visual state adds no decision value. Do not pay vision taxes for pure API workflows.