メインコンテンツへスキップ
POST
/
agents
/
search
GenAI検索
curl --request POST \
  --url https://api.example.com/agents/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "<string>",
  "agent_name": "<string>",
  "conversation_id": "<string>",
  "limit": 20,
  "offset": 0,
  "provider_name": "<string>",
  "query": "",
  "request_model": "<string>",
  "roles": [],
  "started_after": "2023-11-07T05:31:56Z",
  "started_before": "2023-11-07T05:31:56Z",
  "trace_id": "<string>",
  "truncate_content": true
}
'
{
  "results": [
    {
      "agent_name": "<string>",
      "conversation_id": "<string>",
      "conversation_name": "<string>",
      "last_activity": "2023-11-07T05:31:56Z",
      "matched_messages": [
        {
          "content_digest": "<string>",
          "content_preview": "<string>",
          "span_id": "<string>",
          "started_at": "2023-11-07T05:31:56Z",
          "trace_id": "<string>"
        }
      ]
    }
  ],
  "total_conversations": 0
}

ボディ

application/json

内容および/またはスパンレベルのフィルターで messages 表をクエリします。

messages 表をスキャンし(一度出現した各メッセージにつき 1 行で、スパンからの MV によって生成されます)、一致するスパンレベルのヒットを返します。全文検索では query を設定します。構造化取得(たとえばトレース内のすべてのメッセージ)では query を空のままにし、以下のフィルターを使用します。呼び出し元はレスポンス形式に合わせて会話ごとにグループ化します。

project_id
string
必須
agent_name
string | null
conversation_id
string | null
limit
integer
デフォルト:20
必須範囲: 0 <= x <= 1000
offset
integer
デフォルト:0
必須範囲: x >= 0
provider_name
string | null
query
string
デフォルト:""
request_model
string | null
roles
enum<string>[] | null
利用可能なオプション:
,
user,
assistant,
system,
tool,
tool_call,
tool_result
started_after
string<date-time> | null
started_before
string<date-time> | null
trace_id
string | null
truncate_content
boolean
デフォルト:true

レスポンス

成功レスポンス

エージェント メッセージに対する全文検索のレスポンス。

results
AgentSearchConversationResult · object[]
必須
total_conversations
integer
デフォルト:0