curl --request POST \
--url https://api.quiva.ai/hub/agent/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": {
"name": "data-analyzer",
"description": "Analyzes data patterns",
"behaviour": "You are a data analysis expert",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"has_tools": false
},
"prompt": "Analyze sales trends",
"visibility": "team"
}
'{
"name": "<string>",
"session_id": "<string>",
"success": true,
"duration_ms": 123,
"provider": "<string>",
"model": "<string>",
"complete": true,
"escalate": true,
"result": "<unknown>",
"thinking": "<string>",
"error": {
"code": "AGENT_TIMEOUT",
"message": "Agent execution exceeded timeout limit",
"details": "<unknown>",
"retryable": false
},
"warnings": [
"<string>"
],
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost": 123,
"summarization_status": "none",
"message_count": 123,
"token_usage": 123,
"instruction_metadata": {
"instructions_processed": true,
"instruction_count": 123,
"was_refined": true,
"processing_time_ms": 123
},
"ai_summary_metadata": {
"summarization_performed": true,
"model": "<string>",
"original_tokens": 123,
"summary_tokens": 123,
"compression_ratio": 123,
"messages_processed": 123,
"processing_time_ms": 123,
"fallback_used": true
}
}Assistants
Invoke an AI assistant
Invokes an AI assistant with specified configuration and prompt. Use this to execute assistants with inline definitions or reference pre-configured assistants by assistant subject.
POST
/
hub
/
agent
/
invoke
curl --request POST \
--url https://api.quiva.ai/hub/agent/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": {
"name": "data-analyzer",
"description": "Analyzes data patterns",
"behaviour": "You are a data analysis expert",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"has_tools": false
},
"prompt": "Analyze sales trends",
"visibility": "team"
}
'{
"name": "<string>",
"session_id": "<string>",
"success": true,
"duration_ms": 123,
"provider": "<string>",
"model": "<string>",
"complete": true,
"escalate": true,
"result": "<unknown>",
"thinking": "<string>",
"error": {
"code": "AGENT_TIMEOUT",
"message": "Agent execution exceeded timeout limit",
"details": "<unknown>",
"retryable": false
},
"warnings": [
"<string>"
],
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost": 123,
"summarization_status": "none",
"message_count": 123,
"token_usage": 123,
"instruction_metadata": {
"instructions_processed": true,
"instruction_count": 123,
"was_refined": true,
"processing_time_ms": 123
},
"ai_summary_metadata": {
"summarization_performed": true,
"model": "<string>",
"original_tokens": 123,
"summary_tokens": 123,
"compression_ratio": 123,
"messages_processed": 123,
"processing_time_ms": 123,
"fallback_used": true
}
}Authorizations
bearerAuthapiKeyAuth
Query Parameters
Body
application/json
Provide either subject (an existing assistant) OR an inline agent definition — 400 if neither. prompt (string or object) is expected but not strictly enforced by the engine. The old example field agent_subject is NOT read — use subject.
Response
Assistant invoked successfully.