Update
Update an Agent
To update an agent, send a PUT request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.
Path Parameters
Body Parameters
Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
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.
Identifier for the foundation model.
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.
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.
Returns
curl https://api.digitalocean.com//v2/gen-ai/agents/$UUID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GRADIENTAI_API_KEY" \
-d '{}'{
"agent": {
"anthropic_api_key": {
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"deleted_at": "2019-12-27T18:11:19.117Z",
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z",
"uuid": "uuid"
},
"api_key_infos": [
{
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"deleted_at": "2019-12-27T18:11:19.117Z",
"name": "name",
"secret_key": "secret_key",
"uuid": "uuid"
}
],
"api_keys": [
{
"api_key": "api_key"
}
],
"chatbot": {
"button_background_color": "button_background_color",
"logo": "logo",
"name": "name",
"primary_color": "primary_color",
"secondary_color": "secondary_color",
"starting_message": "starting_message"
},
"chatbot_identifiers": [
{
"agent_chatbot_identifier": "agent_chatbot_identifier"
}
],
"child_agents": [],
"created_at": "2019-12-27T18:11:19.117Z",
"deployment": {
"created_at": "2019-12-27T18:11:19.117Z",
"name": "name",
"status": "STATUS_UNKNOWN",
"updated_at": "2019-12-27T18:11:19.117Z",
"url": "url",
"uuid": "uuid",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "description",
"functions": [
{
"api_key": "api_key",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"description": "description",
"faas_name": "faas_name",
"faas_namespace": "faas_namespace",
"input_schema": {},
"name": "name",
"output_schema": {},
"updated_at": "2019-12-27T18:11:19.117Z",
"url": "url",
"uuid": "uuid"
}
],
"guardrails": [
{
"agent_uuid": "agent_uuid",
"created_at": "2019-12-27T18:11:19.117Z",
"default_response": "default_response",
"description": "description",
"guardrail_uuid": "guardrail_uuid",
"is_attached": true,
"is_default": true,
"metadata": {},
"name": "name",
"priority": 0,
"type": "GUARDRAIL_TYPE_UNKNOWN",
"updated_at": "2019-12-27T18:11:19.117Z",
"uuid": "uuid"
}
],
"if_case": "if_case",
"instruction": "instruction",
"k": 0,
"knowledge_bases": [
{
"added_to_agent_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"database_id": "database_id",
"embedding_model_uuid": "embedding_model_uuid",
"is_public": true,
"last_indexing_job": {
"completed_datasources": 0,
"created_at": "2019-12-27T18:11:19.117Z",
"data_source_uuids": [
"string"
],
"finished_at": "2019-12-27T18:11:19.117Z",
"knowledge_base_uuid": "knowledge_base_uuid",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2019-12-27T18:11:19.117Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 0,
"total_datasources": 0,
"updated_at": "2019-12-27T18:11:19.117Z",
"uuid": "uuid"
},
"name": "name",
"project_id": "project_id",
"region": "region",
"tags": [
"string"
],
"updated_at": "2019-12-27T18:11:19.117Z",
"user_id": "user_id",
"uuid": "uuid"
}
],
"max_tokens": 0,
"model": {
"agreement": {
"description": "description",
"name": "name",
"url": "url",
"uuid": "uuid"
},
"created_at": "2019-12-27T18:11:19.117Z",
"inference_name": "inference_name",
"inference_version": "inference_version",
"is_foundational": true,
"metadata": {},
"name": "name",
"parent_uuid": "parent_uuid",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2019-12-27T18:11:19.117Z",
"upload_complete": true,
"url": "url",
"usecases": [
"MODEL_USECASE_UNKNOWN"
],
"uuid": "uuid",
"version": {
"major": 0,
"minor": 0,
"patch": 0
}
},
"name": "name",
"openai_api_key": {
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"deleted_at": "2019-12-27T18:11:19.117Z",
"models": [
{
"agreement": {
"description": "description",
"name": "name",
"url": "url",
"uuid": "uuid"
},
"created_at": "2019-12-27T18:11:19.117Z",
"inference_name": "inference_name",
"inference_version": "inference_version",
"is_foundational": true,
"metadata": {},
"name": "name",
"parent_uuid": "parent_uuid",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2019-12-27T18:11:19.117Z",
"upload_complete": true,
"url": "url",
"usecases": [
"MODEL_USECASE_UNKNOWN"
],
"uuid": "uuid",
"version": {
"major": 0,
"minor": 0,
"patch": 0
}
}
],
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z",
"uuid": "uuid"
},
"parent_agents": [],
"project_id": "project_id",
"provide_citations": true,
"region": "region",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2019-12-27T18:11:19.117Z",
"route_created_by": "route_created_by",
"route_name": "route_name",
"route_uuid": "route_uuid",
"tags": [
"string"
],
"temperature": 0,
"template": {
"created_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"guardrails": [
{
"priority": 0,
"uuid": "uuid"
}
],
"instruction": "instruction",
"k": 0,
"knowledge_bases": [
{
"added_to_agent_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"database_id": "database_id",
"embedding_model_uuid": "embedding_model_uuid",
"is_public": true,
"last_indexing_job": {
"completed_datasources": 0,
"created_at": "2019-12-27T18:11:19.117Z",
"data_source_uuids": [
"string"
],
"finished_at": "2019-12-27T18:11:19.117Z",
"knowledge_base_uuid": "knowledge_base_uuid",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2019-12-27T18:11:19.117Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 0,
"total_datasources": 0,
"updated_at": "2019-12-27T18:11:19.117Z",
"uuid": "uuid"
},
"name": "name",
"project_id": "project_id",
"region": "region",
"tags": [
"string"
],
"updated_at": "2019-12-27T18:11:19.117Z",
"user_id": "user_id",
"uuid": "uuid"
}
],
"long_description": "long_description",
"max_tokens": 0,
"model": {
"agreement": {
"description": "description",
"name": "name",
"url": "url",
"uuid": "uuid"
},
"created_at": "2019-12-27T18:11:19.117Z",
"inference_name": "inference_name",
"inference_version": "inference_version",
"is_foundational": true,
"metadata": {},
"name": "name",
"parent_uuid": "parent_uuid",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2019-12-27T18:11:19.117Z",
"upload_complete": true,
"url": "url",
"usecases": [
"MODEL_USECASE_UNKNOWN"
],
"uuid": "uuid",
"version": {
"major": 0,
"minor": 0,
"patch": 0
}
},
"name": "name",
"short_description": "short_description",
"summary": "summary",
"tags": [
"string"
],
"temperature": 0,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 0,
"updated_at": "2019-12-27T18:11:19.117Z",
"uuid": "uuid"
},
"top_p": 0,
"updated_at": "2019-12-27T18:11:19.117Z",
"url": "url",
"user_id": "user_id",
"uuid": "uuid"
}
}