List Files In Source
Select a knowledge base
Register a Knowledge with contents_db on AgentOS, an Agent or a Team. Read the actual generated ID from GET /config under knowledge.knowledge_instances; use that knowledge_id in the request's selector. It is not an arbitrary Knowledge.id. A selector is required when multiple instances make the request ambiguous (400); no configured knowledge base returns 503. If both selectors are supplied, knowledge_id takes precedence over db_id.
Ingestion and search also require suitable readers, vector storage, an embedder where needed, and their dependencies and credentials. See Knowledge.
S3 file browser
This endpoint currently supports S3Config only. Other registered source types return 400; RemoteKnowledge returns 501. S3 listing requires the AWS SDK, credentials and permission to list the configured bucket/prefix. Use a source_id from the selected knowledge base's source list.
Page numbers start at 1 and limit must be between 1 and 1000. prefix and delimiter control folder navigation. Registering or ingesting a GCS, SharePoint, GitHub or Azure Blob source does not make it browsable through this endpoint.
/knowledge/{knowledge_id}/sources/{source_id}/filesList available files and folders in a specific content source. Supports pagination and folder navigation.
Authorization
HTTPBearer In: header
Path Parameters
ID of the knowledge base
ID of the content source
Query Parameters
Path prefix to filter files
Number of files per page
1 <= value <= 1000100Page number (1-indexed)
1 <= value1Folder delimiter (enables folder grouping)
"/"The ID of the database to use
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl --request GET 'https://example.com/knowledge/string/sources/string/files'{ "source_id": "company-s3", "source_name": "Company Documents", "prefix": "reports/", "folders": [ { "prefix": "reports/2024/", "name": "2024", "is_empty": false } ], "files": [ { "key": "reports/annual-summary.pdf", "name": "annual-summary.pdf", "size": 102400, "last_modified": "2024-01-15T10:30:00Z", "content_type": "application/pdf" } ], "meta": { "page": 1, "limit": 100, "total_pages": 1, "total_count": 1 }}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}