Skip to content
  • Auto
  • Light
  • Dark

Knowledge Bases

Knowledge Bases

Knowledge Bases

Create a Knowledge Base
knowledge_bases.create(KnowledgeBaseCreateParams**kwargs) -> knowledge_baseAPIKnowledgeBaseKnowledgeBaseCreateResponse
post/v2/gen-ai/knowledge_bases
Delete a Knowledge Base
knowledge_bases.delete(struuid) -> uuidstrKnowledgeBaseDeleteResponse
delete/v2/gen-ai/knowledge_bases/{uuid}
List Knowledge Bases
knowledge_bases.list(KnowledgeBaseListParams**kwargs) -> knowledge_baseslistlinksAPILinksmetaAPIMetaKnowledgeBaseListResponse
get/v2/gen-ai/knowledge_bases
Retrieve Information About an Existing Knowledge Base
knowledge_bases.retrieve(struuid) -> database_statusliteralknowledge_baseAPIKnowledgeBaseKnowledgeBaseRetrieveResponse
get/v2/gen-ai/knowledge_bases/{uuid}
Update a Knowledge Base
knowledge_bases.update(strpath_uuid, KnowledgeBaseUpdateParams**kwargs) -> knowledge_baseAPIKnowledgeBaseKnowledgeBaseUpdateResponse
put/v2/gen-ai/knowledge_bases/{uuid}
API Knowledge Base
APIKnowledgeBaseclass

Knowledgebase Description

ShowShow
added_to_agent_atdatetime
optional

Time when the knowledge base was added to the agent

formatdate-time
created_atdatetime
optional

Creation date / time

formatdate-time
database_idstr
optional
embedding_model_uuidstr
optional
is_publicbool
optional

Whether the knowledge base is public or not

last_indexing_jobAPIIndexingJob
optional

IndexingJob description

namestr
optional

Name of knowledge base

project_idstr
optional
regionstr
optional

Region code

tagslist
optional
Optional[List[str]]

Tags to organize related resources

updated_atdatetime
optional

Last modified

formatdate-time
user_idstr
optional

Id of user that created the knowledge base

formatint64
uuidstr
optional

Unique id for knowledge base

Knowledge BasesData Sources

Add Data Source to a Knowledge Base
knowledge_bases.data_sources.create(strpath_knowledge_base_uuid, DataSourceCreateParams**kwargs) -> knowledge_base_data_sourceAPIKnowledgeBaseDataSourceDataSourceCreateResponse
post/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
Delete a Data Source from a Knowledge Base
knowledge_bases.data_sources.delete(strdata_source_uuid, DataSourceDeleteParams**kwargs) -> data_source_uuidstrknowledge_base_uuidstrDataSourceDeleteResponse
delete/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
List Data Sources for a Knowledge Base
knowledge_bases.data_sources.list(strknowledge_base_uuid, DataSourceListParams**kwargs) -> knowledge_base_data_sourceslistlinksAPILinksmetaAPIMetaDataSourceListResponse
get/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
API File Upload Data Source
APIFileUploadDataSourceclass

File to upload as data source for knowledge base.

ShowShow
original_file_namestr
optional

The original file name

size_in_bytesstr
optional

The size of the file in bytes

formatuint64
stored_object_keystr
optional

The object key the file was stored as

API Knowledge Base Data Source
APIKnowledgeBaseDataSourceclass

Data Source configuration for Knowledge Bases

ShowShow
aws_data_sourcebucket_namestritem_pathstrregionstrAwsDataSource
optional

AWS S3 Data Source for Display

Hide ParametersShow Parameters
bucket_namestr
optional

Spaces bucket name

item_pathstr
optional
regionstr
optional

Region of bucket

bucket_namestr
optional

Name of storage bucket - Deprecated, moved to data_source_details

created_atdatetime
optional

Creation date / time

formatdate-time
file_upload_data_sourceAPIFileUploadDataSource
optional

File to upload as data source for knowledge base.

item_pathstr
optional

Path of folder or object in bucket - Deprecated, moved to data_source_details

last_datasource_indexing_jobAPIIndexedDataSource
optional
last_indexing_jobAPIIndexingJob
optional

IndexingJob description

regionstr
optional

Region code - Deprecated, moved to data_source_details

spaces_data_sourceAPISpacesDataSource
optional

Spaces Bucket Data Source

updated_atdatetime
optional

Last modified

formatdate-time
uuidstr
optional

Unique id of knowledge base

web_crawler_data_sourceAPIWebCrawlerDataSource
optional

WebCrawlerDataSource

API Spaces Data Source
APISpacesDataSourceclass

Spaces Bucket Data Source

ShowShow
bucket_namestr
optional

Spaces bucket name

item_pathstr
optional
regionstr
optional

Region of bucket

API Web Crawler Data Source
APIWebCrawlerDataSourceclass

WebCrawlerDataSource

ShowShow
base_urlstr
optional

The base url to crawl.

crawling_optionliteral
optional
Optional[Literal["UNKNOWN", "SCOPED", "PATH", 2 more]]

Options for specifying how URLs found on pages should be handled.

  • UNKNOWN: Default unknown value
  • SCOPED: Only include the base URL.
  • PATH: Crawl the base URL and linked pages within the URL path.
  • DOMAIN: Crawl the base URL and linked pages within the same domain.
  • SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
Hide ParametersShow Parameters
"UNKNOWN"
"SCOPED"
"PATH"
"DOMAIN"
"SUBDOMAINS"
embed_mediabool
optional

Whether to ingest and index media (images, etc.) on web pages.

Aws Data Source
AwsDataSourceclass

AWS S3 Data Source

ShowShow
bucket_namestr
optional

Spaces bucket name

item_pathstr
optional
key_idstr
optional

The AWS Key ID

regionstr
optional

Region of bucket

secret_keystr
optional

The AWS Secret Key

Knowledge BasesIndexing Jobs

Start Indexing Job for a Knowledge Base
knowledge_bases.indexing_jobs.create(IndexingJobCreateParams**kwargs) -> jobAPIIndexingJobIndexingJobCreateResponse
post/v2/gen-ai/indexing_jobs
List Indexing Jobs for a Knowledge Base
knowledge_bases.indexing_jobs.list(IndexingJobListParams**kwargs) -> jobslistlinksAPILinksmetaAPIMetaIndexingJobListResponse
get/v2/gen-ai/indexing_jobs
Retrieve Status of Indexing Job for a Knowledge Base
knowledge_bases.indexing_jobs.retrieve(struuid) -> jobAPIIndexingJobIndexingJobRetrieveResponse
get/v2/gen-ai/indexing_jobs/{uuid}
List Data Sources for Indexing Job for a Knowledge Base
knowledge_bases.indexing_jobs.retrieve_data_sources(strindexing_job_uuid) -> indexed_data_sourceslistIndexingJobRetrieveDataSourcesResponse
get/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources
Cancel Indexing Job for a Knowledge Base
knowledge_bases.indexing_jobs.update_cancel(strpath_uuid, IndexingJobUpdateCancelParams**kwargs) -> jobAPIIndexingJobIndexingJobUpdateCancelResponse
put/v2/gen-ai/indexing_jobs/{uuid}/cancel
API Indexed Data Source
APIIndexedDataSourceclass
ShowShow
completed_atdatetime
optional

Timestamp when data source completed indexing

formatdate-time
data_source_uuidstr
optional

Uuid of the indexed data source

error_detailsstr
optional

A detailed error description

error_msgstr
optional

A string code provinding a hint which part of the system experienced an error

failed_item_countstr
optional

Total count of files that have failed

formatuint64
indexed_file_countstr
optional

Total count of files that have been indexed

formatuint64
indexed_item_countstr
optional

Total count of files that have been indexed

formatuint64
removed_item_countstr
optional

Total count of files that have been removed

formatuint64
skipped_item_countstr
optional

Total count of files that have been skipped

formatuint64
started_atdatetime
optional

Timestamp when data source started indexing

formatdate-time
statusliteral
optional
Optional[Literal["DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED", 3 more]]
Hide ParametersShow Parameters
"DATA_SOURCE_STATUS_UNKNOWN"
"DATA_SOURCE_STATUS_IN_PROGRESS"
"DATA_SOURCE_STATUS_UPDATED"
"DATA_SOURCE_STATUS_PARTIALLY_UPDATED"
"DATA_SOURCE_STATUS_NOT_UPDATED"
"DATA_SOURCE_STATUS_FAILED"
total_bytesstr
optional

Total size of files in data source in bytes

formatuint64
total_bytes_indexedstr
optional

Total size of files in data source in bytes that have been indexed

formatuint64
total_file_countstr
optional

Total file count in the data source

formatuint64
API Indexing Job
APIIndexingJobclass

IndexingJob description

ShowShow
completed_datasourcesint
optional

Number of datasources indexed completed

formatint64
created_atdatetime
optional

Creation date / time

formatdate-time
data_source_uuidslist
optional
Optional[List[str]]
finished_atdatetime
optional
formatdate-time
knowledge_base_uuidstr
optional

Knowledge base id

phaseliteral
optional
Optional[Literal["BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING", 4 more]]
Hide ParametersShow Parameters
"BATCH_JOB_PHASE_UNKNOWN"
"BATCH_JOB_PHASE_PENDING"
"BATCH_JOB_PHASE_RUNNING"
"BATCH_JOB_PHASE_SUCCEEDED"
"BATCH_JOB_PHASE_FAILED"
"BATCH_JOB_PHASE_ERROR"
"BATCH_JOB_PHASE_CANCELLED"
started_atdatetime
optional
formatdate-time
statusliteral
optional
Optional[Literal["INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS", 4 more]]
Hide ParametersShow Parameters
"INDEX_JOB_STATUS_UNKNOWN"
"INDEX_JOB_STATUS_PARTIAL"
"INDEX_JOB_STATUS_IN_PROGRESS"
"INDEX_JOB_STATUS_COMPLETED"
"INDEX_JOB_STATUS_FAILED"
"INDEX_JOB_STATUS_NO_CHANGES"
"INDEX_JOB_STATUS_PENDING"
tokensint
optional

Number of tokens

formatint64
total_datasourcesint
optional

Number of datasources being indexed

formatint64
updated_atdatetime
optional

Last modified

formatdate-time
uuidstr
optional

Unique id