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:
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
}'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request to detect intent from user input.
Attributes: user_request: The user's natural language request to analyze include_collection_analysis: Whether to analyze existing collections
Response
Successful Response
Result of intent detection analysis.
This model represents the agent's understanding of whether the user wants to:
- Execute queries on existing data (execution mode)
- Create new resources/infrastructure (setup mode)
- Or if the request is ambiguous and needs clarification
Attributes: intent: The detected intent ("execution", "setup", or "ambiguous") confidence: Confidence score 0.0-1.0 reasoning: Explanation of why this intent was detected suitable_collections: Existing collections that might fulfill the request recommended_action: What the agent should do next clarification_needed: Whether to ask user for clarification clarification_options: Options to present if clarification needed keywords_found: Keywords that influenced the classification
Detected intent: 'execution', 'setup', or 'ambiguous'
^(execution|setup|ambiguous)$Confidence in classification
0 <= x <= 1Why this intent was detected
Next action to take (e.g., 'setup_pipeline', 'execute_retriever')
Whether to ask user for clarification
Existing collections that might help
Options for user if clarification needed
Keywords found (setup_keywords, execution_keywords, neutral_keywords)

