AI (opt-in)

AI agents

List AI Agents

discourse_ai_list_agents

List concise Discourse AI agent summaries and slim tool/model metadata. Defaults to slim; use discourse_ai_get_agent to load one full configuration, or view=full only when the complete index is explicitly needed. Requires admin credentials.

Parameters

viewstringslimfullslim

Get AI Agent

discourse_ai_get_agent

Get the full editable configuration of one Discourse AI agent. Custom tools use custom-; native tools use native- in tool tuples.

Body

application/json
idinteger | stringrequired
Show child attributes
Any of
integer
string

Create AI Agent

discourse_ai_create_agent

Create a typed Discourse AI agent, including an optional subagent delegation allowlist of up to 20 existing agent IDs. Requires admin credentials and write mode. Tool entries may be names or [name, options, force] tuples.

Body

application/json
namestringrequired
descriptionstringrequired
system_promptstringrequired
enabledboolean
priorityboolean
default_llm_idinteger | null
Show child attributes
Any of
integer
null
top_pnumber | null
Show child attributes
Any of
number[0, 1]
null
temperaturenumber | null
Show child attributes
Any of
number>= 0
null
thinking_effortstring | null
Show child attributes
Any of
stringdefaultnoneminimallowmediumhighxhighmax
null
force_default_llmboolean
allowed_group_idsArray<integer>
user_idinteger | null
Show child attributes
Any of
integer
null
allow_chat_channel_mentionsboolean
allow_chat_direct_messagesboolean
allow_topic_mentionsboolean
allow_personal_messagesboolean
toolsArray<string | Array<string | never | object | null | never | boolean>>
Show child attributes
Any of
string
Array<string | never | object | null | never | boolean>
Show child attributes
One of
string
Any of
never
Any of
[key: string]any
null
Any of
never
boolean
mcp_server_idsArray<integer>
mcp_server_tool_namesobject
Show child attributes
[key: string]Array<string>
subagent_idsArray<integer | string>

Up to 20 existing AI agent IDs this agent may delegate to; IDs may include negative system-agent IDs

Show child attributes
Any of
integer
string
forced_tool_countinteger[-1, 100000]
require_approvalboolean
response_formatArray<object> | null
Show child attributes
Any of
Array<object>
Show child attributes
[key: string]any
null
examplesArray<Array<string>>
Show child attributes
Array<string>
Show child attributes
One of
string
string
show_thinkingboolean
vision_enabledboolean
vision_max_pixelsinteger<= 4000000
rag_chunk_tokensinteger[1, 50000]
rag_chunk_overlap_tokensinteger[0, 200]
rag_conversation_chunksinteger[1, 1000]
rag_llm_model_idinteger | null
Show child attributes
Any of
integer
null
rag_uploadsArray<object>
Show child attributes
idintegerrequired
max_turn_tokensinteger | null
Show child attributes
Any of
integer<= 10000000
null
compression_thresholdinteger[20, 99]

Update AI Agent

discourse_ai_update_agent

Partially update one AI agent, including enabled state, permissions, model, prompt, tools, subagent delegation, and RAG configuration. Only supplied fields are sent. Requires admin credentials and write mode.

Body

application/json
idinteger | stringrequired
Show child attributes
Any of
integer
string
namestring
descriptionstring
system_promptstring
enabledboolean
priorityboolean
default_llm_idinteger | null
Show child attributes
Any of
integer
null
top_pnumber | null
Show child attributes
Any of
number[0, 1]
null
temperaturenumber | null
Show child attributes
Any of
number>= 0
null
thinking_effortstring | null
Show child attributes
Any of
stringdefaultnoneminimallowmediumhighxhighmax
null
force_default_llmboolean
allowed_group_idsArray<integer>
user_idinteger | null
Show child attributes
Any of
integer
null
allow_chat_channel_mentionsboolean
allow_chat_direct_messagesboolean
allow_topic_mentionsboolean
allow_personal_messagesboolean
toolsArray<string | Array<string | never | object | null | never | boolean>>
Show child attributes
Any of
string
Array<string | never | object | null | never | boolean>
Show child attributes
One of
string
Any of
never
Any of
[key: string]any
null
Any of
never
boolean
mcp_server_idsArray<integer>
mcp_server_tool_namesobject
Show child attributes
[key: string]Array<string>
subagent_idsArray<integer | string>

Up to 20 existing AI agent IDs this agent may delegate to; IDs may include negative system-agent IDs

Show child attributes
Any of
integer
string
forced_tool_countinteger[-1, 100000]
require_approvalboolean
response_formatArray<object> | null
Show child attributes
Any of
Array<object>
Show child attributes
[key: string]any
null
examplesArray<Array<string>>
Show child attributes
Array<string>
Show child attributes
One of
string
string
show_thinkingboolean
vision_enabledboolean
vision_max_pixelsinteger<= 4000000
rag_chunk_tokensinteger[1, 50000]
rag_chunk_overlap_tokensinteger[0, 200]
rag_conversation_chunksinteger[1, 1000]
rag_llm_model_idinteger | null
Show child attributes
Any of
integer
null
rag_uploadsArray<object>
Show child attributes
idintegerrequired
max_turn_tokensinteger | null
Show child attributes
Any of
integer<= 10000000
null
compression_thresholdinteger[20, 99]

Delete AI Agent

destructive
discourse_ai_delete_agent

Delete a non-system AI agent. Requires admin credentials and write mode.

Body

application/json
idinteger | stringrequired
Show child attributes
Any of
integer
string

Create AI Agent User

discourse_ai_create_agent_user

Explicitly create the bot user used by an AI agent for mention/chat entry points. Requires admin credentials and write mode.

Body

application/json
idinteger | stringrequired
Show child attributes
Any of
integer
string

Export AI Agent

discourse_ai_export_agent

Export a portable AI agent bundle. It may include referenced custom-tool definitions but excludes secret bindings. Treat prompts and scripts as sensitive.

Body

application/json
idinteger | stringrequired
Show child attributes
Any of
integer
string

Import AI Agent

destructive
discourse_ai_import_agent

Import a portable AI agent bundle. The bundle may create or overwrite embedded custom tools. force requires confirm_force=true. Requires admin credentials and write mode.

Parameters

bundleobjectrequired
forcebooleanfalse
confirm_forcebooleanfalse