List Datasources
List all datasources in the current project.Response
Array of datasource objects
Create Datasource
Create a new datasource to store and organize your knowledge base.Request Body
Datasource name (1-50 characters)
Datasource type:
STRUCTURED- For structured data like databases, APIs, or CSV filesUNSTRUCTURED- For documents, text files, web pages, and other unstructured content
Detailed description of the datasource
Brief summary of what this datasource contains
Schema definition for metadata fields that resources in this datasource can have
Response
Returns the created datasource object.Get Datasource
Get detailed information about a specific datasource.Path Parameters
The unique identifier of the datasource
Response
Returns the datasource object with all details.Update Datasource
Update an existing datasource’s properties.Path Parameters
The unique identifier of the datasource
Request Body
All fields are optional and only provided fields will be updated.Updated datasource name
Updated description
Updated summary
Updated metadata schema (this will replace the existing schema)
Response
Returns the updated datasource object.Delete Datasource
Delete a datasource and all its associated resources.Path Parameters
The unique identifier of the datasource to delete
Response
Returns a 200 status code on successful deletion.Datasource Types
Understanding the difference between datasource types helps you choose the right approach for your use case:- UNSTRUCTURED
- STRUCTURED
Best for: Documents, web pages, text files, PDFs, imagesFeatures:
- Automatic text extraction and processing
- Vector embeddings for semantic search
- Support for various file formats
- Flexible metadata schema
- Documentation websites
- Knowledge bases
- Support articles
- Research papers
- Company policies
- PDF documents
- Web pages
- Markdown files
- Text documents
- Images with text
Metadata Schema Design
The metadata schema defines additional fields that can be attached to resources in your datasource:Field Types
String (str)
String (str)
- Use for: Categories, tags, names, descriptions
- Example:
category: "user-guide",author: "John Doe" - Searchable: Yes, supports exact and partial matching
Integer (int)
Integer (int)
- Use for: Priorities, counts, ratings, years
- Example:
priority: 1,rating: 5,year: 2024 - Searchable: Yes, supports range queries
Float (float)
Float (float)
- Use for: Scores, percentages, measurements
- Example:
confidence: 0.95,price: 29.99 - Searchable: Yes, supports range queries
Boolean (bool)
Boolean (bool)
- Use for: Flags, status indicators
- Example:
published: true,featured: false - Searchable: Yes, supports exact matching
Best Practices
1
Plan Your Schema
Define metadata fields that will help with filtering and organization
2
Keep It Simple
Start with essential fields and add more as needed
3
Use Consistent Naming
Use lowercase with underscores (e.g.,
content_type, last_updated)4
Consider Searchability
Think about how agents and users will filter and search your content
Metadata schemas can be updated after creation, but changes may affect existing resources and search functionality.