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

Method

> This is a method of the [**RemoteSkillSourceProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/RemoteSkillSourceProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) 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

**cache\_dir** `Path` *required*

No description available.

### Returns

**Returns** `List[Path]`

The result of the operation.

## Used By

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

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/protocols.py#L26)
>
> `praisonaiagents/skills/protocols.py` at line 26


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.