Skip to content

Knowledge Bases

Attach Knowledge Bases to an Agent
agents.knowledge_bases.attach(stragent_uuid) -> APILinkKnowledgeBaseOutput
post/v2/gen-ai/agents/{agent_uuid}/knowledge_bases
Attach Knowledge Base to an Agent
agents.knowledge_bases.attach_single(strknowledge_base_uuid, KnowledgeBaseAttachSingleParams**kwargs) -> APILinkKnowledgeBaseOutput
post/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
Detach Knowledge Base from an Agent
agents.knowledge_bases.detach(strknowledge_base_uuid, KnowledgeBaseDetachParams**kwargs) -> KnowledgeBaseDetachResponse
delete/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
ModelsExpand Collapse
created_at: Optional[datetime]

Key creation date

formatdate-time
created_by: Optional[str]

Created by user id from DO

formatuint64
deleted_at: Optional[datetime]

Key deleted date

formatdate-time
name: Optional[str]

Name

updated_at: Optional[datetime]

Key last updated date

formatdate-time
uuid: Optional[str]

Uuid

Accepts one of the following:
Accepts one of the following:
"VISIBILITY_UNKNOWN"
"VISIBILITY_DISABLED"
"VISIBILITY_PLAYGROUND"
"VISIBILITY_PUBLIC"
"VISIBILITY_PRIVATE"
Accepts one of the following:
completed_datasources: Optional[int]

Number of datasources indexed completed

formatint64
created_at: Optional[datetime]

Creation date / time

formatdate-time
data_source_jobs: Optional[List[APIIndexedDataSource]]

Details on Data Sources included in the Indexing Job

completed_at: Optional[datetime]

Timestamp when data source completed indexing

formatdate-time
data_source_uuid: Optional[str]

Uuid of the indexed data source

error_details: Optional[str]

A detailed error description

error_msg: Optional[str]

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

failed_item_count: Optional[str]

Total count of files that have failed

formatuint64
indexed_file_count: Optional[str]

Total count of files that have been indexed

formatuint64
indexed_item_count: Optional[str]

Total count of files that have been indexed

formatuint64
removed_item_count: Optional[str]

Total count of files that have been removed

formatuint64
skipped_item_count: Optional[str]

Total count of files that have been skipped

formatuint64
started_at: Optional[datetime]

Timestamp when data source started indexing

formatdate-time
status: Optional[Literal["DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED", 4 more]]
Accepts one of the following:
"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"
"DATA_SOURCE_STATUS_CANCELLED"
total_bytes: Optional[str]

Total size of files in data source in bytes

formatuint64
total_bytes_indexed: Optional[str]

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

formatuint64
total_file_count: Optional[str]

Total file count in the data source

formatuint64
data_source_uuids: Optional[List[str]]
finished_at: Optional[datetime]
formatdate-time
is_report_available: Optional[bool]

Boolean value to determine if the indexing job details are available

knowledge_base_uuid: Optional[str]

Knowledge base id

phase: Optional[Literal["BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING", 4 more]]
Accepts one of the following:
"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_at: Optional[datetime]
formatdate-time
status: Optional[Literal["INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS", 4 more]]
Accepts one of the following:
"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"
tokens: Optional[int]

Number of tokens [This field is deprecated]

formatint64
total_datasources: Optional[int]

Number of datasources being indexed

formatint64
total_items_failed: Optional[str]

Total Items Failed

formatuint64
total_items_indexed: Optional[str]

Total Items Indexed

formatuint64
total_items_removed: Optional[str]

Total Items Removed

formatuint64
total_items_skipped: Optional[str]

Total Items Skipped

formatuint64
total_tokens: Optional[str]

Total Tokens Consumed By the Indexing Job

formatuint64
updated_at: Optional[datetime]

Last modified

formatdate-time
uuid: Optional[str]

Unique id

agreement: Optional[APIAgreement]

Agreement Description

description: Optional[str]
name: Optional[str]
url: Optional[str]
uuid: Optional[str]
created_at: Optional[datetime]

Creation date / time

formatdate-time
inference_name: Optional[str]

Internally used name

inference_version: Optional[str]

Internally used version

is_foundational: Optional[bool]

True if it is a foundational model provided by do

metadata: Optional[object]

Additional meta data

name: Optional[str]

Name of the model

parent_uuid: Optional[str]

Unique id of the model, this model is based on

provider: Optional[Literal["MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", "MODEL_PROVIDER_OPENAI"]]
Accepts one of the following:
"MODEL_PROVIDER_DIGITALOCEAN"
"MODEL_PROVIDER_ANTHROPIC"
"MODEL_PROVIDER_OPENAI"
updated_at: Optional[datetime]

Last modified

formatdate-time
upload_complete: Optional[bool]

Model has been fully uploaded

url: Optional[str]

Download url

usecases: Optional[List[Literal["MODEL_USECASE_UNKNOWN", "MODEL_USECASE_AGENT", "MODEL_USECASE_FINETUNED", 4 more]]]

Usecases of the model

Accepts one of the following:
"MODEL_USECASE_UNKNOWN"
"MODEL_USECASE_AGENT"
"MODEL_USECASE_FINETUNED"
"MODEL_USECASE_KNOWLEDGEBASE"
"MODEL_USECASE_GUARDRAIL"
"MODEL_USECASE_REASONING"
"MODEL_USECASE_SERVERLESS"
uuid: Optional[str]

Unique id

version: Optional[APIModelVersion]

Version Information about a Model

major: Optional[int]

Major version number

formatint64
minor: Optional[int]

Minor version number

formatint64
patch: Optional[int]

Patch version number

formatint64
description: Optional[str]
name: Optional[str]
url: Optional[str]
uuid: Optional[str]
Accepts one of the following:
Accepts one of the following:
major: Optional[int]

Major version number

formatint64
minor: Optional[int]

Minor version number

formatint64
patch: Optional[int]

Patch version number

formatint64
Accepts one of the following:
created_at: Optional[datetime]

Key creation date

formatdate-time
created_by: Optional[str]

Created by user id from DO

formatuint64
deleted_at: Optional[datetime]

Key deleted date

formatdate-time
models: Optional[List[APIAgentModel]]

Models supported by the openAI api key

agreement: Optional[APIAgreement]

Agreement Description

description: Optional[str]
name: Optional[str]
url: Optional[str]
uuid: Optional[str]
created_at: Optional[datetime]

Creation date / time

formatdate-time
inference_name: Optional[str]

Internally used name

inference_version: Optional[str]

Internally used version

is_foundational: Optional[bool]

True if it is a foundational model provided by do

metadata: Optional[object]

Additional meta data

name: Optional[str]

Name of the model

parent_uuid: Optional[str]

Unique id of the model, this model is based on

provider: Optional[Literal["MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", "MODEL_PROVIDER_OPENAI"]]
Accepts one of the following:
"MODEL_PROVIDER_DIGITALOCEAN"
"MODEL_PROVIDER_ANTHROPIC"
"MODEL_PROVIDER_OPENAI"
updated_at: Optional[datetime]

Last modified

formatdate-time
upload_complete: Optional[bool]

Model has been fully uploaded

url: Optional[str]

Download url

usecases: Optional[List[Literal["MODEL_USECASE_UNKNOWN", "MODEL_USECASE_AGENT", "MODEL_USECASE_FINETUNED", 4 more]]]

Usecases of the model

Accepts one of the following:
"MODEL_USECASE_UNKNOWN"
"MODEL_USECASE_AGENT"
"MODEL_USECASE_FINETUNED"
"MODEL_USECASE_KNOWLEDGEBASE"
"MODEL_USECASE_GUARDRAIL"
"MODEL_USECASE_REASONING"
"MODEL_USECASE_SERVERLESS"
uuid: Optional[str]

Unique id

version: Optional[APIModelVersion]

Version Information about a Model

major: Optional[int]

Major version number

formatint64
minor: Optional[int]

Minor version number

formatint64
patch: Optional[int]

Patch version number

formatint64
name: Optional[str]

Name

updated_at: Optional[datetime]

Key last updated date

formatdate-time
uuid: Optional[str]

Uuid

Accepts one of the following:
"RETRIEVAL_METHOD_UNKNOWN"
"RETRIEVAL_METHOD_REWRITE"
"RETRIEVAL_METHOD_STEP_BACK"
"RETRIEVAL_METHOD_SUB_QUERIES"
"RETRIEVAL_METHOD_NONE"
completed_datasources: Optional[int]

Number of datasources indexed completed

formatint64
created_at: Optional[datetime]

Creation date / time

formatdate-time
data_source_jobs: Optional[List[APIIndexedDataSource]]

Details on Data Sources included in the Indexing Job

completed_at: Optional[datetime]

Timestamp when data source completed indexing

formatdate-time
data_source_uuid: Optional[str]

Uuid of the indexed data source

error_details: Optional[str]

A detailed error description

error_msg: Optional[str]

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

failed_item_count: Optional[str]

Total count of files that have failed

formatuint64
indexed_file_count: Optional[str]

Total count of files that have been indexed

formatuint64
indexed_item_count: Optional[str]

Total count of files that have been indexed

formatuint64
removed_item_count: Optional[str]

Total count of files that have been removed

formatuint64
skipped_item_count: Optional[str]

Total count of files that have been skipped

formatuint64
started_at: Optional[datetime]

Timestamp when data source started indexing

formatdate-time
status: Optional[Literal["DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED", 4 more]]
Accepts one of the following:
"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"
"DATA_SOURCE_STATUS_CANCELLED"
total_bytes: Optional[str]

Total size of files in data source in bytes

formatuint64
total_bytes_indexed: Optional[str]

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

formatuint64
total_file_count: Optional[str]

Total file count in the data source

formatuint64
data_source_uuids: Optional[List[str]]
finished_at: Optional[datetime]
formatdate-time
is_report_available: Optional[bool]

Boolean value to determine if the indexing job details are available

knowledge_base_uuid: Optional[str]

Knowledge base id

phase: Optional[Literal["BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING", 4 more]]
Accepts one of the following:
"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_at: Optional[datetime]
formatdate-time
status: Optional[Literal["INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS", 4 more]]
Accepts one of the following:
"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"
tokens: Optional[int]

Number of tokens [This field is deprecated]

formatint64
total_datasources: Optional[int]

Number of datasources being indexed

formatint64
total_items_failed: Optional[str]

Total Items Failed

formatuint64
total_items_indexed: Optional[str]

Total Items Indexed

formatuint64
total_items_removed: Optional[str]

Total Items Removed

formatuint64
total_items_skipped: Optional[str]

Total Items Skipped

formatuint64
total_tokens: Optional[str]

Total Tokens Consumed By the Indexing Job

formatuint64
updated_at: Optional[datetime]

Last modified

formatdate-time
uuid: Optional[str]

Unique id

agreement: Optional[APIAgreement]

Agreement Description

description: Optional[str]
name: Optional[str]
url: Optional[str]
uuid: Optional[str]
created_at: Optional[datetime]

Creation date / time

formatdate-time
inference_name: Optional[str]

Internally used name

inference_version: Optional[str]

Internally used version

is_foundational: Optional[bool]

True if it is a foundational model provided by do

metadata: Optional[object]

Additional meta data

name: Optional[str]

Name of the model

parent_uuid: Optional[str]

Unique id of the model, this model is based on

provider: Optional[Literal["MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", "MODEL_PROVIDER_OPENAI"]]
Accepts one of the following:
"MODEL_PROVIDER_DIGITALOCEAN"
"MODEL_PROVIDER_ANTHROPIC"
"MODEL_PROVIDER_OPENAI"
updated_at: Optional[datetime]

Last modified

formatdate-time
upload_complete: Optional[bool]

Model has been fully uploaded

url: Optional[str]

Download url

usecases: Optional[List[Literal["MODEL_USECASE_UNKNOWN", "MODEL_USECASE_AGENT", "MODEL_USECASE_FINETUNED", 4 more]]]

Usecases of the model

Accepts one of the following:
"MODEL_USECASE_UNKNOWN"
"MODEL_USECASE_AGENT"
"MODEL_USECASE_FINETUNED"
"MODEL_USECASE_KNOWLEDGEBASE"
"MODEL_USECASE_GUARDRAIL"
"MODEL_USECASE_REASONING"
"MODEL_USECASE_SERVERLESS"
uuid: Optional[str]

Unique id

version: Optional[APIModelVersion]

Version Information about a Model

major: Optional[int]

Major version number

formatint64
minor: Optional[int]

Minor version number

formatint64
patch: Optional[int]

Patch version number

formatint64
Accepts one of the following: