Summary
I would like the Anna Agent Session API to support native image inputs, allowing the multimodal model used by the current session to inspect images directly instead of requiring every image task to go through the two-step upload_local_file and analyze_image tool workflow.
When I asked an Agent Session to analyze a local image, I observed the following execution flow:
session.run (the text prompt contains a local image path)
→ Agent calls upload_local_file
→ Agent receives a temporary image URL
→ Agent calls analyze_image
→ analyze_image returns a textual description
→ Agent generates the final response from that description
This workflow allows a session to process images indirectly, but it is not equivalent to having the primary model receive the image and reason about it together with the current session context. It has significant limitations in latency, multi-image processing, and information fidelity.
Test Results
The test used a 2560 × 1440 PNG image with a file size of approximately 2.82 MB. The session.run input contained only the local image path and an instruction to analyze it. The session then called upload_local_file and analyze_image on its own.
Based on the tool start and end timestamps in the session stream:
| Stage | Duration |
|---|---|
upload_local_file |
approximately 18.86 seconds |
analyze_image |
approximately 10.02 seconds |
| Combined tool execution time | approximately 28.88 seconds |
Entire session.run |
approximately 77.95 seconds |
This is a single test with one image, so these results should not be treated as fixed performance numbers across all networks and runtime environments. However, they demonstrate that the current image-analysis workflow adds overhead beyond model inference, including tool selection, file upload, waiting for tool results, and a second pass in which the primary Agent turns the analysis into a final response.
The impact is likely to grow when a task needs to inspect multiple images. Use cases such as PowerPoint visual review, design comparison, and analysis of consecutive pages commonly require several images in one request. Running the full “upload → analyze → return text” workflow separately for each image can introduce substantial cumulative latency.
Information Loss in the Current Workflow
After inspecting an image, analyze_image returns a textual description. The primary Agent receives this description rather than the original image, creating a lossy information bottleneck.
If analyze_image omits a detail from its textual response, the primary Agent cannot reason directly about that detail later. Examples include:
- precise element positions, spacing, dimensions, and alignment;
- small text, partial obstruction, clipping, and overflow;
- local data points in charts and their visual relationships;
- subtle differences between multiple images;
- visual issues that can only be evaluated in combination with existing session context.
In addition, if the image-analysis result contains an OCR or visual-understanding error, the primary Agent usually cannot verify it against the original image. It can only continue reasoning from the text it received. This workflow may be sufficient for high-level image descriptions, but information loss directly affects reliability in tasks such as PowerPoint slide review, UI inspection, chart interpretation, design comparison, and iterative visual refinement.
Requested Capability
The current test app calls the API as follows:
await anna.agent.session.run({
app_session_uuid,
content,
});
I suggest extending this existing API with an optional image URL input while preserving the current app_session_uuid and plain-text content behavior. For example:
await anna.agent.session.run({
app_session_uuid: "aps_xxx",
content: "Please check these PowerPoint slides for text overflow, overlapping elements, or obvious layout issues.",
image_urls: [
"https://example.com/slide-1.png",
"https://example.com/slide-2.png",
],
});
The image_urls field is only an illustration of a possible API shape; the Anna team can determine the final field name and image-reference structure. The important requirement is to keep existing text-only calls fully compatible while allowing developers to provide one or more images as native inputs for the current session turn.
If Anna requires local images to be stored through an upload API first, the resulting image reference should still be usable as a native Agent Session input. The current session’s multimodal model should be able to inspect that image directly instead of requiring an additional analyze_image call that converts it to text.
More specifically, I would like the API to provide the following behavior:
- Preserve the existing plain-text
contentfield insession.runwhile adding optional image URL or image-reference inputs. - Support multiple images in a single request so the model can compare and reason across them jointly.
- When the selected model supports vision, send the images and session context to the same model.
- When the selected model does not support vision, return a clear capability error or optionally fall back to
analyze_imagefor compatibility. - Keep
upload_local_fileandanalyze_imageavailable for explicit file uploads, standalone image analysis, and models without native multimodal support, rather than making them the only path for all image-understanding tasks.
Expected Benefits
Native multimodal inputs for Agent Sessions would:
- reduce the additional latency caused by intermediate tool selection and execution;
- avoid compressing complete visual information into a one-time textual description before the primary Agent can reason about it;
- improve the reliability of multi-image comparison, spatial reasoning, and detailed visual review;
- allow images, session history, user instructions, and other context to be understood together in the same inference;
- align the Agent Session API with the input patterns offered by current multimodal model APIs, reducing integration and prompt-orchestration work for application developers.
I hope the Anna team will consider adding native multimodal image inputs to Agent Sessions while retaining the existing tool-based image-analysis workflow as a complementary compatibility option.