Slack, Teams & email
Start and continue sessions from Slack, Microsoft Teams and email. In Slack and Teams, each person acts as their own linked Kortix account.
A channel lets people start and continue sessions from outside Kortix. There are 3 channels: Slack, Microsoft Teams and email. This page is for the person who connects a channel and for everyone who works with the agent from one.
Connect the platform
Open Customize → Connectors and select the Channels scope. Connect Slack or Microsoft Teams there, or from a terminal:
kortix channels connect # Slack
kortix channels connect --platform teams # Microsoft TeamsAdd the bot
Invite the bot to a Slack channel, or add the Kortix app to a Teams chat or channel. A DM with the bot needs no invite.
Link your account
Send /kortix login in Slack or /login in Teams, open the link, and sign in. You do this once per workspace or tenant.
Mention the bot with a task
The agent replies in the Slack thread or Teams chat, with live progress.
How channels work
- One Slack thread is one session. The first message in a thread starts the session. Later messages in the thread continue it, also after the sandbox stops and resumes.
- In a channel, only a mention reaches the session. A reply without a mention stays between people. The agent reads the thread the next time someone mentions it. A mention with no text and no file gets a help reply, not a session.
- In a DM with the bot, every message reaches the session. A DM session is private to you.
- Teams differs. Each channel post is its own session. A personal or group chat keeps one session until someone sends
/new. In a group chat or under a post that already has a session, a message without a mention also reaches that session. See Microsoft Teams. - A workspace can serve several projects. When one Slack workspace or Teams tenant is connected to more than one project, the first message in an unbound channel shows a project picker. The choice binds the channel to that project. A binding also holds the agent, the model and the join policy. See Manage bindings.
Link your identity
A Slack or Teams message carries no Kortix credential. Each person links a Kortix account once. After that, Kortix knows who sent each message, and the session runs on behalf of that person. Kortix checks that the sender may run the agent and holds project.session.start. The agent then acts with its own grant, not with the sender’s role. The sender’s own secrets, connector accounts and provider keys reach only a DM or a Teams personal chat, which is private to that person. See Personal resources stay personal.
- Send
/kortix loginin Slack, or/loginin Teams. - Open the link. Only you see it: Slack shows it as a reply only you can see, and Teams shows it in your personal chat with the bot or as a reply only you can see.
- Sign in, or create an account.
- The link works once and expires after 10 minutes.
- A message you sent while unlinked runs when you link within 10 minutes.
- One Slack or Teams identity links to one Kortix account. To link another account, send
/kortix logout(Slack) or/logout(Teams) first. - When an account you belong to requires two-factor authentication, Kortix asks for your second factor before it links you. A link made without it counts as unlinked in that account: you get the connect prompt and link again. See Sign-in, SSO & API keys.
- An unlinked sender gets a prompt to connect instead of a run.
- A linked sender without access to the project gets a card to request access. Every account owner and admin receives the request in Kortix.
/kortix whoami (Slack) and /whoami (Teams) show the Kortix account you are linked as.
Who can do what
Every action runs as the linked account of the person who takes it, with that account’s project role. Account owners and admins count as project managers. See Accounts & access.
| Action | Who may do it |
|---|---|
| Mention the bot, or message it in a DM | A linked project member (project.session.start), within the join policy |
| Stop a run | The sender of the message being answered, or anyone approved into the session. Both need project.session.stop. |
| Change a channel’s project, agent, model or join policy | A project manager (project.connector.write). In a DM or Teams personal chat, any project member. |
| Move a bound channel to another project | A project manager in both projects |
| Act on a review card | A project manager (project.review.act) |
| Approve or deny a connector call | A project manager, or the person who started the session |
Approve a person into an owner_approval session |
The session owner |
/new in a Teams group chat |
A linked project member. Under owner_approval or owner_only, only someone approved into the current session. |
/kortix link-bot in Slack |
A project manager (project.write) |
Join policy
The join policy decides who may join a session that a channel message started. Each binding has one policy. New sessions use it. An existing session keeps the policy it started with.
| Policy | Teams word | Who may join | Who sees the session in Kortix |
|---|---|---|---|
project_open (default) |
open |
Any linked project member | The project |
owner_approval |
approval |
The session owner gets Approve and Deny for each new person | The owner, approved people, and admins who oversee sessions |
owner_only |
owner |
Only the person who started the session | The owner and admins who oversee sessions |
A DM session is private to you under every policy. The policy grants no permission that the role denies. A decision on a review card or a connector approval card resumes the agent under every policy.
Set it with /kortix policy <policy> in Slack, /policy open|approval|owner in Teams, kortix channels bind, or the Channels page.
Models and keys in a channel
/kortix models (Slack) and /models (Teams) list every model you can run in that place, as the web picker does. Each model says how it is paid for. Pick one, or send /kortix model <id> or /model <id>. default returns to the project default.
With the pooled_provider_secrets flag on, the keys that count depend on where you are:
| Where | Keys that count | Session |
|---|---|---|
| A DM with the bot, or a Teams personal chat | Your own provider keys and ChatGPT subscription, plus keys shared with the project | Private to you |
| A channel, a group DM or a Teams group chat | Only keys shared with the whole project | Shared, by the join policy |
- In Slack, the channel model starts each new thread. A thread keeps the model it started with.
- In Teams, the choice applies to the next message. The chat keeps its session.
- A message with an image runs that turn on a model that reads images. The session’s model does not change. When no model in reach reads images, the agent says that it cannot see the image.
See Models for shared keys and ChatGPT accounts.
Approvals and stopping a run
Review cards. When a session started from a Slack thread or Teams chat files a review item, the decision posts there as a card: the title, a summary, a risk note, and buttons.
| Item | Buttons |
|---|---|
| An approval | Approve, Deny, request changes |
| A change | Ship it, Reject, request changes |
| A decision | Answer, request changes |
Every card also has View in Kortix. The request-changes button is Ask for changes in Slack, which opens a text box, and Request changes in Teams, whose card has an optional Feedback box. Kortix passes your text to the agent with the decision. The Review page holds the same items.
Connector approval cards. A connector call that needs approval posts a card with the action, the parameters the connector will receive, and the agent’s description of the effect, marked as not verified. Select Approve or Deny. In Slack, Reply… sends a message to the agent with your decision.
Stop. While the agent works, its live message has a Stop button. In Teams, /stop does the same after the card scrolls away. Stop ends the run at the runtime, not only on the message. Anyone else gets a private refusal.
What the agent can read and post
All projects in one Slack workspace share one bot, and all projects in one Teams tenant share one app. Kortix keeps each project’s agent inside that project’s own conversations.
| Target | Read | Post (Slack) |
|---|---|---|
| A channel or DM bound to this project | Allowed | Allowed |
| A thread that a session of this project started or joined | Allowed | Allowed |
| A channel, group DM or thread of another project | Refused | Refused |
| A channel no project is bound to | Allowed only while no other project is connected to the workspace or tenant | Allowed. A new post starts this project’s thread. |
| A DM with a person | By the rows above | Allowed |
- A refused call answers
403with the reasonconversation_not_in_projectand names the conversation. - To work in a channel that another project runs, send
/kortix switchin it and pick this project. - Directory reads (people, teams, the bot’s own identity) and the details of public Slack channels and standard Teams channels are not limited.
- Slack
search_messagesruns only while this is the only project on the workspace. - In Slack,
channelmust be an id such asC0123ABCDorU0123ABCD, not a channel name.list_channelsreturns the ids. - In Teams, the agent posts only into chats and channels the bot is in for this project.
- A file download stops at 50 MB and answers
413.
Kortix shows channel and people names, not platform ids, on the Channels page, in kortix channels bindings, in session titles and in the agent’s prompt. A Slack channel that Slack cannot find shows as Unavailable channel.
Slack
Connect Slack
On Kortix Cloud, and on any host with the shared Slack app configured:
- On the Channels page, select Add to Slack. Or run
kortix channels connectand open the link it prints. The link is valid for about 10 minutes. - Pick the workspace and select Allow.
- Invite the bot to a channel, then mention it with a task.
kortix channels connect --wait polls until the install lands, every 4 seconds, for up to --timeout seconds (default 300).
Use your own Slack app
A host without the shared Slack app falls back to this path. To choose it anyway, select Use your own Slack app on the Channels page, or pass --manual to the CLI.
- Run
kortix channels manifestto print the app manifest. - At
api.slack.com/apps, create an app From a manifest, paste it, and install the app to your workspace. - Connect it with the bot token and the signing secret:
kortix channels connect --bot-token xoxb-… --signing-secret …
The bot token must start with xoxb-. Each flag also reads SLACK_BOT_TOKEN or SLACK_SIGNING_SECRET, or - for stdin. Your own app serves only this project, so projects, switch and unbind do not apply.
Check and disconnect
kortix channels status # workspace, bot user, webhook URL
kortix channels disconnect # aliases: remove, rm. Removes the stored secrets.
Slack commands
Send /kortix <command>. The bare /kortix opens the channel panel: project, agent, model and policy, with buttons to change each. Slack does not run slash commands in the Assistant pane or in a thread. In a DM there, send /kortix <command> as a message, and Kortix runs it as a command.
| Command | Aliases | What it does |
|---|---|---|
/kortix |
whoami, who, config, channel, settings |
Open the channel panel |
login |
connect |
Link your Kortix account |
logout |
disconnect |
Unlink your Kortix account |
projects |
list |
List the projects connected to this workspace |
switch |
use, rebind |
Bind this channel to another project |
unbind |
Remove this channel’s binding. The next mention shows the picker again. | |
sessions |
Your 5 most recent sessions in this workspace that you can open | |
session |
The latest session started in this channel | |
agents |
Pick the channel agent | |
agent <name> |
use-agent, set-agent |
Set the channel agent. default resets it. |
models |
Pick the channel model | |
model <id> |
use-model, set-model |
Set the channel model. default resets it. |
policy [<policy>] |
conversation |
Show or set the join policy: project_open, owner_approval or owner_only |
link-bot <bot> |
Link another app’s bot to your account | |
help |
List the commands |
Link a bot. A bot cannot link an account, so its mentions of Kortix do nothing. /kortix link-bot <bot> links that bot to your own Kortix account. Its mentions in this workspace then run as you. Pass the bot’s exact name or its member ID (the bot’s profile → ⋮ → Copy member ID). Kortix refuses a person’s ID and a bot that is linked to someone else.
Microsoft Teams
Connect with the Kortix app
The managed app needs the Microsoft app configured on the server, as on Kortix Cloud.
- A Teams tenant admin opens the consent link from the Microsoft Teams row on the Channels page, or from
kortix channels connect --platform teams. - The admin signs in and grants tenant-wide consent. Kortix publishes the app to your organization’s Teams catalog.
- The row now offers Add to Teams. Anyone in the tenant uses it to add the app to a chat or channel.
kortix channels status --platform teams shows the tenant and the catalog state:
| State | Meaning |
|---|---|
publishing |
Kortix is publishing the app to the catalog. Check again in a minute. |
review |
A Teams admin must approve the app in the Teams admin center. |
failed |
The publish failed. The status shows the reason. Fix it, then run kortix channels connect --platform teams again. |
published |
The catalog serves the app. |
kortix channels disconnect --platform teams # removes the Teams install from this project
Use your own Microsoft Teams app
Select Use your own Microsoft Teams app on the Channels page. The wizard has 3 steps:
- Register the bot in Azure. Create an Azure Bot resource (multi-tenant or single-tenant). On its Configuration page, paste the messaging endpoint the wizard shows:
https://<your-kortix-api>/v1/webhooks/teams/<project_id>/messages. Create a client secret and copy its value. - Connect it to this project. Enter the Application (client) ID, the Client secret and the Directory (tenant) ID. Kortix verifies the tenant with the bot’s credentials.
- Upload the app to Teams. Download the manifest, which carries your bot’s app ID. Zip it with a 192×192
color.pngand a 32×32 transparentoutline.png. In Teams, go to Apps → Manage your apps → Upload an app.
Your own bot serves only this project, so /projects, /use and /unbind do not apply.
Update the app
When your Teams catalog serves an older version of the Kortix app, the Channels page shows Update the Kortix app in Teams, and the row’s button reads Publish app update. kortix channels status --platform teams prints both versions.
- A Teams admin selects Publish app update, or runs
kortix channels connect --platform teams, and signs in. - In each team where Teams offers the update, a team owner opens the team → ⋯ → Manage team → Apps and selects Update.
Chats, channels and mentions
| Where | What reaches the bot | Session |
|---|---|---|
| Personal chat | Every message | One session until /new |
| Group chat | A new message needs a mention. A reply in a chat the bot already works in continues without one. | One session until /new |
| Team channel | A new post needs a mention. A reply under a post the bot owns continues without one. | One session per post |
Replies without a mention need the app’s resource-specific permissions ChannelMessage.Read.Group (channels) and ChatMessage.Read.Chat (group chats). Teams grants them when the app is added.
/new [message] starts a new session in a personal or group chat. Text after /new starts the new session with that text. The previous session stays in Kortix, and the confirmation links to it. /new is refused while a run is in progress. Stop the run with /stop, or wait for it to finish, then send /new again.
On any message, ⋯ → Open in Kortix opens the session behind it.
Teams commands
In a channel or group chat, mention the bot before the command.
| Command | Aliases | What it does |
|---|---|---|
/help |
List the commands | |
/login |
/connect |
Link your Kortix account |
/logout |
/disconnect |
Unlink your Kortix account |
/whoami |
/who |
Show the Kortix account you are linked as |
/status |
/config, /settings |
The project, agent, model, policy and run here, with buttons to change them |
/sessions |
Your 5 most recent sessions started from Teams | |
/stop |
/cancel |
Stop the run in progress here |
/new [message] |
/reset |
Start a new session in this chat |
/models, /model <id> |
Pick or set the model. default resets it. |
|
/agents, /agent <name> |
Pick or set the agent. default resets it. |
|
/projects |
List the projects connected to this tenant | |
/use <name> |
/switch |
Point this chat or channel at another project |
/policy [open|approval|owner] |
Show or set the join policy | |
/unbind |
Remove the binding. The next message picks a project again. | |
/home |
Your projects and what to try |
Private replies
In a channel or group chat, the bot answers one person privately, as a reply marked Only you can see this message:
- replies to your commands;
- the card to link your account or to request access;
- why your message did not run, such as the join policy;
- under
approval, the owner’s Approve and Deny card.
When Teams refuses a private reply, the card posts to the whole chat or channel. The sign-in link never does: it goes to your personal chat with the bot instead.
Teams deletes a private reply after 24 hours.
Output, questions and files
- The agent answers in one card: its steps while it works, then the reply. A reply too long for one Teams message is cut and links to the full session.
- A question with up to 6 options shows one button per option. Several questions, a multi-select question or a longer list shows one form. A date, time, number or on/off question uses the matching input. You can type your answer instead.
- The agent shows an image inline in every chat and channel. A personal chat gets other files as a file-consent card, and the file lands in your OneDrive when you accept. A team channel gets other files in the team’s SharePoint files. A group chat receives images only.
- The agent can download inbound files and pasted images in chats it may read.
Teams bots cannot add reactions or search messages.
Email is off by default. Turn on the AgentMail Email project flag (agentmail_email) first. See Feature flags.
kortix projects features enable agentmail_email
kortix channels email connect --allow @example.com
- One email thread is one session. A new message starts a session. A reply in the thread continues it. The agent reads and replies through the email connector.
- Email has no identity link. An email session runs as the account owner. Restrict who may write to the inbox with an allow-list. Kortix drops mail from any other sender. Without
--allowor--allow-regex, the inbox accepts mail from every sender. Pass--allowonconnect. - Connecting needs
project.connector.write.
| Command | What it does |
|---|---|
email connect |
Create a managed inbox. --username and --domain set the address. The username defaults to the project name. --display-name sets the from-name (default: the project name). |
email connect --inbox-id <id> --email <address> |
Attach an existing AgentMail inbox. An inbox connected to another project is refused. |
email connect --api-key <key> |
Use your own AgentMail key instead of the managed one. - reads it from stdin. |
email status [--json] |
Show the inbox, the connector and the sender policy |
email policy |
Replace the sender policy |
email disconnect |
Remove the inbox connection and its secrets. Aliases: rm, remove. |
Sender policy flags, on connect and policy:
--allow <email|@domain>adds a sender. Repeat it.@example.comandexample.comare domains. Any--allowrestricts the inbox to the list.--allow-regex <re>also accepts senders that match the regular expression.--allow-all(onpolicy) clears the list and accepts every sender.
--connector <slug> picks one inbox when the project has several. The default is kortix_email.
Manage bindings
A binding is one bound Slack channel or DM, or one bound Teams chat or channel post. It holds the project, the agent, the model and the join policy that new sessions there start with.
kortix channels bindings # BINDING, CHANNEL, PLATFORM, AGENT, MODEL, POLICY
kortix channels bindings --json
kortix channels bind <bindingId> --agent my-agent --policy owner_approval
| Flag | Effect |
|---|---|
--agent <name> |
Run this agent in the channel |
--no-agent |
Use the project’s default agent |
--model <id> |
Pin a model |
--no-model |
Use the agent, project or account default |
--policy <policy> |
project_open, owner_approval or owner_only |
Pass at least one flag. bind needs project.connector.write. The bindings list shows the effective agent and model and where each comes from.
The same settings change from chat (/kortix agent, /model, /policy, and the other commands above) and on the Channels page. On the Teams row, N channels lists every bound chat and channel post.
Each channel is also a connector with provider: channel: kortix_slack, kortix_teams and kortix_email (or the slug you pass). Kortix writes the Slack and email entries in kortix.yaml when you connect, and removes them when you disconnect. Teams needs no entry. These slugs are reserved: kortix connectors add slack is refused and points to kortix channels connect. The bot token and the bot’s client secret never enter a sandbox and do not appear on the Secrets page. See Connectors.
A self-hosted instance needs the Slack, Microsoft and AgentMail credentials for the managed paths. See Self-hosting.