Discord archives the thread. An open-source AI agent keeps the knowledge.
A company agent that works in a Discord server, with its grants and approval rules in one manifest.
You can have an open-source agent answering in a Discord server this afternoon. Connect the Channels scope, add the app to your server, mention it with a task. The part that decides whether it still works next week is not in Discord at all.
Kortix is the open-source CompanyOS. A project is one git repository: the agents, their skills, the company memory and the connector settings are files in it, and the agents work on cloud computers of their own.
A Discord thread is a session, and a session ends. What the agent knows when it ends has to live somewhere else.
One thread is one session, and the thread closes
Discord's model here is literal. The Guide puts it in one line: "One Discord thread is one session." A mention in a text or announcement channel starts a thread on the message, and a later mention in that thread continues the session. A direct message is one session until /new.
Then the part most tutorials leave out. "Kortix threads archive after a day without messages, and a new message opens the thread again." Archiving is not deletion, and the session is still there when someone reopens the thread. But the thread has left the channel's surface. A week of quiet and nobody is scrolling it.
That is Discord working as intended. A thread is a place to ask for something and watch it happen. Nobody files anything in it. Treat it as storage and you get an agent whose memory is a scrollback nobody reads.
The session is disposable, the branch is not
One isolated sandbox per session. Each session has its own isolated machine and branch. A thread is a handle on a session, and a session is a handle on a branch. Close the thread and the branch is still in the repository.
The question that matters is what the agent can read when the thread is empty. In Kortix the answer is the project repository, which is why the file that decides the agent's reach is not in Discord. The repository is the thing that survives the conversation.
Session work reaches main through a change request. Merge is default-deny for agents, so the loop closes in the repo. The channel only starts it. The agent works on its branch and opens a change request; a person decides. The next thread begins from whatever landed.
Three steps, and what each one commits you to
The Guide sets out the setup in three moves.
Add Kortix to your server. In the app, open Customize, then Connectors, and choose the Channels scope. Add to Discord hands you to Discord's own page, where you pick a server. You need Manage Server on it.
Mention the app with a task. Type @Kortix what changed in the release? in a text channel. The app opens a thread on that message and replies inside it.
Allow the people. Only an allowed person's mention or direct message starts a session. A stranger gets their user ID back and a line under Allowed users → Wants access, where a project manager can let them in with one click.
Each step commits you to something. The first binds a server to a project, and a channel goes to the first project that answered there. The second fixes the thread as the session boundary, which is why /new matters more here than in a chat app. The third is the access list, and Discord has no account link, so that list is the only thing between a stranger and a session. What the agent may do once an allowed person starts a session is a separate file.
The manifest is where the agent's reach is written down
Discord shipped as a channel in v0.14.18 on 3 November 2026. A working starter for it is short enough to read in a minute, and every line answers a question a thread cannot. The kortix.yaml reference documents each key.
# yaml-language-server: $schema=https://kortix.com/schema/kortix.schema.json
default_agent: discord-ops
project:
name: discord-agent-starter
env:
optional: [HELPDESK_TOKEN]
connectors:
- slug: helpdesk
provider: http
base_url: https://helpdesk.example.com/api
auth:
type: bearer
policy_sets:
read-only:
description: Reads tickets and customers. Never writes.
policies:
- match: "get_*"
action: always_run
- match: "*"
action: block
policy:
default_mode: risk
policies:
- match: "helpdesk.delete_*"
action: block
approvals:
ttl: 24h
agents:
discord-ops:
description: Answers questions in a Discord server and drafts the work, with a person approving anything that changes a system.
mode: primary
prompt_file: agents/discord-ops.md
tools: all
skills: all
connectors: [kortix_discord, helpdesk]
policy_sets:
helpdesk: read-only
secrets: [HELPDESK_TOKEN]
permission:
bash:
"*": allow
"git push *": ask
workspace: { project_repository: true }
default_agent picks the agent for a session that names none, and here that is discord-ops. Under connectors, a help desk is declared over HTTP with a policy set called read-only: get_* runs, and a wildcard blocks the rest. The set belongs to the connector, so any agent given it inherits the same ceiling.
policy.default_mode: risk covers the calls no rule matched. A read goes through; a write or a delete waits for a person. The policies list sits above that fallback and blocks helpdesk.delete_* outright. approvals.ttl: 24h gives a held call a day to be decided before it lapses.
The agent's own block is the narrow part. Two connectors, kortix_discord and helpdesk, and nothing else. policy_sets attaches the read-only set to the help desk. One secret is named, HELPDESK_TOKEN. permission lets bash run and stops git push for a person. workspace turns on the project repository, so the session gets a copy on its own branch. That line is what makes the branch outlive the thread.
Omitted grants are none. Leave out skills, subagents, commands, connectors, secrets or kortix_permissions and the agent gets none of them. Three keys open by default: tools, permission and codemode. The file writes the first two out, so a reader sees the reach in the diff.
Approval gates you set. Off until you set them. The risk mode and the delete rule are two lines someone wrote. A project that never writes them gets the run without the pause.
The limits to know before you promise anything
Sixty Discord calls a minute is the ceiling for one project. Several busy threads share that budget, so a support channel and a release channel are not two independent agents.
Several projects can share one server. A channel goes to the first project that answered there, and /connect lists the projects and binds the channel to the one you pick.
The Message Content intent decides how much the agent can read. Without it, only mentions, direct messages and the app's own messages arrive. To ask about a discussion, paste the part you mean. A self-hosted instance whose Discord application has the intent can pass every message in a Kortix thread through DISCORD_MESSAGE_CONTENT.
Discord caps active threads per server. Kortix says so rather than starting one, and a thread with no messages for a day archives. Photos, files and voice messages arrive up to 8 MB per message.
What to check after the first mention
Start with the session. One thread is one session, so /new starts a fresh one and the next mention continues that. If the agent seems to have lost the earlier exchange, check whether someone ran /new or whether the thread was reopened after archiving.
Then the approval. A held connector call does not wait in the thread. It appears under Approvals in the session header and on the Review page, where a project manager or the person who started the session decides. Discord has no approval card, so a team expecting one in the channel will read a held call as a stalled agent.
Then the record. Every action is recorded. Reading, exporting and streaming the audit log depend on the plan. The session's own record keeps the exact earlier lines, which matters more when the thread that started it has archived.
The Slack post covers what an install leaves undecided, and the Telegram post covers why an allowed list is not authority. Discord adds one constraint to both: the conversation is disposable, and the repository is not.
Free to start, free to self-host. Try Kortix, or read the channels guide first.