Detect user intent from natural language request.
This endpoint analyzes a user’s request to determine whether they want to:
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
}'
REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
"Bearer YOUR_API_KEY"
"Bearer YOUR_STRIPE_API_KEY"
REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'
"ns_abc123def456"
"production"
"my-namespace"
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
Successful Response
Result of intent detection analysis.
This model represents the agent's understanding of whether the user wants to:
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)