For the conversational one I follow the below steps where I got error while running the Agentic Search
Create a customer_data index
PUT customer_data
{
"mappings": {
"properties": {
"customer_id": { "type": "text", "fielddata": true },
"name": { "type": "text", "fielddata": true },
"address1": { "type": "keyword" },
"address2": { "type": "keyword" },
"state": { "type": "text", "fielddata": true },
"city": { "type": "text", "fielddata": true },
"zip": { "type": "integer" },
"phone": { "type": "text", "fielddata": true },
"email": { "type": "text", "fielddata": true }
}
}
}
Ingest sample data
POST _bulk
{ "index": { "_index": customer_data", "_id": "CUST_00001" } }
{ "customer_id": "CUST_00001", "name": "Allison Hill", "address1": "610 Kathleen Mount", "address2": "", "state": "OH", "city": "Chicago", "zip": 32555, "phone": "(220)747-7266x17864", "email": "tracyhorn@example.org" }
{ "index": { "_index": customer_data", "_id": "CUST_00002" } }
{ "customer_id": "CUST_00002", "name": "Noah Rhodes", "address1": "4320 Hicks Loaf", "address2": "", "state": "FL", "city": "Phoenix", "zip": 85000, "phone": "+1-905-777-1575", "email": "aaronrios@example.org" }
{ "index": { "_index": customer_data", "_id": "CUST_00003" } }
{ "customer_id": "CUST_00003", "name": "Angie Henderson", "address1": "45971 Cox Springs Suite 932", "address2": "", "state": "GA", "city": "Chicago", "zip": 87785, "phone": "811-587-4060x193", "email": "burnsmichael@example.net" }
{ "index": { "_index": customer_data", "_id": "CUST_00004" } }
{ "customer_id": "CUST_00004", "name": "Daniel Wagner", "address1": "0115 Byrd Court Suite 732", "address2": "", "state": "IL", "city": "San Jose", "zip": 77330, "phone": "822-835-2551x38726", "email": "castrobryan@example.com" }
{ "index": { "_index": customer_data", "_id": "CUST_00005" } }
{ "customer_id": "CUST_00005", "name": "Cristian Santos", "address1": "96856 Webster Bypass Suite 973", "address2": "Apt. 296", "state": "OH", "city": "San Antonio", "zip": 20261, "phone": "557-835-8453x0191", "email": "james98@example.com" }
{ "index": { "_index": customer_data", "_id": "CUST_00006" } }
{ "customer_id": "CUST_00006", "name": "Connie Lawrence", "address1": "679 Calderon Square Apt. 644", "address2": "", "state": "MI", "city": "New York", "zip": 24461, "phone": "231.967.9477", "email": "zwilliams@example.org" }
Create a model
POST /_plugins/_ml/models/_register?deploy=true
{
"name": "Claude 4 sonnet Query Planner tool Model",
"function_name": "remote",
"description": "Claude 4 sonnet for Query Planning",
"connector": {
"name": "Bedrock Claude 4 Sonnet Connector",
"description": "Amazon Bedrock connector for Claude 4 Sonnet",
"version": 1,
"protocol": "aws_sigv4",
"parameters": {
"region": "<<region>>",
"service_name": "bedrock",
"model": "us.anthropic.claude-sonnet-4-20250514-v1:0"
},
"credential": {
"access_key": "<<access_key>>",
"secret_key": "<<secret_key>>",
"session_token": "<<session_token>"
},
"actions": [
{
"action_type": "predict",
"method": "POST",
"url": "https://bedrock-runtime.${parameters.region}.amazonaws.com/model/${parameters.model}/converse",
"headers": {
"content-type": "application/json"
},
"request_body": "{ \"system\": [{\"text\": \"${parameters.system_prompt}\"}], \"messages\": [${parameters._chat_history:-}{\"role\":\"user\",\"content\":[{\"text\":\"${parameters.user_prompt}\"}]}${parameters._interactions:-}]${parameters.tool_configs:-} }"
}
]
}
}
Register an agent
{
"name": "Customer Search Agent",
"type": "conversational",
"description": "Intelligent customer search",
"llm": {
"model_id": "<<model_id>>",
"parameters": {
"max_iteration": 20
}
},
"memory": {
"type": "conversation_index"
},
"tools": [
{
"type": "ListIndexTool",
"name": "ListIndexTool"
},
{
"type": "IndexMappingTool",
"name": "IndexMappingTool"
},
{
"type": "WebSearchTool",
"parameters": {
"engine": "duckduckgo"
}
},
{
"type": "QueryPlanningTool"
}
],
"app_type": "os_chat"
}
Configure a search pipeline
PUT _search/pipeline/agentic-pipeline
{
"request_processors": [
{
"agentic_query_translator": {
"agent_id": "<<agent_id>>"
}
}
],
"response_processors": [
{
"agentic_context": {
"agent_steps_summary": true,
"dsl_query": true
}
}
]
}
Run an agentic search
GET /_search?search_pipeline=agentic-pipeline
{
"query": {
"agentic": {
"query_text": "Fetch all customers who live in Chicago, OH"
}
}
}
Response
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Agentic search failed - Agent execution error - Agent ID: [V1VTKpoBtkxVx3l630dc], Error: [No valid 'dsl_query' found in conversational agent response]"
}
],
"type": "illegal_argument_exception",
"reason": "Agentic search failed - Agent execution error - Agent ID: [V1VTKpoBtkxVx3l630dc], Error: [No valid 'dsl_query' found in conversational agent response]",
"caused_by": {
"type": "illegal_state_exception",
"reason": "No valid 'dsl_query' found in conversational agent response"
}
},
"status": 400
}