Create a new assistant
curl --request POST \
--url https://api.quiva.ai/hub/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"id": "EMAIL_DRAFT",
"name": "Email Draft",
"description": "Draft a reply to my email",
"behaviour": "Draft a concise reply to the email.",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"has_tools": false,
"shared": "private"
}
}
'import requests
url = "https://api.quiva.ai/hub/agent"
payload = { "config": {
"id": "EMAIL_DRAFT",
"name": "Email Draft",
"description": "Draft a reply to my email",
"behaviour": "Draft a concise reply to the email.",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"has_tools": False,
"shared": "private"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
id: 'EMAIL_DRAFT',
name: 'Email Draft',
description: 'Draft a reply to my email',
behaviour: 'Draft a concise reply to the email.',
llm_provider: 'claude',
model: 'claude-haiku-4-5',
has_tools: false,
shared: 'private'
}
})
};
fetch('https://api.quiva.ai/hub/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quiva.ai/hub/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'id' => 'EMAIL_DRAFT',
'name' => 'Email Draft',
'description' => 'Draft a reply to my email',
'behaviour' => 'Draft a concise reply to the email.',
'llm_provider' => 'claude',
'model' => 'claude-haiku-4-5',
'has_tools' => false,
'shared' => 'private'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.quiva.ai/hub/agent"
payload := strings.NewReader("{\n \"config\": {\n \"id\": \"EMAIL_DRAFT\",\n \"name\": \"Email Draft\",\n \"description\": \"Draft a reply to my email\",\n \"behaviour\": \"Draft a concise reply to the email.\",\n \"llm_provider\": \"claude\",\n \"model\": \"claude-haiku-4-5\",\n \"has_tools\": false,\n \"shared\": \"private\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.quiva.ai/hub/agent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"id\": \"EMAIL_DRAFT\",\n \"name\": \"Email Draft\",\n \"description\": \"Draft a reply to my email\",\n \"behaviour\": \"Draft a concise reply to the email.\",\n \"llm_provider\": \"claude\",\n \"model\": \"claude-haiku-4-5\",\n \"has_tools\": false,\n \"shared\": \"private\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/hub/agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"id\": \"EMAIL_DRAFT\",\n \"name\": \"Email Draft\",\n \"description\": \"Draft a reply to my email\",\n \"behaviour\": \"Draft a concise reply to the email.\",\n \"llm_provider\": \"claude\",\n \"model\": \"claude-haiku-4-5\",\n \"has_tools\": false,\n \"shared\": \"private\"\n }\n}"
response = http.request(request)
puts response.read_body{
"subject": "<string>",
"config": {
"name": "Helper Agent",
"behaviour": "You are a data analysis expert",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"id": "EMAIL_DRAFT",
"description": "Analyzes data patterns",
"agent_type": "",
"api_key": "CLAUDE_API_KEY",
"output_schema": {},
"has_tools": false,
"knowledge": [
"<string>"
],
"tools": [
"<string>"
],
"tool_definitions": [
{
"uri": "mcp://local/file_read",
"name": "file_read",
"description": "Reads content from a file",
"schema": {}
}
],
"timeout": 60000,
"context_limit": 200000,
"message_history_limit": 2000,
"smart_context": false,
"ai_smart_context": false,
"ai_summary_threshold": 0.7,
"ai_summary_model": "claude-haiku-4-5",
"preserve_most_recent": 5,
"ai_prompt": false,
"instructions": [
"<string>"
],
"context_variables": {},
"mcp_base_urls": {},
"auth": {},
"llm_config": {
"temperature": 1,
"max_tokens": 2,
"max_turns": 2
},
"agent_settings": {
"memory": {
"enabled": false,
"marker_types": [
"error"
],
"query_enabled": true,
"max_memory_entries": 100,
"similarity_threshold": 0.7
},
"smart_context_advanced": {
"token_limit_auto_adjust": true,
"complexity_detection": true,
"complexity_detection_method": "keyword",
"message_summarization": true,
"ephemeral_streams": false,
"min_messages_for_summary": 3
},
"verification": {
"enabled": false,
"consensus_runs": 3,
"consensus_threshold": 0.66,
"verifier_agent": "<string>"
},
"human_in_the_loop": {
"enabled": false,
"auto_escalate_on_error": false,
"checkpoints": [
"pre_tool_call"
],
"escalation_threshold": {
"error_count": 3,
"confidence_score": 0.5,
"turn_count": 10
}
},
"branching": {
"enabled": false,
"auto_checkpoint": true,
"checkpoint_interval": 5,
"max_branches": 3
},
"observability": {
"debug_mode": false,
"capture_thinking": true,
"capture_tool_calls": true,
"metrics_enabled": true,
"tracing_enabled": true,
"log_level": "info"
},
"knowledge_advanced": {
"semantic_indexing": true,
"image_detail_level": "low",
"adaptive_image_resolution": true,
"bucket_semantic_search": true,
"section_based_retrieval": true,
"max_retrieval_tokens": 10000
}
},
"allowed_agents": [
{
"subject": "<string>",
"description": "<string>"
}
],
"invocation_depth": 0,
"agent_template_subject": "<string>",
"appearance": {
"avatar": true,
"avatar_bg_size": "<string>",
"color": "<string>",
"fit_avatar": true
},
"api_key_source": "personal",
"shared": "private"
},
"modified": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Assistants
Create a new assistant
Creates a new assistant template
POST
/
hub
/
agent
Create a new assistant
curl --request POST \
--url https://api.quiva.ai/hub/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"id": "EMAIL_DRAFT",
"name": "Email Draft",
"description": "Draft a reply to my email",
"behaviour": "Draft a concise reply to the email.",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"has_tools": false,
"shared": "private"
}
}
'import requests
url = "https://api.quiva.ai/hub/agent"
payload = { "config": {
"id": "EMAIL_DRAFT",
"name": "Email Draft",
"description": "Draft a reply to my email",
"behaviour": "Draft a concise reply to the email.",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"has_tools": False,
"shared": "private"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
id: 'EMAIL_DRAFT',
name: 'Email Draft',
description: 'Draft a reply to my email',
behaviour: 'Draft a concise reply to the email.',
llm_provider: 'claude',
model: 'claude-haiku-4-5',
has_tools: false,
shared: 'private'
}
})
};
fetch('https://api.quiva.ai/hub/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quiva.ai/hub/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'id' => 'EMAIL_DRAFT',
'name' => 'Email Draft',
'description' => 'Draft a reply to my email',
'behaviour' => 'Draft a concise reply to the email.',
'llm_provider' => 'claude',
'model' => 'claude-haiku-4-5',
'has_tools' => false,
'shared' => 'private'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.quiva.ai/hub/agent"
payload := strings.NewReader("{\n \"config\": {\n \"id\": \"EMAIL_DRAFT\",\n \"name\": \"Email Draft\",\n \"description\": \"Draft a reply to my email\",\n \"behaviour\": \"Draft a concise reply to the email.\",\n \"llm_provider\": \"claude\",\n \"model\": \"claude-haiku-4-5\",\n \"has_tools\": false,\n \"shared\": \"private\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.quiva.ai/hub/agent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"id\": \"EMAIL_DRAFT\",\n \"name\": \"Email Draft\",\n \"description\": \"Draft a reply to my email\",\n \"behaviour\": \"Draft a concise reply to the email.\",\n \"llm_provider\": \"claude\",\n \"model\": \"claude-haiku-4-5\",\n \"has_tools\": false,\n \"shared\": \"private\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/hub/agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"id\": \"EMAIL_DRAFT\",\n \"name\": \"Email Draft\",\n \"description\": \"Draft a reply to my email\",\n \"behaviour\": \"Draft a concise reply to the email.\",\n \"llm_provider\": \"claude\",\n \"model\": \"claude-haiku-4-5\",\n \"has_tools\": false,\n \"shared\": \"private\"\n }\n}"
response = http.request(request)
puts response.read_body{
"subject": "<string>",
"config": {
"name": "Helper Agent",
"behaviour": "You are a data analysis expert",
"llm_provider": "claude",
"model": "claude-haiku-4-5",
"id": "EMAIL_DRAFT",
"description": "Analyzes data patterns",
"agent_type": "",
"api_key": "CLAUDE_API_KEY",
"output_schema": {},
"has_tools": false,
"knowledge": [
"<string>"
],
"tools": [
"<string>"
],
"tool_definitions": [
{
"uri": "mcp://local/file_read",
"name": "file_read",
"description": "Reads content from a file",
"schema": {}
}
],
"timeout": 60000,
"context_limit": 200000,
"message_history_limit": 2000,
"smart_context": false,
"ai_smart_context": false,
"ai_summary_threshold": 0.7,
"ai_summary_model": "claude-haiku-4-5",
"preserve_most_recent": 5,
"ai_prompt": false,
"instructions": [
"<string>"
],
"context_variables": {},
"mcp_base_urls": {},
"auth": {},
"llm_config": {
"temperature": 1,
"max_tokens": 2,
"max_turns": 2
},
"agent_settings": {
"memory": {
"enabled": false,
"marker_types": [
"error"
],
"query_enabled": true,
"max_memory_entries": 100,
"similarity_threshold": 0.7
},
"smart_context_advanced": {
"token_limit_auto_adjust": true,
"complexity_detection": true,
"complexity_detection_method": "keyword",
"message_summarization": true,
"ephemeral_streams": false,
"min_messages_for_summary": 3
},
"verification": {
"enabled": false,
"consensus_runs": 3,
"consensus_threshold": 0.66,
"verifier_agent": "<string>"
},
"human_in_the_loop": {
"enabled": false,
"auto_escalate_on_error": false,
"checkpoints": [
"pre_tool_call"
],
"escalation_threshold": {
"error_count": 3,
"confidence_score": 0.5,
"turn_count": 10
}
},
"branching": {
"enabled": false,
"auto_checkpoint": true,
"checkpoint_interval": 5,
"max_branches": 3
},
"observability": {
"debug_mode": false,
"capture_thinking": true,
"capture_tool_calls": true,
"metrics_enabled": true,
"tracing_enabled": true,
"log_level": "info"
},
"knowledge_advanced": {
"semantic_indexing": true,
"image_detail_level": "low",
"adaptive_image_resolution": true,
"bucket_semantic_search": true,
"section_based_retrieval": true,
"max_retrieval_tokens": 10000
}
},
"allowed_agents": [
{
"subject": "<string>",
"description": "<string>"
}
],
"invocation_depth": 0,
"agent_template_subject": "<string>",
"appearance": {
"avatar": true,
"avatar_bg_size": "<string>",
"color": "<string>",
"fit_avatar": true
},
"api_key_source": "personal",
"shared": "private"
},
"modified": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
bearerAuthapiKeyAuth
JWT Authorization header using the Bearer scheme.
Body
application/json
Show child attributes
Show child attributes
Response
Assistant created successfully