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.- AWS S3
- Google Cloud
- Azure Blob
CloudSourceError with the exact pip install … command to run.
Credentials
Each provider uses its SDK’s standard credential discovery — no extra PraisonAI config.AWS S3 (boto3)
AWS S3 (boto3)
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.Google Cloud Storage (google-cloud-storage)
Google Cloud Storage (google-cloud-storage)
Point
GOOGLE_APPLICATION_CREDENTIALS at a service-account JSON file, run gcloud auth application-default login, or use a workload-identity-attached environment.Azure Blob (azure-storage-blob)
Azure Blob (azure-storage-blob)
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
.pdfis 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
TemporaryDirectoryand 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
Install only the SDK you need
Install only the SDK you need
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.Prefer IAM roles over long-lived keys
Prefer IAM roles over long-lived keys
In production, attach a bucket-scoped IAM role (or workload identity) instead of exporting long-lived access keys.
Pin the Azure account with the HTTPS URL form
Pin the Azure account with the HTTPS URL form
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.Index once into a persistent store
Index once into a persistent store
Cloud downloads happen on every index. Cache expensive parses by indexing into a persistent vector store once, not on every process start.
Cite the original URI, not the temp path
Cite the original URI, not the temp path
The original cloud URI is preserved in metadata. Use it as your citation source — the temp path is deleted after indexing.
Related
Knowledge Base
Chunking, embedding, and search options.
Knowledge Source Types
What
Agent(knowledge=...) accepts today.
