Summary
Add an agent-accessible tool for viewing image files stored in the sandbox.
The tool should let the agent provide a sandbox image path and receive the image through a model-compatible visual input channel. This gives the agent a reliable way to inspect images that arrived as Telegram files/documents or were restored from attachment storage.
Motivating use case
Send multiple images to the Black Key Telegram bot and ask:
create 2 collage - randomly select 6 pictures in a colloege
The agent should be able to inspect the individual images stored in the sandbox, choose the requested images, and create the collages.
Proposed behavior
- Add a tool such as
sandbox_view_image.
- Accept a sandbox-relative image path or an attachment reference.
- Validate that the target is an allowed sandbox file.
- Support common image formats and MIME types.
- Return the image in a model-compatible visual response, not only metadata or a text path.
- Preserve individual image boundaries when viewing multiple images.
- Return a clear, bounded error for missing, invalid, or unsupported files.
Security and reliability requirements
- Restrict reads to the active sandbox and approved attachment locations.
- Do not allow path traversal or arbitrary host filesystem access.
- Enforce reasonable file-size and image-dimension limits.
- Keep the tool read-only.
- Ensure the tool works after attachment restoration or sandbox reconnect when the file is available.
Acceptance criteria
Summary
Add an agent-accessible tool for viewing image files stored in the sandbox.
The tool should let the agent provide a sandbox image path and receive the image through a model-compatible visual input channel. This gives the agent a reliable way to inspect images that arrived as Telegram files/documents or were restored from attachment storage.
Motivating use case
Send multiple images to the Black Key Telegram bot and ask:
The agent should be able to inspect the individual images stored in the sandbox, choose the requested images, and create the collages.
Proposed behavior
sandbox_view_image.Security and reliability requirements
Acceptance criteria