# Versions ## Update `client.agents.versions.update(stringpathUuid, VersionUpdateParamsbody?, RequestOptionsoptions?): VersionUpdateResponse` **put** `/v2/gen-ai/agents/{uuid}/versions` To update to a specific agent version, send a PUT request to `/v2/gen-ai/agents/{uuid}/versions`. ### Parameters - `pathUuid: string` - `body: VersionUpdateParams` - `body_uuid?: string` Agent unique identifier - `version_hash?: string` Unique identifier ### Returns - `VersionUpdateResponse` - `audit_header?: AuditHeader` An alternative way to provide auth information. for internal use only. - `actor_id?: string` - `actor_ip?: string` - `actor_uuid?: string` - `context_urn?: string` - `origin_application?: string` - `user_id?: string` - `user_uuid?: string` - `version_hash?: string` Unique identifier ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const version = await client.agents.versions.update('"123e4567-e89b-12d3-a456-426614174000"'); console.log(version.audit_header); ``` ## List `client.agents.versions.list(stringuuid, VersionListParamsquery?, RequestOptionsoptions?): VersionListResponse` **get** `/v2/gen-ai/agents/{uuid}/versions` To list all agent versions, send a GET request to `/v2/gen-ai/agents/{uuid}/versions`. ### Parameters - `uuid: string` - `query: VersionListParams` - `page?: number` Page number. - `per_page?: number` Items per page. ### Returns - `VersionListResponse` List of agent versions - `agent_versions?: Array` Agents - `id?: string` Unique identifier - `agent_uuid?: string` Uuid of the agent this version belongs to - `attached_child_agents?: Array` List of child agent relationships - `agent_name?: string` Name of the child agent - `child_agent_uuid?: string` Child agent unique identifier - `if_case?: string` If case - `is_deleted?: boolean` Child agent is deleted - `route_name?: string` Route name - `attached_functions?: Array` List of function versions - `description?: string` Description of the function - `faas_name?: string` FaaS name of the function - `faas_namespace?: string` FaaS namespace of the function - `is_deleted?: boolean` Whether the function is deleted - `name?: string` Name of the function - `attached_guardrails?: Array` List of guardrail version - `is_deleted?: boolean` Whether the guardrail is deleted - `name?: string` Guardrail Name - `priority?: number` Guardrail Priority - `uuid?: string` Guardrail UUID - `attached_knowledgebases?: Array` List of knowledge base agent versions - `is_deleted?: boolean` Deletet at date / time - `name?: string` Name of the knowledge base - `uuid?: string` Unique id of the knowledge base - `can_rollback?: boolean` Whether the version is able to be rolled back to - `created_at?: string` Creation date - `created_by_email?: string` User who created this version - `currently_applied?: boolean` Whether this is the currently applied configuration - `description?: string` Description of the agent - `instruction?: string` Instruction for the agent - `k?: number` K value for the agent's configuration - `max_tokens?: number` Max tokens setting for the agent - `model_name?: string` Name of model associated to the agent version - `name?: string` Name of the agent - `provide_citations?: boolean` Whether the agent should provide in-response citations - `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"` - `tags?: Array` Tags associated with the agent - `temperature?: number` Temperature setting for the agent - `top_p?: number` Top_p setting for the agent - `trigger_action?: string` Action triggering the configuration update - `version_hash?: string` Version hash - `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 versions = await client.agents.versions.list('"123e4567-e89b-12d3-a456-426614174000"'); console.log(versions.agent_versions); ```