Image Ingestion
Store image-derived text as semantic memory using OCR and vision providers.
What is it?
Ingesting .png, .jpg, .jpeg, and .webp files so visual content becomes searchable text memories.
Why does it exist?
Screenshots, UI captures, and slide photos often carry the facts agents need. Pure image bytes are not useful for text recall without extraction.
How does it work?
Configure ocr and/or vision, then call ingest with an image path or buffer.
import { tesseract, geminiVision } from "wolbarg";
const ctx = new Wolbarg({
/* organization, storage, embedding */
ocr: tesseract(),
vision: geminiVision({ apiKey: process.env.GEMINI_API_KEY! }),
});
await ctx.ingest({
agent: "vision",
source: { path: "./screenshot.png" },
metadata: { kind: "ui-capture" },
});OCR text, captions, descriptions, and entities are concatenated before chunking. If neither provider is configured, image ingest errors with a clear message unless other text is available.
When should it be used?
Product screenshots, whiteboard photos, receipts, and charts where text/visual captions matter.