> ## 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.

# Fetch To Local • AI Agent SDK

> fetch_to_local: Fetch ``remote_path`` out of the sandbox to a local path.

# fetch\_to\_local

<div className="flex items-center gap-2">
  <Badge color="blue">Async</Badge>
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**RemoteMediaResolver**](../classes/RemoteMediaResolver) class in the [**protocols**](../modules/protocols) module.

Fetch `remote_path` out of the sandbox to a local path.

Returns the gateway-local filesystem path of the fetched copy, which the
caller is expected to re-screen through the outbound-path guard before
delivery.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def fetch_to_local(remote_path: str) -> str
```

## Parameters

<ParamField query="remote_path" type="str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  The result of the operation.
</ResponseField>

## Source

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