v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Agent Sessions

Detect Intent

Detect user intent from natural language request.

This endpoint analyzes a user's request to determine whether they want to:

  • Execute queries on existing data (execution mode)
  • Create new resources/infrastructure (setup mode)
  • Or if the request is ambiguous and needs clarification

It performs keyword analysis and checks existing collections to provide intelligent classification and recommendations.

Args: request: FastAPI request with tenant context payload: Intent detection request with user's input

Returns: IntentClassification with detected intent and recommendations

Example: bash curl -X POST http://localhost:8000/v1/agents/intent/detect \ -H "Authorization: Bearer {api_key}" \ -H "X-Namespace: {namespace_id}" \ -H "Content-Type: application/json" \ -d '{ "user_request": "I want to search videos by faces", "include_collection_analysis": true }'

post/v1/agents/sessions/intent/detect

Request body

user_requeststring required

User's natural language request

include_collection_analysisboolean

Whether to check existing collections

Response

Successful Response

intentstring required

Detected intent: 'execution', 'setup', or 'ambiguous'

confidencenumber required

Confidence in classification

reasoningstring required

Why this intent was detected

recommended_actionstring required

Next action to take (e.g., 'setup_pipeline', 'execute_retriever')

clarification_neededboolean required

Whether to ask user for clarification

keywords_foundobject

Keywords found (setup_keywords, execution_keywords, neutral_keywords)