Remote Media Resolver • AI Agent SDK

RemoteMediaResolver: Resolves a sandbox-local media path to a gateway-local deliverable path.

RemoteMediaResolver

Defined in the protocols module.

AI Agent

Resolves a sandbox-local media path to a gateway-local deliverable path.

When an agent runs in a remote/serverless sandbox (Modal, E2B, Daytona, Fly.io, SSH host, remote Docker, …) and emits a `MEDIA:<path>` directive, the referenced file lives on the sandbox filesystem, not the gateway host. The outbound media path only delivers local files, so such a directive would otherwise be silently dropped.

A resolver bridges that gap: the active sandbox backend (which already exposes a `download_file/read_file` primitive) satisfies this protocol so the wrapper’s outbound media path can pull the artifact down into a local delivery cache and then deliver it, without the wrapper importing any concrete heavy sandbox SDK.

Methods

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3339