Skip to main content
Pass a cloud object storage URI as a knowledge source and PraisonAI downloads and indexes it automatically.

Quick Start

1

AWS S3

Install boto3 and pass an s3:// URI.
2

Google Cloud Storage

Install google-cloud-storage and pass a gs:// URI (gcs:// also works).
3

Azure Blob

Install azure-storage-blob and pass an az://container/blob URI or an Azure Blob HTTPS URL.

Choose Your Provider

Match where your file lives to the right URI form.

Install the Right SDK

Each SDK is imported only when a URI of that scheme is used — installing PraisonAI does not pull in all three.
A missing SDK raises CloudSourceError with the exact pip install … command to run.

Credentials

Each provider uses its SDK’s standard credential discovery — no extra PraisonAI config.
Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (plus optional AWS_SESSION_TOKEN), or use ~/.aws/credentials, or an IAM role attached to your EC2 / ECS / Lambda environment.
Point GOOGLE_APPLICATION_CREDENTIALS at a service-account JSON file, run gcloud auth application-default login, or use a workload-identity-attached environment.
Set AZURE_STORAGE_CONNECTION_STRING. For an HTTPS Azure blob URL, DefaultAzureCredential (from optional azure-identity) is tried when the connection string is missing or names a different account.

URI Forms


How It Works

A cloud URI is resolved to a local temp file, read by the same reader used for local files, then the temp file is removed. Design notes worth knowing:
  • Extension is preserved. Readers dispatch on file extension — a PDF kept as .pdf is parsed correctly rather than read as plain text.
  • Ordering matters. The cloud branch runs before the http(s):// branch, so an Azure blob HTTPS URL is downloaded, not handed to the web fetcher.
  • SDKs stay optional. Each cloud SDK is imported only when its scheme is used.
  • Temp file removed after indexing. The download lives in a TemporaryDirectory and is cleaned up automatically.
  • Original URI kept in metadata. Citations reference the s3://… / gs://… URI, not the meaningless temp path.
  • Azure account is bound to the URL. A URL for account A is never served from configured account B — the account named in the URL wins.

Mix Cloud and Local Sources

Cloud URIs, local files, and raw text can share one list.

Error Reference

CloudSourceError reports the failure instead of silently indexing an empty document.

Best Practices

Each SDK is imported lazily. Install just boto3, google-cloud-storage, or azure-storage-blob for the provider you use — don’t bloat your app with all three.
In production, attach a bucket-scoped IAM role (or workload identity) instead of exporting long-lived access keys.
When multiple Azure accounts are in play, use the https://<account>.blob.core.windows.net/... form — the account in the URL wins over AZURE_STORAGE_CONNECTION_STRING.
Cloud downloads happen on every index. Cache expensive parses by indexing into a persistent vector store once, not on every process start.
The original cloud URI is preserved in metadata. Use it as your citation source — the temp path is deleted after indexing.

Knowledge Base

Chunking, embedding, and search options.

Knowledge Source Types

What Agent(knowledge=...) accepts today.