Update an agent Technical Preview; added in 9.2.0
Spaces method and path for this operation:
put /s/{space_id}/api/agent_builder/agents/{id}
Refer to Spaces for more information.
Update an existing agent configuration. Use this endpoint to modify any aspect of the agent's behavior, appearance, or capabilities.
[Required authorization] Route required privileges: manage_onechat.
Body
-
Updated hex color code for the agent avatar.
-
Updated symbol/initials for the agent avatar.
-
Updated configuration settings for the agent.
Additional properties are NOT allowed.
-
Updated description of what the agent does.
-
Updated labels for categorizing and organizing agents.
-
Updated display name for the agent.
PUT /api/agent_builder/agents/{id}
curl \ --request PUT 'https://localhost:5601/api/agent_builder/agents/{id}' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --header "kbn-xsrf: true" \ --data '{"id":"created-agent-id","name":"Search Index Helper","labels":["custom-indices","department-search","elastic-employees"],"description":"Updated description - Search for anything in \"content-*\" indices!","avatar_color":"#BFDBFF","avatar_symbol":"SI","configuration":{"tools":[{"tool_ids":["platform.core.search","platform.core.list_indices","platform.core.get_index_mapping","platform.core.get_document_by_id"]}],"instructions":"You are a custom agent that wants to help searching data using all indices starting with prefix \"content-\"."}}'
Request example
Example request for updating custom agent
{ "id": "created-agent-id", "name": "Search Index Helper", "labels": [ "custom-indices", "department-search", "elastic-employees" ], "description": "Updated description - Search for anything in \"content-*\" indices!", "avatar_color": "#BFDBFF", "avatar_symbol": "SI", "configuration": { "tools": [ { "tool_ids": [ "platform.core.search", "platform.core.list_indices", "platform.core.get_index_mapping", "platform.core.get_document_by_id" ] } ], "instructions": "You are a custom agent that wants to help searching data using all indices starting with prefix \"content-\"." } }
Response examples (200)
Example response returning the agent definition with the changes applied from the request
{ "id": "created-agent-id", "name": "Search Index Helper", "type": "chat", "labels": [ "custom-indices", "department-search", "elastic-employees" ], "description": "Updated description - Search for anything in \"content-*\" indices!", "avatar_color": "#BFDBFF", "avatar_symbol": "SI", "configuration": { "tools": [ { "tool_ids": [ "platform.core.search", "platform.core.list_indices", "platform.core.get_index_mapping", "platform.core.get_document_by_id" ] } ], "instructions": "You are a custom agent that wants to help searching data using all indices starting with prefix \"content-\"." } }