본문 바로가기
WIKI 기술 지식 베이스

Get Agent API

원문 보기 위키 갱신

출처: 문서

본문

Get Agent API

2.13부터 도입 {: .label .label-purple }

agent_id를 사용해 에이전트 정보를 조회할 수 있어요.

엔드포인트

GET /_plugins/_ml/agents/{agent_id}

경로 파라미터

사용할 수 있는 경로 파라미터는 다음 표와 같아요.

파라미터 데이터 타입 설명
agent_id String 조회할 에이전트의 에이전트 ID예요.

요청 예시

GET /_plugins/_ml/agents/N8AE1osB0jLkkocYjz7D

{% include copy-curl.html %}

응답 예시

{
  "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
}

응답 본문 필드

응답 필드에 대한 설명은 Register Agent API 요청 필드를 참고하세요.

더 알아보기 (Learn more)