readeverything
Give an agent eyes into a filesystem. readeverything turns a directory of
mixed files into mimetype-dispatched media representations — text spans,
image crops, hex dumps — each carrying a locator back to exactly where it
came from, so an agent's answer can point at its source instead of just
asserting one.
Install
pip install readeverything
Use it
from readeverything import (
Budget,
Capability,
SemaphoreLimiter,
build_perception,
build_tools,
)
class Narrate:
"""An observer: anything with `observe(event)`. Yours can do better than print."""
def observe(self, event):
print(f"{type(event).__name__}: {event.operation} on {event.ref.uri}")
perception = await build_perception(
root,
# Watch a long read as it happens — started, progressed, finished — and
# never let more than four vision calls run at once.
observer=Narrate(),
limiter=SemaphoreLimiter({Capability.VISION: 4}),
)
card = await perception.inspect("notes.txt")
tools = build_tools(perception)
# Narrate() sees this read start and finish; a video would report each frame.
rendered = await perception.represent("notes.txt", Budget(max_chars=None))
Drop the observer and limiter arguments and it is three lines; with them,
a caller can see which file a slow read is on and bound how hard it leans on a
vision endpoint. An observer never changes what a read returns, and one that
raises cannot fail the read.
build_perception walks root and wires up
detection, hashing, and the handler registry. card describes what the file
is (card.kind, e.g. "text") and what you can do with it (card.affordances,
a tuple of Affordance objects — [a.name for a in card.affordances] gives
e.g. ["read_range"]). build_tools turns the whole perception surface into
four LangChain-compatible tools an agent can call directly:
inspect_path, list_paths, invoke_affordance, and ask_about_image.
Calling an affordance yourself works the same way an agent's tool call does:
result = await perception.invoke("notes.txt", "read_range", {"start": 4, "end": 9})
Give it to an agent
build_tools returns plain LangChain BaseTools, so it drops straight into
deepagents with no extra glue:
from deepagents import create_deep_agent
from readeverything import build_perception, build_tools
perception = await build_perception(root)
agent = create_deep_agent(tools=build_tools(perception))
Now the agent can look at a directory of mixed files — including images — and answer questions about them with locators back to the source.
Add vision
Image affordances beyond a raw crop need a model. Point readeverything at
any OpenAI-compatible vision endpoint and the extra affordances appear:
from readeverything import build_openai_vision_model, build_perception, build_tools
vision = build_openai_vision_model(base_url="http://localhost:8000/v1", model="qwen2-vl")
perception = await build_perception(root, vision=vision)
tools = build_tools(perception)
With no vision model supplied, images still work — crop_region is always
available — they just offer fewer affordances.
The library reads the filesystem, never the environment
Every input — the root directory, the vision endpoint, the API key — is an
explicit argument. readeverything never reads an environment variable to
configure itself. That means two differently-configured Perception
instances can run side by side in one process: point one at a local vision
server and leave the other with none, in the same test run or the same
service.
What's supported today
| Media | card.kind |
Affordances | Needs |
|---|---|---|---|
| Text, JSON, XML | text |
read_range |
nothing extra |
| Images | image |
crop_region always; describe_image and ocr when a vision model is supplied |
images extra (Pillow) for image handling; a vision model for description and OCR |
binary |
read_page, page_region, page_image; ocr_page when a vision model is supplied |
documents extra (pypdfium2); a vision model for ocr_page |
|
| Audio | audio |
read_span, when a transcriber is supplied |
transcription extra (faster-whisper) and an ffmpeg binary |
| Video | video |
frame_at; describe_frame when a vision model is supplied |
an ffmpeg binary; a vision model for describe_frame |
| Everything else | binary |
hexdump |
nothing extra |
A PDF reports card.kind == "binary", not a kind of its own. MediaKind names
how bytes are shaped, and a PDF is a container; the fact that it has pages is
carried by its affordances, which is where a caller acts on it anyway.
Office documents and archives have no handlers yet — files of those kinds fall through to the binary fallback above (a hex dump), not a dedicated representation.
Extras
pip install "readeverything[images]" # Pillow, for image handling
pip install "readeverything[vision]" # langchain-openai, for vision models
pip install "readeverything[langchain]" # langchain-core only, no OpenAI client
On a machine with none of these installed — no Pillow, no vision client, no model server running anywhere — the example at the top still works: text is still read, and every other file still gets a locator-carrying hex dump.
Metadata
Release files for readeverything 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| readeverything-0.2.0.tar.gz | 571.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| readeverything-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 721.8 kB
Release files / readeverything-0.2.0.tar.gz
| Download URL | readeverything-0.2.0.tar.gz |
|---|---|
| Size | 571.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6994dbb05939eb737ef79a707f201efe888fbbfce78357b636f001dbc28b9a8a
|
|
BLAKE2b-256 checksum How to use checksums |
8c80af66f703ea27fe2bbb24db713d8d97ec29f78734fe6eb076391c2339e93d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / readeverything-0.2.0-py3-none-any.whl
| Download URL | readeverything-0.2.0-py3-none-any.whl |
|---|---|
| Size | 150.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ea48fe106cd658c51f1e4546e0819ddbd250c99f52d1324530cea4d09cf3101
|
|
BLAKE2b-256 checksum How to use checksums |
ec99642af1be9e7748d754a4f5a2e9ad515738c0498d958f43d50781fb2d3d02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency log