> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Remote Content

> Upload content from registered cloud sources via the AgentOS Knowledge API.

## Register sources

```python theme={null}
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.remote_content import S3Config, GitHubConfig

knowledge = Knowledge(
    vector_db=vector_db,
    contents_db=contents_db,
    content_sources=[
        S3Config(id="company-s3", name="Company S3", bucket_name="my-bucket"),
        GitHubConfig(id="docs-repo", name="Docs Repo", repo="acme/docs", token="..."),
    ],
)
```

See [Cloud Storage Sources](https://agno-v2.mintlify.site/knowledge/concepts/cloud-storage.md) for the provider classes (`S3Config`, `GcsConfig`, `SharePointConfig`, `GitHubConfig`, `AzureBlobConfig`) and their parameters.

Once a Knowledge instance has `content_sources` registered, AgentOS exposes them through the Knowledge API.

```bash theme={null}
# Upload a file from a registered S3 source
curl -X POST http://localhost:7777/knowledge/remote-content \
  -F "config_id=company-s3" \
  -F "path=reports/q4-2025.pdf" \
  -F "name=Q4 Report"
```

## Discover registered sources

The root `/knowledge/config` endpoint lists every configured remote source under `remote_content_sources`:

```bash theme={null}
curl http://localhost:7777/knowledge/config | jq '.remote_content_sources'
```

```json theme={null}
[
  { "id": "company-s3", "name": "Company S3", "type": "s3", "metadata": null, "prefix": null },
  { "id": "docs-repo",  "name": "Docs Repo",  "type": "github", "metadata": null, "prefix": null }
]
```

To scope to a specific Knowledge instance, use the per-instance endpoint:

```bash theme={null}
curl http://localhost:7777/knowledge/{knowledge_id}/sources
```

The `id` returned here is the value to pass as `config_id` when uploading.

| `type` value | Provider |
| - | - |
| `s3` | Amazon S3 |
| `gcs` | Google Cloud Storage |
| `sharepoint` | SharePoint |
| `github` | GitHub |
| `azureblob` | Azure Blob Storage |

## Upload remote content

`POST /knowledge/remote-content` accepts `application/x-www-form-urlencoded` and processes the content asynchronously.

```python Python theme={null}
import requests

response = requests.post(
    "http://localhost:7777/knowledge/remote-content",
    data={
        "config_id": "company-s3",
        "path": "reports/q4-2025.pdf",
        "name": "Q4 Report",
        "metadata": '{"team": "finance", "year": 2025}',
    },
)

# 202 Accepted while the content is being processed
print(response.status_code, response.json())
```

```bash cURL theme={null}
curl -X POST http://localhost:7777/knowledge/remote-content \
  -F "config_id=company-s3" \
  -F "path=reports/q4-2025.pdf" \
  -F "name=Q4 Report" \
  -F 'metadata={"team": "finance", "year": 2025}'
```

### Path semantics

* A trailing `/` ingests every file under the prefix as a folder. Example: `reports/`.
* No trailing `/` ingests a single file. Example: `reports/q4-2025.pdf`.

See the [upload-remote-content reference](https://agno-v2.mintlify.site/reference-api/schema/knowledge/upload-remote-content.md) for the full field list.

## Per-request overrides with `source_params`

`source_params` lets one configured source serve multiple targets. GitHub is the currently supported case: pass `repo` to point a single `GitHubConfig` at a different repository per request.

```bash theme={null}
curl -X POST http://localhost:7777/knowledge/remote-content \
  -F "config_id=docs-repo" \
  -F "path=README.md" \
  -F 'source_params={"repo": "acme/other-repo"}'
```

Without `source_params`, the request uses the values baked into the registered config.

## Browse files in a source

`GET /knowledge/{knowledge_id}/sources/{source_id}/files` returns paginated files and folder prefixes inside a source.

> [!WARNING]
>
> File listing is currently supported in **S3** only.

```bash theme={null}
curl "http://localhost:7777/knowledge/{knowledge_id}/sources/company-s3/files?prefix=reports/&limit=50"
```

```json theme={null}
{
  "source_id": "company-s3",
  "source_name": "Company S3",
  "prefix": "reports/",
  "folders": [
    { "prefix": "reports/2025/", "name": "2025", "is_empty": false }
  ],
  "files": [
    {
      "key": "reports/annual-summary.pdf",
      "name": "annual-summary.pdf",
      "size": 102400,
      "last_modified": "2025-01-15T10:30:00Z",
      "content_type": "application/pdf"
    }
  ],
  "meta": { "page": 1, "limit": 50, "total_pages": 1, "total_count": 1 }
}
```

See the [list-files-in-source reference](https://agno-v2.mintlify.site/reference-api/schema/knowledge/list-files-in-source.md) for `prefix`, `limit`, `page`, `delimiter`, and `db_id`.

For non-S3 sources, list available content with the provider's own tooling (for example, the GitHub API or the Azure portal) and pass the resulting path directly to `POST /knowledge/remote-content`.

## Next Steps

> **[Cloud Storage Sources](https://agno-v2.mintlify.site/knowledge/concepts/cloud-storage.md)**
>
> Configure S3, GCS, SharePoint, GitHub, and Azure Blob providers.

> **[Manage Knowledge](https://agno-v2.mintlify.site/agent-os/knowledge/manage-knowledge.md)**
>
> Attach Knowledge instances to AgentOS and find their IDs.

> **[Filter Knowledge](https://agno-v2.mintlify.site/agent-os/knowledge/filter-knowledge.md)**
>
> Apply metadata filters when agents search the knowledge base.

> **[Upload Remote Content API](https://agno-v2.mintlify.site/reference-api/schema/knowledge/upload-remote-content.md)**
>
> Full reference for `POST /knowledge/remote-content`.


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