AI Assistants

Create an AI assistant.

Creates a new persistent AI assistant with wake/sleep lifecycle.

post/ai_assistants

Request

Request body

namestring required
descriptionstring
system_promptstring
llmstring required
llm_argsobject
custom_tool_definitionstring
mcp_serversobject[]
credential_idsstring[]
memory_block_idstring uuid
notification_emailstring
history_management'compactification' | 'truncation' | 'semantic_retrieval'
history_max_charsinteger
history_recent_charsinteger

Maximum characters of recent chat history kept uncompacted (default 10000)

history_retrieval_charsinteger

Maximum characters retrieved from vector DB for semantic retrieval (default 100000)

allowed_tool_actionsstring[] nullable

List of allowed tool action names. NULL means all actions allowed (default). Empty array means no actions allowed.

allowed_trigger_typesstring[] nullable

List of allowed trigger types. NULL means all triggers allowed (default). Valid values: user_message, forum_post, forum_mention, scheduled_task, manual, webhook, custom_event, assistant_message, periodic, document_uploaded, document_processed, collection_updated, chat_completed, user_login, email_received, file_watch, approval_response.

default_wake_periodinteger nullable

Default periodic wake interval in seconds. When set, the system automatically wakes the assistant at this interval with its name and description as context. Min 60 (1 min), max 86400 (24 hours). Default NULL (no periodic wake).

Response

Successful operation

idstring uuid
namestring
descriptionstring
system_promptstring
llmstring
llm_argsobject
status'stopped' | 'running' | 'sleeping' | 'error'
custom_tool_definitionstring
mcp_serversobject[]
credential_idsstring[]
memory_block_idstring uuid
notification_emailstring
history_management'compactification' | 'truncation' | 'semantic_retrieval'
history_max_charsinteger
history_recent_charsinteger
history_retrieval_charsinteger
allowed_tool_actionsstring[] nullable

List of allowed tool action names. NULL means all actions allowed.

allowed_trigger_typesstring[] nullable

List of allowed trigger types. NULL means all triggers allowed.

current_chat_session_idstring uuid
wake_countinteger
last_wake_atstring date-time
last_sleep_atstring date-time
error_messagestring
user_idstring uuid
usernamestring
created_atstring date-time
updated_atstring date-time
is_ownerboolean
user_access_modestring
forum_countinteger

Changes

No recorded changes to this operation across all 1 revision of this API.