What it thinks is what it sees — give any text-only coding agent eyes: image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, as a vision toolkit plus a skill, with optional drop-in integration for Codex, Claude Code, Pi, Oh My Pi, and
$ npx -y skills add Anionex/agent-vision-toolkit --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
What's inside
What it thinks is what it sees — give any text-only coding agent eyes: image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, as a vision toolkit plus a skill, with optional drop-in integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode.
🎯 An agent's vision capability doesn't have to live in the model — it can live in the harness.
🌐 中文 | English
If your agent already runs on a text-only model such as DeepSeek but is held back by the lack of multimodality — unable to see images, with every attempt to use an image tool blocked by the system — this repository provides tools, skills, and proxy integrations that let text-only models handle visual tasks on equal or even better footing. The goal is to make the experience of using a text-model agent as seamless as using a multimodal one, and ultimately let a tool-equipped text-model agent outperform a native multimodal agent that does not use this toolkit and its methods.
This repository provides two kinds of components:
All code has been verified in real Codex + DeepSeek sessions, and the same pipeline has been live-verified end-to-end in Claude Code, Pi, Oh My Pi, and OpenCode.
If this project helps you or gives you some inspiration, feel free to star🌟 & fork.
The included vision-tools skill contains complete examples that an agent can follow directly.
When to use them, the order in which to call tools, and how to verify the result are all documented in the corresponding skill guides:
| Use case | What the agent learns to do |
|---|---|
| Extract long screenshots, chat histories, and scrolling pages | Find low-content cut bands, OCR each chunk in order, preserve chat speakers/timestamps/quotes, merge only duplicated overlap, and surface risky boundaries for verification. See the Telegram reference run → |
| Rebuild a UI from a screenshot or design | Reuse project components and assets first, then combine code-native UI, extracted visuals, rendered screenshots, and visual comparison to align a page or component. |
| Restore an icon, logo, illustration, or other graphic | Extract a transparent PNG from the source image, or rebuild an editable/scalable SVG when needed, then verify shape, color, and alpha edges. |
| Turn a sketch, diagram, or whiteboard into structured code | Recover nodes, labels, connections, and directions as editable Mermaid, Graphviz, or another structured representation. |
| Operate a GUI from screenshots | Locate a control, perform one action, capture the screen again, and verify the resulting state before continuing. |
| More use cases | Other step-by-step visual-agent playbooks are being added gradually. |
Left: the original infographic screenshot. Right: an editable reconstruction built with HTML/CSS. View the HTML source →
Left: the hand-drawn reference. Right: the restored JupyterLab workspace made from it. See the UI restoration playbook for the workflow. Executed in Codex with deepseek-v4-flash.
Left: multi-round image Q&A with glance. Right: with ground, DeepSeek V4 locates screen elements to play chess autonomously.
Left: DeepSeek V4 answers a UI style question with similar-style comparisons. Right: DeepSeek V4 debugs a field-name mismatch from a screenshot.
The easiest way to install it is to send this to your agent:
Follow the instructions in https://github.com/Anionex/agent-vision-toolkit to install the vision toolkit and skill locally. If the vision API is not configured, locate the configuration file for the current operating system and guide me through setting
VISION_API_KEY,VISION_BASE_URL, andVISION_MODEL.
If you also want the optional seamless integration layer, send this:
Read https://github.com/Anionex/agent-vision-toolkit/blob/main/AGENT_INSTALL.md in full, then install the appropriate vision proxy or native extension/plugin for the agent application we are currently using. If the vision API is not configured, locate the configuration file for the current operating system and guide me through setting
VISION_API_KEY,VISION_BASE_URL, andVISION_MODEL.
All you need to prepare is an OpenAI-compatible multimodal API base URL, API key, and model name. The agent will guide you through writing them to the appropriate configuration file.
After installing the optional integration and restarting the agent, paste an image directly or let the model call its built-in image tool. Pi, Oh My Pi, and OpenCode use single-file native extensions rather than the proxy; see each agent's documentation.
1. Point it at a vision API — three env vars in ~/.config/agent-vision-toolkit/env (chmod 600):
VISION_API_KEY=sk-...
VISION_BASE_URL=https://openrouter.ai/api/v1
VISION_MODEL=google/gemini-3.6-flash
Any OpenAI-compatible endpoint that supports /chat/completions with image_url works (e.g. Aliyun DashScope: https://dashscope.aliyuncs.com/compatible-mode/v1 + qwen-vl-max-latest). Add LANG=en for English descriptions (default is Chinese).
2. Put the CLIs on your PATH:
git clone https://github.com/Anionex/agent-vision-toolkit.git
export PATH="$PWD/agent-vision-toolkit/bin:$PATH" # add to your shell profile to persist
glance needs nothing beyond Python 3.11+; ground/detect/crop and the long-screenshot OCR playbook need pillow; trace needs pillow + numpy (and vtracer only for its explicit --outline fallback). Install optional dependencies into an isolated venv only for the tools you use.
3. Install the skill so your agent knows the tools exist and how to combine them:
npx skills add Anionex/agent-vision-toolkit --skill vision-tools -a codex -g --copy -y
Or copy skills/vision-tools/ into your agent's skills directory (e.g. ~/.codex/skills/) and restart the agent.
A set of visual tools designed for agents, letting them choose freely based on the situation:
Ask a question about an image directly, or transcribe its text.
glance screenshot.png -q "What is the dominant color of this image?"
glance screenshot.png --ocr
The dominant colors of this image are **white and light gray, with light blue accents.**
Username
Password
Login
For a scrolling screenshot or chat history, the skill includes a workflow that
finds safe cut bands, OCRs the chunks with glance, merges overlap, and writes
a boundary audit:
python3 skills/vision-tools/scripts/long_screenshot_ocr.py long-chat.png --mode chat -o long-chat.ocr.md
Locate an object or region and get a bounding box in original pixel coordinates:
ground screenshot.png "Send button"
x1: 1067, y1: 841, x2: 1108, y2: 881
It analyzes one full image per call. With --region X1,Y1,X2,Y2 it searches only that box and still reports original-image coordinates — the zoom-in path for small targets.
Inventory the elements of an image (or a region) — a numbered list with exact visible text and pixel boxes:
detect page.png
detect page.png "buttons"
detect page.png --region 238,600,953,671
1. bottom-left Do anything x1: 253, y1: 601, x2: 328, y2: 609
2. bottom-left + x1: 254, y1: 650, x2: 268, y2: 665
3. bottom-right stop button x1: 924, y1: 645, x2: 952, y2: 670
A full-screen pass is a fast first draft; for completeness on dense screens, inventory region by region.
trace recovers the centerline of a flat, high-contrast graphic locally and deterministically, then fits editable SVG primitives such as <circle>, <line>, <polyline>, and <polygon>. It also preserves compact solid round marks as filled circles and keeps closed curved loops intact. A magnifier becomes one circle plus one line; a lightning stroke becomes its actual straight segments instead of noisy paths around both sides of the raster ink. Internal upscaling improves small icons while the SVG remains in the source image's coordinate grid. The LLM does not participate in this fitting: an agent such as DeepSeek only orchestrates the surrounding locate, crop, render, and verification steps. Use --outline only when you explicitly need the filled outer silhouette (that fallback requires vtracer).
trace icon.png -o icon.svg
trace screenshot.png --region 1563,514,1668,621 -o icon.svg
trace filled-artwork.png --outline -o silhouette.svg
crop cuts a pixel box out of an image into its own file — the same
X1,Y1,X2,Y2 coordinates ground/detect print, clamped to the image
bounds. Once the same box is about to feed several checks (pixel_diff,
dominant_colors, trace), cut it once and reuse the file instead of
re-cropping in memory on every call. Requires the optional pillow.
crop screenshot.png --region 1563,514,1668,621 -o send-button.png
This layer makes screenshots pasted into an agent work directly, while also preventing errors when the agent calls its built-in image tools.
| Agent | How | Status |
|---|---|---|
| Codex | transparent local proxy (Responses API) | ✅ verified |
| Claude Code | the same proxy — point ANTHROPIC_BASE_URL at it | ✅ verified |
| Pi / Oh My Pi | one-file native extension (extensions/pi/) | ✅ verified |
| OpenCode | one-file native plugin (extensions/opencode/) | ✅ verified |
| Any agent with a shell | the toolkit above — no integration needed | ✅ |
All entry points share one configuration. Configure it once and use it everywhere.
Most vision bridges for text-only models simply ask a multimodal model to turn an image into a generic description, then hand that description to the text model and expect it to reconstruct the information it needs. That adds another semantic layer where some information is inevitably lost — the source of the common belief that stitched-together vision solutions must suffer a large performance penalty.
To address this, agent-vision-toolkit tries to recover why the agent wants to look at the image. It extracts the viewing intent from the user message or from the model's stated reason for calling a built-in image tool, then passes that intent to the vision model as a focus hint. The result is a task-aware description that emphasizes what matters for the current step instead of producing a generic "detailed description" — at lower cost, with higher accuracy and faster responses.
Codex -> 127.0.0.1:19100 -> your existing text-only upstream
|
+-- when the request contains images:
focus hint (the user's request, or the assistant's
stated reason for calling view_image)
-> vision prompt -> text description -> image replaced
The toolkit and proxy use only these environment variables; just three are required:
| Variable | Required | Description |
|---|---|---|
VISION_API_KEY | Yes | API key of the multimodal model |
VISION_BASE_URL | Yes | OpenAI-compatible API base URL |
VISION_MODEL | Yes | Multimodal model name |
LANG | No | Vision model output language: zh (Chinese) or en (English); default zh |
/chat/completions and image_urlNo. Although the network request to the upstream is sent by the proxy process at 127.0.0.1:19100, the upstream API key is still placed in the Authorization header by Codex per your existing configuration, and the proxy forwards that header unchanged:
Codex (carrying the original Authorization)
-> 127.0.0.1:19100
-> text-only upstream (receives Authorization unchanged)
So don't modify Codex's existing auth config, and don't store the upstream API key again in the proxy env. The proxy env only needs VISION_API_KEY, VISION_BASE_URL, and VISION_MODEL.
If agent-vision-toolkit saves you time, you are welcome to star it, share it, contribute, or sponsor the project.
I'm anionex, an AI-native developer who once ranked No. 4 on GitHub's global developer trending list, with more than 16k stars across my projects. If you would like to follow my future work, follow me on GitHub.
.env.example
.github/
FUNDING.yml
ISSUE_TEMPLATE/
bug_report.yml
config.yml
feature_request.yml
question.yml
PULL_REQUEST_TEMPLATE.md
workflows/
ci.yml
.gitignore
AGENT_INSTALL.md
assets/
effect-1.jpg
effect-2.jpg
effect-3.jpg
effect-4.jpg
focus-hint-comparison-1.png
focus-hint-comparison-2.png
focus-hint-comparison-cn-1.png
focus-hint-comparison-cn-2.png
focus-hint-comparison-cn.png
focus-hint-comparison.png
hero.png
infographic-restore-reference.png
infographic-restore-result.png
ui-restore-result.png
ui-restore-sketch.png
bin/
crop
detect
glance
ground
trace
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
detect.py
examples/
infographic-restoration/
how-is-the-model-trained.html
long-screenshot-ocr/
README.md
telegram-chat-long.png
telegram-chat-ocr.md
telegram-chat.html
extensions/
opencode/
README.md
vision.ts
pi/
README.md
vision.ts
FUNDING.md
ground.py
LICENSE
README_CN.md
README.md
research/
2026-08-03-hint-ab-comparison.md
2026-08-03-view-image-hint.md
2026-08-04-focus-hint-eval.md
2026-08-05-live-e2e-four-hosts.md
hint-eval/
DESIGN.md
task-eval/
DESIGN.md
view-image-hint-table-1-25.md
SECURITY.md
skills/
vision-tools/
agents/
openai.yaml
references/
gui.md
long-screenshot-ocr.md
restore-graphic.md
restore-structure.md
restore-ui.md
scripts/
dominant_colors.py
extract_fg.py
html_shot.py
long_screenshot_ocr.py
pixel_diff.py
SKILL.md
work/
shot.png
SUPPORT.md
tests/
conftest.py
fixtures/
apply-patch-real-stream.sse
smoke_test_proxy.py
test_anthropic_rewrite.py
test_apply_patch_bridge.py
test_crop.py
test_detect.py
test_dominant_colors.py
test_extensions.mjs
test_extract_fg.py
test_fail_open.py
test_focus_hint.py
test_glance_region.py
test_ground.py
test_html_shot.py
test_image_rewrite_shapes.py
test_long_screenshot_ocr.py
test_pixel_diff.py
test_trace.py
test_vision_client.py
vision_client.py
vision_proxy.py
website/
.gitignore
.oxlintrc.json
index.html
package-lock.json
package.json
public/
favicon.svg
landing/
effect-3.jpg
effect-4.jpg
focus-hint-comparison-1.png
hero.png
infographic-restore-result.png
ui-restore-result.png
README.md
src/
App.css
App.jsx
components/
CapabilityChart.jsx
index.css
main.jsx
vite.config.jsFAQ
agent-vision-toolkit is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes vision-tools. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.