Get an agent
Introduced 2.13
You can retrieve agent information using the agent_id
.
Path and HTTP methods
GET /_plugins/_ml/agents/<agent_id>
Path parameters
The following table lists the available path parameters.
Parameter | Data type | Description |
---|---|---|
agent_id | String | The agent ID of the agent to retrieve. |
Example request
GET /_plugins/_ml/agents/N8AE1osB0jLkkocYjz7D
copy
Example response
{
"name": "Test_Agent_For_RAG",
"type": "flow",
"description": "this is a test agent",
"tools": [
{
"type": "VectorDBTool",
"parameters": {
"input": "${parameters.question}",
"source_field": """["text"]""",
"embedding_field": "embedding",
"index": "my_test_data",
"model_id": "zBRyYIsBls05QaITo5ex"
},
"include_output_in_agent_response": false
},
{
"type": "MLModelTool",
"description": "A general tool to answer any question",
"parameters": {
"model_id": "ygAzT40Bdo8gePIqxk0H",
"prompt": """
Human:You are a professional data analyst. You will always answer question based on the given context first. If the answer is not directly shown in the context, you will analyze the data and find the answer. If you don't know the answer, just say don't know.
Context:
${parameters.VectorDBTool.output}
Human:${parameters.question}
Assistant:"""
},
"include_output_in_agent_response": false
}
],
"created_time": 1706821658743,
"last_updated_time": 1706821658743
}
Response fields
For response field descriptions, see Register Agent API request fields.
当前内容版权归 OpenSearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 OpenSearch .