imgagent is the image acquisition agent for autonomous software. One command takes a query from search → rank → download → verify → manifest and hands back bytes it has fully decoded, hashed and rights-checked. No browser. No LLM. No guesswork. stdout is a JSON contract; the manifest is the deliverable.
Every stage is independently callable. Nothing advances on faith — a candidate becomes an asset only after the bytes decode, hash and pass the rights gate.
A file is "downloaded" only after Pillow fully decodes it, the format matches its magic bytes, and the SHA-256 is recorded. HTML dressed as .jpg, corrupt files, bomb-sized payloads — rejected before they ever touch your assets.
The network is hostile; imgagent treats it that way.
License, creator and source page ride on every asset. --require-reuse-rights admits only verified public-domain / licensed material. Unknown never passes the gate — no matter the score.
Kill it mid-run, rerun it tomorrow — stable candidate IDs, resumable jobs, verified files reused, SQLite state that survives restarts. Agents can retry without fear.
stdout = exactly one JSON object. stderr = diagnostics. Exit codes 0/1/2/3 mean exactly one thing each. Your parser is 3 lines and never breaks.
Three views of the same system: what the CLI prints, what the manifest carries, and how your code calls it as a library.
// imgagent run "isdal woman norway 1970" --require-reuse-rights --top 2 --json { "ok": true, "schema": "imgagent.result/v1", "command": "run", "data": { "job_id": "j-3f9c81a2", "downloads": { "saved": 2, "failed": 0, "duplicate": 0 }, "manifest_path": "/work/.imgagent/manifests/j-3f9c81a2.json", "partial": false, "errors": [] } }
{
"schema_version": "imgagent.manifest/v1",
"assets": [{
"asset_id": "asset-586f22ac8bf2",
"project": "isdal", "scene": "scene-04",
"file": { "path": "…/originals/isdalen--9ac9f850.jpg",
"sha256": "586f…", "width": 3264, "height": 2448 },
"provenance": { "provider": "wikimedia",
"source_page_url": "https://commons.wikimedia.org/…",
"creator": "…" , "license_name": "Public domain" },
"rights_status": "verified_public_domain"
}]
}
from imgagent import run_image_job, get_manifest result = run_image_job( "Isdal Woman Norway 1970", top=8, require_reuse_rights=True, project="isdal", scene="scene-04", ) manifest = get_manifest(result.job_id) # same engine as the CLI — one implementation, one contract
// claude_desktop_config.json — or any MCP client { "mcpServers": { "imgagent": { "command": "imgagent-mcp", "args": [], "env": { "IMGAGENT_WORKSPACE": "/abs/path/.imgagent" } } } }
Honest support matrix — every provider documents auth, rate limits and test date. If a source is down, it shows up in errors[]; the rest keep working.
Official MediaWiki API. Original-resolution files plus full license metadata — the backbone of rights-cleared workflows.
CC-licensed index across millions of works. License and creator come with the result, not as a chase.
Broad web discovery when coverage matters more than metadata. Rights stay unknown — by design, not by accident.
Point inspect at any page or image URL: OG-image extraction, magic-byte sniffing, dimensions — no integration required.
Config-driven provider: declare an endpoint + field map in config.toml and your licensed archive behaves like a built-in.
Google Images discovery and Pinterest reference inspection are on the roadmap behind the same candidate schema.
Any agent can load the full operating manual straight from the binary — golden rules, command map, failure taxonomy, anti-patterns. No docs archaeology, no guessing flags.
$ imgagent agent-instructions # complete machine contract on stdout — # safe to paste into any system promptRead AGENTS.md ↗
The same engine exposed over Model Context Protocol. Claude Desktop, Cursor, or your own MCP client — tools mirror the CLI one-to-one, schemas and all.
pip install "imgagent[mcp]" { "mcpServers": { "imgagent": { "command": "imgagent-mcp" } } }Full docs ↗
imgagent is part of a family of headless, contract-first agents built for real production pipelines — the same doctrine that runs through ytagent, ttagent and igagent: one input, one JSON contract, verified bytes, honest negatives. Full story, other projects and contact live on the main site.
imgagent doesn't ship alone. Sibling agents cover video, search and media farms — all contract-first, all built to run unattended.
You're here. Image discovery → verified assets → manifest. The acquisition layer of the stack.
YouTube acquisition agent with the same one-JSON contract — metadata, media, verification.
TikTok-side sibling agent: URL normalization, slot decoding, atomic downloads.
Instagram media agent — source tracing and verified downloads under the same doctrine.
Remote worker / task execution farm with handoff patterns — where the agents run at scale.
The flagship consumer: asset inventory and video rendering that eats imgagent manifests directly.
Companion Opuscar build — asset pipelines and rendering integration in the same universe.
Home base — the maker's site with everything else: projects, writing, contact.