const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
display_name: '<string>',
status: 'active',
prompt_template_id: '<string>',
custom_prompt: '<string>',
new_prompt_title: '<string>',
tool_ids: ['<string>'],
source_ids: ['<string>'],
pinned_document_ids: ['<string>'],
number_docs_to_retrieve: 8,
number_docs_to_display: 8,
icon: '<string>',
custom_llm_id: '<string>',
custom_llm_temperature: 123,
custom_llm_top_p: 123,
reranker_activated: false,
ignore_sources_restrictions: false,
is_background_agent: false,
is_router_agent: false,
default_router_agent_id: '<string>',
reasoning_iterations: 1,
order: 123,
can_be_used_as_tool: false,
tool_description: '<string>',
share_conversation_context: false,
max_call_depth: 5,
satisfaction_feedback_activated: false,
satisfaction_feedback_question: '',
satisfaction_feedback_helper_text: '',
satisfaction_feedback_no_action: 'ticket_form',
inject_user_ticket_context: false,
ticket_context_days_limit: 7,
ui_selectable: true
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));