AI agents
List AI 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
viewstringslimfullslimGet AI Agent
Get the full editable configuration of one Discourse AI agent. Custom tools use custom-; native tools use native- in tool tuples.
Body
idinteger | stringrequiredCreate AI 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
namestringrequireddescriptionstringrequiredsystem_ promptstringrequiredenabledbooleanprioritybooleandefault_ llm_ idinteger | nulltop_ pnumber | nulltemperaturenumber | nullthinking_ effortstring | nullforce_ default_ llmbooleanallowed_ group_ idsArray<integer>user_ idinteger | nullallow_ chat_ channel_ mentionsbooleanallow_ chat_ direct_ messagesbooleanallow_ topic_ mentionsbooleanallow_ personal_ messagesbooleantoolsArray<string | Array<string | never | object | null | never | boolean>>mcp_ server_ idsArray<integer>mcp_ server_ tool_ namesobjectsubagent_ idsArray<integer | string>Up to 20 existing AI agent IDs this agent may delegate to; IDs may include negative system-agent IDs
forced_ tool_ countinteger[-1, 100000]require_ approvalbooleanresponse_ formatArray<object> | nullexamplesArray<Array<string>>show_ thinkingbooleanvision_ enabledbooleanvision_ max_ pixelsinteger<= 4000000rag_ chunk_ tokensinteger[1, 50000]rag_ chunk_ overlap_ tokensinteger[0, 200]rag_ conversation_ chunksinteger[1, 1000]rag_ llm_ model_ idinteger | nullrag_ uploadsArray<object>max_ turn_ tokensinteger | nullcompression_ thresholdinteger[20, 99]Update AI 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
idinteger | stringrequirednamestringdescriptionstringsystem_ promptstringenabledbooleanprioritybooleandefault_ llm_ idinteger | nulltop_ pnumber | nulltemperaturenumber | nullthinking_ effortstring | nullforce_ default_ llmbooleanallowed_ group_ idsArray<integer>user_ idinteger | nullallow_ chat_ channel_ mentionsbooleanallow_ chat_ direct_ messagesbooleanallow_ topic_ mentionsbooleanallow_ personal_ messagesbooleantoolsArray<string | Array<string | never | object | null | never | boolean>>mcp_ server_ idsArray<integer>mcp_ server_ tool_ namesobjectsubagent_ idsArray<integer | string>Up to 20 existing AI agent IDs this agent may delegate to; IDs may include negative system-agent IDs
forced_ tool_ countinteger[-1, 100000]require_ approvalbooleanresponse_ formatArray<object> | nullexamplesArray<Array<string>>show_ thinkingbooleanvision_ enabledbooleanvision_ max_ pixelsinteger<= 4000000rag_ chunk_ tokensinteger[1, 50000]rag_ chunk_ overlap_ tokensinteger[0, 200]rag_ conversation_ chunksinteger[1, 1000]rag_ llm_ model_ idinteger | nullrag_ uploadsArray<object>max_ turn_ tokensinteger | nullcompression_ thresholdinteger[20, 99]Delete AI Agent
destructiveDelete a non-system AI agent. Requires admin credentials and write mode.
Body
idinteger | stringrequiredCreate AI Agent User
Explicitly create the bot user used by an AI agent for mention/chat entry points. Requires admin credentials and write mode.
Body
idinteger | stringrequiredExport AI 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
idinteger | stringrequiredImport AI Agent
destructiveImport 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
bundleobjectrequiredforcebooleanfalseconfirm_ forcebooleanfalse