## List `client.agents.list(AgentListParamsquery?, RequestOptionsoptions?): AgentListResponse` **get** `/v2/gen-ai/agents` To list all agents, send a GET request to `/v2/gen-ai/agents`. ### Parameters - `query: AgentListParams` - `only_deployed?: boolean` Only list agents that are deployed. - `page?: number` Page number. - `per_page?: number` Items per page. ### Returns - `AgentListResponse` List of Agents - `agents?: Array` Agents - `chatbot?: Chatbot` A Chatbot - `button_background_color?: string` - `logo?: string` - `name?: string` Name of chatbot - `primary_color?: string` - `secondary_color?: string` - `starting_message?: string` - `chatbot_identifiers?: Array` Chatbot identifiers - `agent_chatbot_identifier?: string` Agent chatbot identifier - `created_at?: string` Creation date / time - `deployment?: Deployment` Description of deployment - `created_at?: string` Creation date / time - `name?: string` Name - `status?: "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?: string` Last modified - `url?: string` Access your deployed agent here - `uuid?: string` Unique id - `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 - `"VISIBILITY_UNKNOWN"` - `"VISIBILITY_DISABLED"` - `"VISIBILITY_PLAYGROUND"` - `"VISIBILITY_PUBLIC"` - `"VISIBILITY_PRIVATE"` - `description?: string` Description of agent - `if_case?: string` Instructions to the agent on how to use the route - `instruction?: string` 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?: number` How many results should be considered from an attached knowledge base - `max_tokens?: number` 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?: APIAgentModel` Description of a Model - `agreement?: APIAgreement` Agreement Description - `description?: string` - `name?: string` - `url?: string` - `uuid?: string` - `created_at?: string` Creation date / time - `inference_name?: string` Internally used name - `inference_version?: string` Internally used version - `is_foundational?: boolean` True if it is a foundational model provided by do - `metadata?: unknown` Additional meta data - `name?: string` Name of the model - `parent_uuid?: string` Unique id of the model, this model is based on - `provider?: "MODEL_PROVIDER_DIGITALOCEAN" | "MODEL_PROVIDER_ANTHROPIC" | "MODEL_PROVIDER_OPENAI"` - `"MODEL_PROVIDER_DIGITALOCEAN"` - `"MODEL_PROVIDER_ANTHROPIC"` - `"MODEL_PROVIDER_OPENAI"` - `updated_at?: string` Last modified - `upload_complete?: boolean` Model has been fully uploaded - `url?: string` Download url - `usecases?: Array<"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?: string` Unique id - `version?: APIModelVersion` Version Information about a Model - `major?: number` Major version number - `minor?: number` Minor version number - `patch?: number` Patch version number - `name?: string` Agent name - `project_id?: string` The DigitalOcean project ID associated with the agent - `provide_citations?: boolean` Whether the agent should provide in-response citations - `region?: string` Region code - `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 - `"RETRIEVAL_METHOD_UNKNOWN"` - `"RETRIEVAL_METHOD_REWRITE"` - `"RETRIEVAL_METHOD_STEP_BACK"` - `"RETRIEVAL_METHOD_SUB_QUERIES"` - `"RETRIEVAL_METHOD_NONE"` - `route_created_at?: string` Creation of route date / time - `route_created_by?: string` Id of user that created the route - `route_name?: string` Route name - `route_uuid?: string` Route uuid - `tags?: Array` A set of abitrary tags to organize your agent - `temperature?: number` 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?: Template` Represents an AgentTemplate entity - `created_at?: string` The agent template's creation date - `description?: string` Deprecated - Use summary instead - `guardrails?: Array` List of guardrails associated with the agent template - `priority?: number` Priority of the guardrail - `uuid?: string` Uuid of the guardrail - `instruction?: string` Instructions for the agent template - `k?: number` The 'k' value for the agent template - `knowledge_bases?: Array` List of knowledge bases associated with the agent template - `added_to_agent_at?: string` Time when the knowledge base was added to the agent - `created_at?: string` Creation date / time - `database_id?: string` - `embedding_model_uuid?: string` - `is_public?: boolean` Whether the knowledge base is public or not - `last_indexing_job?: APIIndexingJob` IndexingJob description - `completed_datasources?: number` Number of datasources indexed completed - `created_at?: string` Creation date / time - `data_source_uuids?: Array` - `finished_at?: string` - `knowledge_base_uuid?: string` Knowledge base id - `phase?: "BATCH_JOB_PHASE_UNKNOWN" | "BATCH_JOB_PHASE_PENDING" | "BATCH_JOB_PHASE_RUNNING" | 4 more` - `"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?: string` - `status?: "INDEX_JOB_STATUS_UNKNOWN" | "INDEX_JOB_STATUS_PARTIAL" | "INDEX_JOB_STATUS_IN_PROGRESS" | 4 more` - `"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?: number` Number of tokens - `total_datasources?: number` Number of datasources being indexed - `total_items_failed?: string` Total Items Failed - `total_items_indexed?: string` Total Items Indexed - `total_items_skipped?: string` Total Items Skipped - `updated_at?: string` Last modified - `uuid?: string` Unique id - `name?: string` Name of knowledge base - `project_id?: string` - `region?: string` Region code - `tags?: Array` Tags to organize related resources - `updated_at?: string` Last modified - `user_id?: string` Id of user that created the knowledge base - `uuid?: string` Unique id for knowledge base - `long_description?: string` The long description of the agent template - `max_tokens?: number` The max_tokens setting for the agent template - `model?: APIAgentModel` Description of a Model - `agreement?: APIAgreement` Agreement Description - `description?: string` - `name?: string` - `url?: string` - `uuid?: string` - `created_at?: string` Creation date / time - `inference_name?: string` Internally used name - `inference_version?: string` Internally used version - `is_foundational?: boolean` True if it is a foundational model provided by do - `metadata?: unknown` Additional meta data - `name?: string` Name of the model - `parent_uuid?: string` Unique id of the model, this model is based on - `provider?: "MODEL_PROVIDER_DIGITALOCEAN" | "MODEL_PROVIDER_ANTHROPIC" | "MODEL_PROVIDER_OPENAI"` - `"MODEL_PROVIDER_DIGITALOCEAN"` - `"MODEL_PROVIDER_ANTHROPIC"` - `"MODEL_PROVIDER_OPENAI"` - `updated_at?: string` Last modified - `upload_complete?: boolean` Model has been fully uploaded - `url?: string` Download url - `usecases?: Array<"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?: string` Unique id - `version?: APIModelVersion` Version Information about a Model - `major?: number` Major version number - `minor?: number` Minor version number - `patch?: number` Patch version number - `name?: string` Name of the agent template - `short_description?: string` The short description of the agent template - `summary?: string` The summary of the agent template - `tags?: Array` List of tags associated with the agent template - `temperature?: number` The temperature setting for the agent template - `template_type?: "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?: number` The top_p setting for the agent template - `updated_at?: string` The agent template's last updated date - `uuid?: string` Unique id - `top_p?: number` 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?: string` Last modified - `url?: string` Access your agent under this url - `user_id?: string` Id of user that created the agent - `uuid?: string` Unique agent id - `version_hash?: string` The latest version of the agent - `links?: APILinks` Links to other pages - `pages?: Pages` Information about how to reach other pages - `first?: string` First page - `last?: string` Last page - `next?: string` Next page - `previous?: string` Previous page - `meta?: APIMeta` Meta information about the data set - `page?: number` The current page - `pages?: number` Total number of pages - `total?: number` Total amount of items over all pages ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const agents = await client.agents.list(); console.log(agents.agents); ```