OpenGraph Image
Point it at a folder of images. Get back a graph of what is in them, how those things relate, and which file says so.
- v0.1.2 on PyPI
- Python 3.11+
- Apache-2.0
- 6 MCP tools
opengraph-image build ./photos
Reads
- kitchen-01.jpg
- kitchen-02.jpg
- desk-03.png
Writes edges like
- mug on_top_of table 0.94
- mug has_attribute material: ceramic 0.88
- kitchen-01.jpg in_scene indoor_residential 0.97
- desk-03.png has_text "Q3 PLAN" 0.81
Most image search stops at filenames, tags, and captions. OpenGraph Image reads every image in a folder with a vision model and writes what it sees into one graph.json file that your agent can follow, edge by edge.
Beyond captions
What the model sees, kept as a graph.
Objects in the frame, the scene, colors and materials, text that appears in the picture, and how the objects relate. Objects, scenes, attributes, text spans, and every edge carry a confidence score between 0 and 1, so your agent follows edges instead of guessing which caption fits.
park-11.jpg
- personwearingbackpack0.91
- bicyclenext_tobench0.86
- benchhas_attributematerial: wood0.83
Fixed vocabulary
The same words in every photo.
Relationships come from a small, fixed set. "A mug on a table" matches the same way in every image, not only in the ones whose captions happen to phrase it that way.
- next_to
- on_top_of
- inside
- behind
- in_front_of
- holding
- wearing
Linked across images
One node, every photo it's in.
Objects, scenes, and attributes with the same label merge into one node that records every image it was seen_in. "Which photos show a bicycle?" becomes a single lookup rather than a search over captions.
- street-03.jpg
- park-11.jpg
- garage-02.jpg
For your agent
Six MCP tools.
Claude Code, Claude Desktop, Cursor, or any MCP client can build, inspect, and query the graph. Graphs resolve by folder, so a later session that names ./photos picks up where the last one stopped.
- You
Who is holding an umbrella?
query_graph("Who is holding an umbrella?", "./photos")- Agent
street-14.jpgshows a person holding an umbrella. get_image_entities("street-14.jpg", "./photos")
Good to know
- Merges by label, not identityTwo different red mugs become one
mugnode seen in both photos. - Small, fixed vocabulariesA relationship outside the set, such as "pouring into", is not recorded.
- Still images onlyFor video, sample frames into a folder first.
- Alpha softwareThe graph format may change between releases.
Build your first graph
Open source under Apache-2.0. Runs locally with your own Anthropic API key.