A screenshot and image explainer agent for Claude Code, Codex and Cursor
Lens explains an image a person shared: what it shows, the text in it, what in their workspace it relates to, and what to do next, with citations. It works from the workspace's code index, decisions and lessons, and the images you share and the context ContextStream picks for the job.
Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.
Or run it in the ContextStream web app, signed in with your ContextStream account. Version 0.2.0 · Updated
What does Lens do?
Reads an image you shared and ties it to your workspace: the text in it, related code, docs, decisions and lessons, and what to do next, with citations.
What it declines
It does one job. A task like one of these is declined with a reason:
Making documents, PDFs, slides or new images from an image.
Reading media that is not an image, such as PDFs, audio or video.
Answering questions that are not about the image.
Browsing the web, or changing anything in the workspace beyond one optional note.
What can Lens access, and is it safe to turn on?
Lens gets a short-lived token for one workspace that lets it do only this: read an image you share; search the workspace's code index; read the workspace's decisions and lessons; save one note per run; read the lessons, preferences and decisions ContextStream picks for its job; mark the context items its result cited as helpful; and call models through ContextStream's model proxy, within a cap set for the run. It works in one project, only for that run, and declines any task outside its job. The only things Lens may change are these: it may save one note per run; and mark the context items its result cited as helpful. A workspace owner or admin turns it on.
Model agent. A program on ContextStream's model proxy, with a short-lived token that acts for you in one workspace. It is stopped after 2 min.
Scope
What it lets a run do
media.read
Read an image you share
search.read
Search the workspace's code index
memory.read
Read the workspace's decisions and lessons
memory.write.note
Save one note per run
context.read
Read the lessons, preferences and decisions ContextStream picks for its job
context.feedback
Mark the context items its result cited as helpful
model.invoke
Call models through ContextStream's model proxy, within a cap set for the run
How is Lens tested?
Lens is checked on 6 cases, each with a known right answer: images with known contents, such as an error screenshot, a whiteboard sketch and a terminal, and requests outside its job it must decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: it names the right kind of image, reads at least 95% of the key text in it, puts the expected code or doc among its first three related items, and says what the answer needs to say. What the vision model reads from each image is scripted, and the workspace is fixed test data, so the cases check how an image is tied to the workspace, not the live model's own reading of an image. Version 0.2.0 passes all 6.
It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.
What does a real run of Lens look like?
The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.
The first run is live; the second example is from the agent's test suite.
Live run on ContextStream
A screenshot of a failing key check
Version
0.2.0
Outcome
succeeded
Ran
2026-10-27 20:54 UTC
Took
27.9 s
ContextStream's Demos workspace: a demo screenshot of a terminal (the key in it is a made-up placeholder), asked about in the project that indexes the public repository github.com/contextstream/mcp-server.
{
"media_id": "aeed3571-996b-4d7b-aaed-01288a82efec",
"project_id": "6aad1065-8086-4114-931e-1b16c1d9b234",
"question": "Why did this fail, and where in the MCP server is this message printed?"
}
Result
A terminal session shows `contextstream-mcp verify-key` failing with an HTTP 401 Unauthorized response after receiving a dummy API key.
What the image is
terminal: A terminal session shows `contextstream-mcp verify-key` failing with an HTTP 401 Unauthorized response after receiving a dummy API key.
The command failed because a placeholder key (`cbiq_not_a_real_key`) was provided to `CONTEXTSTREAM_API_KEY`, causing the authentication endpoint to reject the request with HTTP 401 Unauthorized. In the MCP server codebase, API key authentication and verification messaging are handled in `crates/mcp-server/src/setup/mod.rs:3484` under `authenticate_api_key`.
Related in the workspace
crates/mcp-server/src/setup/mod.rs:3484: Implements API key authentication and setup verification logic
crates/mcp-tools/src/testing/mock_client.rs:44: Mocks HTTP 401 Unauthorized responses for client testing
crates/mcp-client/src/retry.rs:238: Defines HTTP 401 Unauthorized responses as non-retryable errors
crates/mcp-tools/src/domains/workspace_drift.rs:178: Verifies workspace error handling for 401 and 403 HTTP statuses
Next steps
Export a valid API key into the `CONTEXTSTREAM_API_KEY` environment variable.
Re-run `contextstream-mcp verify-key` to verify the connection.
The image it readChecks: 4 of 4 passed
image_read: 243 characters of text and 8 entities.
workspace_lookups: 7 of 7 lookups answered; 15 items found.
citations: Every related item is one that was found in the workspace.
workspace_context: 3 context items from ContextStream for this job, about 2228 tokens.
Task
3f306b5e-4bc6-4c8a-8056-67e8475fd424
From its test suite, not a live run
A screenshot of a failing test (test case)
Version
0.2.0
Outcome
succeeded
Ran
2026-10-27 17:28 UTC
Took
Not timed (test data)
The agent's offline test suite: its real program, against a stand-in for ContextStream, a scripted vision reply and fixtures, with no network. Not a live run; the image in the fixture is a placeholder, so it is not shown.
What it ran on
Its test suite, in the agents' source repository
Input
{
"media_id": "0e0e0e0e-0000-4000-8000-000000000003",
"question": "Which test is failing and why?"
}
Result
The token refresh test fails with a 401.
What the image is
terminal: The token refresh test fails with a 401.
Text read from the image
FAIL test/auth.test.ts > refreshes tokens
Expected 200, received 401
Answer
test/auth.test.ts, refreshes tokens, gets 401 where it expects 200.
Related in the workspace
test/auth.test.ts:12: Relates to what the image shows.
Next steps
Check the refresh token's expiry.
Checks: 4 of 4 passed
image_read: 68 characters of text and 2 entities.
workspace_lookups: 6 of 6 lookups answered; 1 items found.
citations: Every related item is one that was found in the workspace.
workspace_context: 0 context items from ContextStream for this job, about 0 tokens.
Test case
terminal-test-failure, in its test suite
Depot run
lh9rrpq6ff
Which tools does Lens work with?
Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Lens. It also runs from a terminal or an agent's shell with csa run lens, and from the ContextStream web app.
Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Lens.
A terminal or an agent's shell:csa run lens, installed with ContextStream's command line.
The web app: the workspace's agent library.
How do I turn Lens on?
An owner or admin of your ContextStream workspace turns Lens on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.
Sign in to ContextStream: the button below opens the agent library on Lens.
An owner or admin switches Lens on for the workspace.
Pick the project it works in, and run it from the library, from your coding agent or with csa run.
Ask your coding agent to hand the job to Lens, or call it yourself: csa run lens in a terminal, or agents(action="run", agent="lens", input={...}) over MCP.
Connect ContextStream's MCP (it also writes each editor's connection):
A screenshot of a stack trace: Lens reads it, finds the failing code, and the decisions and lessons about it. Over MCP:
agents(action="run", agent="lens", input={"media_id":"00000000-0000-4000-8000-000000000001","question":"Why is the API failing?"})
In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):
csa run lens media_id=00000000-0000-4000-8000-000000000001 question='Why is the API failing?'
Input
Field
Type
What it is
media_id
string, required
The image, as a ContextStream media id. Inputs carry references, never bytes.
question
string
What you want to know about the image.
project_id
string
Search this project for related code.
save_note
boolean
Save the analysis as a note that links to the image.
What does Lens cost?
Lens costs 400 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (25 runs of Lens, if spent on nothing else), and Pro is $19 a month with 25,000.
A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.
Plans & Tasks Keeper answers one question about the status of the workspace's plans and tasks, citing their ids.
Tested on 106 real-world questions with the live model: all 106 passed: right plan, every cited fact checked against the data, and out-of-scope questions declinedv0.2.0