> ## 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 • AI Agent SDK

> fetch: Sync the remote source into ``cache_dir`` and return skill dirs.

# fetch

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

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

Sync the remote source into `cache_dir` and return skill dirs.

Returns the list of local directories containing fetched skills (the
parent directories that hold skill subdirectories). On network error,
implementations should fall back to the last-good cache rather than
raise, so discovery keeps working offline.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def fetch(cache_dir: Path) -> List[Path]
```

## Parameters

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

### Returns

<ResponseField name="Returns" type="List[Path]">
  The result of the operation.
</ResponseField>

## Used By

* [`fetch_remote_skill_dirs`](../functions/fetch_remote_skill_dirs)

## Source

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