> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Remote Media Resolver • AI Agent SDK

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

# RemoteMediaResolver

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

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:&lt;path&gt;` 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

<CardGroup cols={2}>
  <Card title="owns_path()" icon="function" href="../functions/RemoteMediaResolver-owns_path">
    Return True if `path` refers to a file inside this sandbox.
  </Card>

  <Card title="fetch_to_local()" icon="function" href="../functions/RemoteMediaResolver-fetch_to_local">
    Fetch `remote_path` out of the sandbox to a local path.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L2730">
  `praisonaiagents/gateway/protocols.py` at line 2730
</Card>
