# Agents ## Create `agents.create(AgentCreateParams**kwargs) -> AgentCreateResponse` **post** `/v2/gen-ai/agents` To create a new agent, send a POST request to `/v2/gen-ai/agents`. The response body contains a JSON object with the newly created agent object. ### Parameters - **anthropic\_key\_uuid:** `str` Optional Anthropic API key ID to use with Anthropic models - **description:** `str` A text description of the agent, not used in inference - **instruction:** `str` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions) for best practices. - **knowledge\_base\_uuid:** `List[str]` Ids of the knowledge base(s) to attach to the agent - **model\_uuid:** `str` Identifier for the foundation model. - **name:** `str` Agent name - **openai\_key\_uuid:** `str` Optional OpenAI API key ID to use with OpenAI models - **project\_id:** `str` The id of the DigitalOcean project this agent will belong to - **region:** `str` The DigitalOcean region to deploy your agent in - **tags:** `List[str]` Agent tag to organize related resources ### Returns - `class AgentCreateResponse` Information about a newly created Agent - **agent:** `Optional[APIAgent]` An Agent ### Example ```python from do_gradientai import GradientAI client = GradientAI() agent = client.agents.create() print(agent.agent) ``` ## Retrieve `agents.retrieve(struuid) -> AgentRetrieveResponse` **get** `/v2/gen-ai/agents/{uuid}` To retrieve details of an agent, GET request to `/v2/gen-ai/agents/{uuid}`. The response body is a JSON object containing the agent. ### Parameters - **uuid:** `str` ### Returns - `class AgentRetrieveResponse` One Agent - **agent:** `Optional[APIAgent]` An Agent ### Example ```python from do_gradientai import GradientAI client = GradientAI() agent = client.agents.retrieve( "uuid", ) print(agent.agent) ``` ## Update `agents.update(strpath_uuid, AgentUpdateParams**kwargs) -> AgentUpdateResponse` **put** `/v2/gen-ai/agents/{uuid}` To update an agent, send a PUT request to `/v2/gen-ai/agents/{uuid}`. The response body is a JSON object containing the agent. ### Parameters - **uuid:** `str` - **anthropic\_key\_uuid:** `str` Optional anthropic key uuid for use with anthropic models - **conversation\_logs\_enabled:** `bool` Optional update of conversation logs enabled - **description:** `str` Agent description - **instruction:** `str` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions) for best practices. - **k:** `int` How many results should be considered from an attached knowledge base - **max\_tokens:** `int` Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response. - **model\_uuid:** `str` Identifier for the foundation model. - **name:** `str` Agent name - **openai\_key\_uuid:** `str` Optional OpenAI key uuid for use with OpenAI models - **project\_id:** `str` The id of the DigitalOcean project this agent will belong to - **provide\_citations:** `bool` - **retrieval\_method:** `APIRetrievalMethod` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none - **tags:** `List[str]` A set of abitrary tags to organize your agent - **temperature:** `float` Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation. - **top\_p:** `float` Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses. - **uuid:** `str` ### Returns - `class AgentUpdateResponse` Information about an updated agent - **agent:** `Optional[APIAgent]` An Agent ### Example ```python from do_gradientai import GradientAI client = GradientAI() agent = client.agents.update( path_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", ) print(agent.agent) ``` ## List `agents.list(AgentListParams**kwargs) -> AgentListResponse` **get** `/v2/gen-ai/agents` To list all agents, send a GET request to `/v2/gen-ai/agents`. ### Parameters - **only\_deployed:** `bool` Only list agents that are deployed. - **page:** `int` Page number. - **per\_page:** `int` Items per page. ### Returns - `class AgentListResponse` List of Agents - **agents:** `Optional[List[Agent]]` Agents - **chatbot:** `Optional[AgentChatbot]` A Chatbot - **button\_background\_color:** `Optional[str]` - **logo:** `Optional[str]` - **name:** `Optional[str]` Name of chatbot - **primary\_color:** `Optional[str]` - **secondary\_color:** `Optional[str]` - **starting\_message:** `Optional[str]` - **chatbot\_identifiers:** `Optional[List[AgentChatbotIdentifier]]` Chatbot identifiers - **agent\_chatbot\_identifier:** `Optional[str]` Agent chatbot identifier - **created\_at:** `Optional[datetime]` Creation date / time - **deployment:** `Optional[AgentDeployment]` Description of deployment - **created\_at:** `Optional[datetime]` Creation date / time - **name:** `Optional[str]` Name - **status:** `Optional[Literal["STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", 6 more]]` - `"STATUS_UNKNOWN"` - `"STATUS_WAITING_FOR_DEPLOYMENT"` - `"STATUS_DEPLOYING"` - `"STATUS_RUNNING"` - `"STATUS_FAILED"` - `"STATUS_WAITING_FOR_UNDEPLOYMENT"` - `"STATUS_UNDEPLOYING"` - `"STATUS_UNDEPLOYMENT_FAILED"` - `"STATUS_DELETED"` - **updated\_at:** `Optional[datetime]` Last modified - **url:** `Optional[str]` Access your deployed agent here - **uuid:** `Optional[str]` Unique id - **visibility:** `Optional[APIDeploymentVisibility]` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys - **description:** `Optional[str]` Description of agent - **if\_case:** `Optional[str]` Instructions to the agent on how to use the route - **instruction:** `Optional[str]` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions) for best practices. - **k:** `Optional[int]` How many results should be considered from an attached knowledge base - **max\_tokens:** `Optional[int]` Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response. - **model:** `Optional[APIAgentModel]` Description of a Model - **name:** `Optional[str]` Agent name - **project\_id:** `Optional[str]` The DigitalOcean project ID associated with the agent - **provide\_citations:** `Optional[bool]` Whether the agent should provide in-response citations - **region:** `Optional[str]` Region code - **retrieval\_method:** `Optional[APIRetrievalMethod]` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none - **route\_created\_at:** `Optional[datetime]` Creation of route date / time - **route\_created\_by:** `Optional[str]` Id of user that created the route - **route\_name:** `Optional[str]` Route name - **route\_uuid:** `Optional[str]` Route uuid - **tags:** `Optional[List[str]]` A set of abitrary tags to organize your agent - **temperature:** `Optional[float]` Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation. - **template:** `Optional[AgentTemplate]` Represents an AgentTemplate entity - **created\_at:** `Optional[datetime]` The agent template's creation date - **description:** `Optional[str]` Deprecated - Use summary instead - **guardrails:** `Optional[List[AgentTemplateGuardrail]]` List of guardrails associated with the agent template - **priority:** `Optional[int]` Priority of the guardrail - **uuid:** `Optional[str]` Uuid of the guardrail - **instruction:** `Optional[str]` Instructions for the agent template - **k:** `Optional[int]` The 'k' value for the agent template - **knowledge\_bases:** `Optional[List[APIKnowledgeBase]]` List of knowledge bases associated with the agent template - **added\_to\_agent\_at:** `Optional[datetime]` Time when the knowledge base was added to the agent - **created\_at:** `Optional[datetime]` Creation date / time - **database\_id:** `Optional[str]` - **embedding\_model\_uuid:** `Optional[str]` - **is\_public:** `Optional[bool]` Whether the knowledge base is public or not - **last\_indexing\_job:** `Optional[APIIndexingJob]` IndexingJob description - **name:** `Optional[str]` Name of knowledge base - **project\_id:** `Optional[str]` - **region:** `Optional[str]` Region code - **tags:** `Optional[List[str]]` Tags to organize related resources - **updated\_at:** `Optional[datetime]` Last modified - **user\_id:** `Optional[str]` Id of user that created the knowledge base - **uuid:** `Optional[str]` Unique id for knowledge base - **long\_description:** `Optional[str]` The long description of the agent template - **max\_tokens:** `Optional[int]` The max_tokens setting for the agent template - **model:** `Optional[APIAgentModel]` Description of a Model - **name:** `Optional[str]` Name of the agent template - **short\_description:** `Optional[str]` The short description of the agent template - **summary:** `Optional[str]` The summary of the agent template - **tags:** `Optional[List[str]]` List of tags associated with the agent template - **temperature:** `Optional[float]` The temperature setting for the agent template - **template\_type:** `Optional[Literal["AGENT_TEMPLATE_TYPE_STANDARD", "AGENT_TEMPLATE_TYPE_ONE_CLICK"]]` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template - `"AGENT_TEMPLATE_TYPE_STANDARD"` - `"AGENT_TEMPLATE_TYPE_ONE_CLICK"` - **top\_p:** `Optional[float]` The top_p setting for the agent template - **updated\_at:** `Optional[datetime]` The agent template's last updated date - **uuid:** `Optional[str]` Unique id - **top\_p:** `Optional[float]` Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses. - **updated\_at:** `Optional[datetime]` Last modified - **url:** `Optional[str]` Access your agent under this url - **user\_id:** `Optional[str]` Id of user that created the agent - **uuid:** `Optional[str]` Unique agent id - **version\_hash:** `Optional[str]` The latest version of the agent - **links:** `Optional[APILinks]` Links to other pages - **meta:** `Optional[APIMeta]` Meta information about the data set ### Example ```python from do_gradientai import GradientAI client = GradientAI() agents = client.agents.list() print(agents.agents) ``` ## Delete `agents.delete(struuid) -> AgentDeleteResponse` **delete** `/v2/gen-ai/agents/{uuid}` To delete an agent, send a DELETE request to `/v2/gen-ai/agents/{uuid}`. ### Parameters - **uuid:** `str` ### Returns - `class AgentDeleteResponse` Info about a deleted agent - **agent:** `Optional[APIAgent]` An Agent ### Example ```python from do_gradientai import GradientAI client = GradientAI() agent = client.agents.delete( "uuid", ) print(agent.agent) ``` ## Update Status `agents.update_status(strpath_uuid, AgentUpdateStatusParams**kwargs) -> AgentUpdateStatusResponse` **put** `/v2/gen-ai/agents/{uuid}/deployment_visibility` Check whether an agent is public or private. To update the agent status, send a PUT request to `/v2/gen-ai/agents/{uuid}/deployment_visibility`. ### Parameters - **uuid:** `str` - **uuid:** `str` - **visibility:** `APIDeploymentVisibility` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys ### Returns - `class AgentUpdateStatusResponse` UpdateAgentDeploymentVisbilityOutput description - **agent:** `Optional[APIAgent]` An Agent ### Example ```python from do_gradientai import GradientAI client = GradientAI() response = client.agents.update_status( path_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", ) print(response.agent) ``` ## Domain Types ### API Agent - `class APIAgent` An Agent - **anthropic\_api\_key:** `Optional[APIAnthropicAPIKeyInfo]` Anthropic API Key Info - **api\_key\_infos:** `Optional[List[APIAgentAPIKeyInfo]]` Api key infos - **created\_at:** `Optional[datetime]` Creation date - **created\_by:** `Optional[str]` Created by - **deleted\_at:** `Optional[datetime]` Deleted date - **name:** `Optional[str]` Name - **secret\_key:** `Optional[str]` - **uuid:** `Optional[str]` Uuid - **api\_keys:** `Optional[List[APIKey]]` Api keys - **api\_key:** `Optional[str]` Api key - **chatbot:** `Optional[Chatbot]` A Chatbot - **button\_background\_color:** `Optional[str]` - **logo:** `Optional[str]` - **name:** `Optional[str]` Name of chatbot - **primary\_color:** `Optional[str]` - **secondary\_color:** `Optional[str]` - **starting\_message:** `Optional[str]` - **chatbot\_identifiers:** `Optional[List[ChatbotIdentifier]]` Chatbot identifiers - **agent\_chatbot\_identifier:** `Optional[str]` Agent chatbot identifier - **child\_agents:** `Optional[List[APIAgent]]` Child agents - **conversation\_logs\_enabled:** `Optional[bool]` Whether conversation logs are enabled for the agent - **created\_at:** `Optional[datetime]` Creation date / time - **deployment:** `Optional[Deployment]` Description of deployment - **created\_at:** `Optional[datetime]` Creation date / time - **name:** `Optional[str]` Name - **status:** `Optional[Literal["STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", 6 more]]` - `"STATUS_UNKNOWN"` - `"STATUS_WAITING_FOR_DEPLOYMENT"` - `"STATUS_DEPLOYING"` - `"STATUS_RUNNING"` - `"STATUS_FAILED"` - `"STATUS_WAITING_FOR_UNDEPLOYMENT"` - `"STATUS_UNDEPLOYING"` - `"STATUS_UNDEPLOYMENT_FAILED"` - `"STATUS_DELETED"` - **updated\_at:** `Optional[datetime]` Last modified - **url:** `Optional[str]` Access your deployed agent here - **uuid:** `Optional[str]` Unique id - **visibility:** `Optional[APIDeploymentVisibility]` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys - **description:** `Optional[str]` Description of agent - **functions:** `Optional[List[Function]]` - **api\_key:** `Optional[str]` Api key - **created\_at:** `Optional[datetime]` Creation date / time - **created\_by:** `Optional[str]` Created by user id from DO - **description:** `Optional[str]` Agent description - **faas\_name:** `Optional[str]` - **faas\_namespace:** `Optional[str]` - **input\_schema:** `Optional[object]` - **name:** `Optional[str]` Name - **output\_schema:** `Optional[object]` - **updated\_at:** `Optional[datetime]` Last modified - **url:** `Optional[str]` Download your agent here - **uuid:** `Optional[str]` Unique id - **guardrails:** `Optional[List[Guardrail]]` The guardrails the agent is attached to - **agent\_uuid:** `Optional[str]` - **created\_at:** `Optional[datetime]` - **default\_response:** `Optional[str]` - **description:** `Optional[str]` - **guardrail\_uuid:** `Optional[str]` - **is\_attached:** `Optional[bool]` - **is\_default:** `Optional[bool]` - **metadata:** `Optional[object]` - **name:** `Optional[str]` - **priority:** `Optional[int]` - **type:** `Optional[Literal["GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK", "GUARDRAIL_TYPE_SENSITIVE_DATA", "GUARDRAIL_TYPE_CONTENT_MODERATION"]]` - `"GUARDRAIL_TYPE_UNKNOWN"` - `"GUARDRAIL_TYPE_JAILBREAK"` - `"GUARDRAIL_TYPE_SENSITIVE_DATA"` - `"GUARDRAIL_TYPE_CONTENT_MODERATION"` - **updated\_at:** `Optional[datetime]` - **uuid:** `Optional[str]` - **if\_case:** `Optional[str]` - **instruction:** `Optional[str]` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions) for best practices. - **k:** `Optional[int]` - **knowledge\_bases:** `Optional[List[APIKnowledgeBase]]` Knowledge bases - **added\_to\_agent\_at:** `Optional[datetime]` Time when the knowledge base was added to the agent - **created\_at:** `Optional[datetime]` Creation date / time - **database\_id:** `Optional[str]` - **embedding\_model\_uuid:** `Optional[str]` - **is\_public:** `Optional[bool]` Whether the knowledge base is public or not - **last\_indexing\_job:** `Optional[APIIndexingJob]` IndexingJob description - **name:** `Optional[str]` Name of knowledge base - **project\_id:** `Optional[str]` - **region:** `Optional[str]` Region code - **tags:** `Optional[List[str]]` Tags to organize related resources - **updated\_at:** `Optional[datetime]` Last modified - **user\_id:** `Optional[str]` Id of user that created the knowledge base - **uuid:** `Optional[str]` Unique id for knowledge base - **logging\_config:** `Optional[LoggingConfig]` - **galileo\_project\_id:** `Optional[str]` Galileo project identifier - **galileo\_project\_name:** `Optional[str]` Name of the Galileo project - **log\_stream\_id:** `Optional[str]` Identifier for the log stream - **log\_stream\_name:** `Optional[str]` Name of the log stream - **max\_tokens:** `Optional[int]` - **model:** `Optional[APIAgentModel]` Description of a Model - **name:** `Optional[str]` Agent name - **openai\_api\_key:** `Optional[APIOpenAIAPIKeyInfo]` OpenAI API Key Info - **parent\_agents:** `Optional[List[APIAgent]]` Parent agents - **project\_id:** `Optional[str]` - **provide\_citations:** `Optional[bool]` Whether the agent should provide in-response citations - **region:** `Optional[str]` Region code - **retrieval\_method:** `Optional[APIRetrievalMethod]` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none - **route\_created\_at:** `Optional[datetime]` Creation of route date / time - **route\_created\_by:** `Optional[str]` - **route\_name:** `Optional[str]` Route name - **route\_uuid:** `Optional[str]` - **tags:** `Optional[List[str]]` Agent tag to organize related resources - **temperature:** `Optional[float]` - **template:** `Optional[Template]` Represents an AgentTemplate entity - **created\_at:** `Optional[datetime]` The agent template's creation date - **description:** `Optional[str]` Deprecated - Use summary instead - **guardrails:** `Optional[List[TemplateGuardrail]]` List of guardrails associated with the agent template - **priority:** `Optional[int]` Priority of the guardrail - **uuid:** `Optional[str]` Uuid of the guardrail - **instruction:** `Optional[str]` Instructions for the agent template - **k:** `Optional[int]` The 'k' value for the agent template - **knowledge\_bases:** `Optional[List[APIKnowledgeBase]]` List of knowledge bases associated with the agent template - **added\_to\_agent\_at:** `Optional[datetime]` Time when the knowledge base was added to the agent - **created\_at:** `Optional[datetime]` Creation date / time - **database\_id:** `Optional[str]` - **embedding\_model\_uuid:** `Optional[str]` - **is\_public:** `Optional[bool]` Whether the knowledge base is public or not - **last\_indexing\_job:** `Optional[APIIndexingJob]` IndexingJob description - **name:** `Optional[str]` Name of knowledge base - **project\_id:** `Optional[str]` - **region:** `Optional[str]` Region code - **tags:** `Optional[List[str]]` Tags to organize related resources - **updated\_at:** `Optional[datetime]` Last modified - **user\_id:** `Optional[str]` Id of user that created the knowledge base - **uuid:** `Optional[str]` Unique id for knowledge base - **long\_description:** `Optional[str]` The long description of the agent template - **max\_tokens:** `Optional[int]` The max_tokens setting for the agent template - **model:** `Optional[APIAgentModel]` Description of a Model - **name:** `Optional[str]` Name of the agent template - **short\_description:** `Optional[str]` The short description of the agent template - **summary:** `Optional[str]` The summary of the agent template - **tags:** `Optional[List[str]]` List of tags associated with the agent template - **temperature:** `Optional[float]` The temperature setting for the agent template - **template\_type:** `Optional[Literal["AGENT_TEMPLATE_TYPE_STANDARD", "AGENT_TEMPLATE_TYPE_ONE_CLICK"]]` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template - `"AGENT_TEMPLATE_TYPE_STANDARD"` - `"AGENT_TEMPLATE_TYPE_ONE_CLICK"` - **top\_p:** `Optional[float]` The top_p setting for the agent template - **updated\_at:** `Optional[datetime]` The agent template's last updated date - **uuid:** `Optional[str]` Unique id - **top\_p:** `Optional[float]` - **updated\_at:** `Optional[datetime]` Last modified - **url:** `Optional[str]` Access your agent under this url - **user\_id:** `Optional[str]` Id of user that created the agent - **uuid:** `Optional[str]` Unique agent id - **version\_hash:** `Optional[str]` The latest version of the agent - **workspace:** `Optional[APIWorkspace]` ### API Agent API Key Info - `class APIAgentAPIKeyInfo` Agent API Key Info - **created\_at:** `Optional[datetime]` Creation date - **created\_by:** `Optional[str]` Created by - **deleted\_at:** `Optional[datetime]` Deleted date - **name:** `Optional[str]` Name - **secret\_key:** `Optional[str]` - **uuid:** `Optional[str]` Uuid ### API Agent Model - `class APIAgentModel` Description of a Model - **agreement:** `Optional[APIAgreement]` Agreement Description - **created\_at:** `Optional[datetime]` Creation date / 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"]]` - `"MODEL_PROVIDER_DIGITALOCEAN"` - `"MODEL_PROVIDER_ANTHROPIC"` - `"MODEL_PROVIDER_OPENAI"` - **updated\_at:** `Optional[datetime]` Last modified - **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 - `"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 ### API Anthropic API Key Info - `class APIAnthropicAPIKeyInfo` Anthropic API Key Info - **created\_at:** `Optional[datetime]` Key creation date - **created\_by:** `Optional[str]` Created by user id from DO - **deleted\_at:** `Optional[datetime]` Key deleted date - **name:** `Optional[str]` Name - **updated\_at:** `Optional[datetime]` Key last updated date - **uuid:** `Optional[str]` Uuid ### API Deployment Visibility - **APIDeploymentVisibility:** `Literal["VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND", 2 more]` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys - `"VISIBILITY_UNKNOWN"` - `"VISIBILITY_DISABLED"` - `"VISIBILITY_PLAYGROUND"` - `"VISIBILITY_PUBLIC"` - `"VISIBILITY_PRIVATE"` ### API OpenAI API Key Info - `class APIOpenAIAPIKeyInfo` OpenAI API Key Info - **created\_at:** `Optional[datetime]` Key creation date - **created\_by:** `Optional[str]` Created by user id from DO - **deleted\_at:** `Optional[datetime]` Key deleted date - **models:** `Optional[List[APIAgentModel]]` Models supported by the openAI api key - **agreement:** `Optional[APIAgreement]` Agreement Description - **created\_at:** `Optional[datetime]` Creation date / 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"]]` - `"MODEL_PROVIDER_DIGITALOCEAN"` - `"MODEL_PROVIDER_ANTHROPIC"` - `"MODEL_PROVIDER_OPENAI"` - **updated\_at:** `Optional[datetime]` Last modified - **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 - `"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 - **name:** `Optional[str]` Name - **updated\_at:** `Optional[datetime]` Key last updated date - **uuid:** `Optional[str]` Uuid ### API Retrieval Method - **APIRetrievalMethod:** `Literal["RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK", 2 more]` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none - `"RETRIEVAL_METHOD_UNKNOWN"` - `"RETRIEVAL_METHOD_REWRITE"` - `"RETRIEVAL_METHOD_STEP_BACK"` - `"RETRIEVAL_METHOD_SUB_QUERIES"` - `"RETRIEVAL_METHOD_NONE"` ### API Workspace - `class APIWorkspace` - **agents:** `Optional[List[APIAgent]]` Agents - **created\_at:** `Optional[datetime]` Creation date - **created\_by:** `Optional[str]` The id of user who created this workspace - **created\_by\_email:** `Optional[str]` The email of the user who created this workspace - **deleted\_at:** `Optional[datetime]` Deleted date - **description:** `Optional[str]` Description of the workspace - **evaluation\_test\_cases:** `Optional[List[APIEvaluationTestCase]]` Evaluations - **archived\_at:** `Optional[datetime]` - **created\_at:** `Optional[datetime]` - **created\_by\_user\_email:** `Optional[str]` - **created\_by\_user\_id:** `Optional[str]` - **dataset:** `Optional[Dataset]` - **created\_at:** `Optional[datetime]` Time created at. - **dataset\_name:** `Optional[str]` Name of the dataset. - **dataset\_uuid:** `Optional[str]` UUID of the dataset. - **file\_size:** `Optional[str]` The size of the dataset uploaded file in bytes. - **has\_ground\_truth:** `Optional[bool]` Does the dataset have a ground truth column? - **row\_count:** `Optional[int]` Number of rows in the dataset. - **dataset\_name:** `Optional[str]` - **dataset\_uuid:** `Optional[str]` - **description:** `Optional[str]` - **latest\_version\_number\_of\_runs:** `Optional[int]` - **metrics:** `Optional[List[APIEvaluationMetric]]` - **description:** `Optional[str]` - **inverted:** `Optional[bool]` If true, the metric is inverted, meaning that a lower value is better. - **metric\_name:** `Optional[str]` - **metric\_type:** `Optional[Literal["METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY", "METRIC_TYPE_RAG_AND_TOOL"]]` - `"METRIC_TYPE_UNSPECIFIED"` - `"METRIC_TYPE_GENERAL_QUALITY"` - `"METRIC_TYPE_RAG_AND_TOOL"` - **metric\_uuid:** `Optional[str]` - **metric\_value\_type:** `Optional[Literal["METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", "METRIC_VALUE_TYPE_PERCENTAGE"]]` - `"METRIC_VALUE_TYPE_UNSPECIFIED"` - `"METRIC_VALUE_TYPE_NUMBER"` - `"METRIC_VALUE_TYPE_STRING"` - `"METRIC_VALUE_TYPE_PERCENTAGE"` - **range\_max:** `Optional[float]` The maximum value for the metric. - **range\_min:** `Optional[float]` The minimum value for the metric. - **name:** `Optional[str]` - **star\_metric:** `Optional[APIStarMetric]` - **test\_case\_uuid:** `Optional[str]` - **total\_runs:** `Optional[int]` - **updated\_at:** `Optional[datetime]` - **updated\_by\_user\_email:** `Optional[str]` - **updated\_by\_user\_id:** `Optional[str]` - **version:** `Optional[int]` - **name:** `Optional[str]` Name of the workspace - **updated\_at:** `Optional[datetime]` Update date - **uuid:** `Optional[str]` Unique id