Home / Insights / AI Agents and Automation

AI Agents and Automation

AI Agents Inside Microsoft Teams and Slack: Building Assistants Where Work Already Happens

Most employees already spend their day in Teams or Slack, so an agent that lives there gets used without a training programme. The catch is that chat platforms come with their own identity models, permission systems, data rules and interface conventions. This guide explains how to design around them.

TopicsAI Agents and AutomationGenerative AI and LLMs

Key takeaways

  • Put an agent in Teams or Slack when the work already happens in conversation: requests, approvals, look-ups and hand-offs. Keep long, form-heavy or data-dense work in a proper application and link to it.
  • Build a platform-neutral agent core and keep the Teams and Slack integrations as thin adapters. Microsoft’s 365 Agents SDK and Slack’s agent surfaces both reward that separation.
  • Identity is the design: decide when the agent acts as itself and when it acts on behalf of the user, request the narrowest permissions each platform offers, and enforce authorisation in your systems rather than in the prompt.
  • Platform rules shape the architecture. Slack’s May 2025 rate-limit change for non-Marketplace apps, for example, makes ‘read the whole channel history’ designs impractical for commercially distributed apps.
  • Treat every message the agent reads as untrusted input, require confirmation for actions with real-world effects, and log each tool call so that operators can see what the agent did and why.

Companies experimenting with AI agents quickly discover that the hardest part is not the model but adoption. A capable assistant that lives in a separate web app gets a burst of use and then fades. The same assistant inside Microsoft Teams or Slack sits where people already ask colleagues for help, approve requests and share updates. That is why so many internal agent projects in 2026 start with the question: should this live in chat?

This article is for CTOs, product leads and operations leaders deciding whether and how to build agents inside Teams or Slack. It covers when chat is the right home, how each platform exposes agents, a reference architecture that keeps you portable between them, identity and permissions, the platform data rules that change designs, conversation design, security and a delivery plan. It reflects how we approach these builds in our AI agent development work, where agents get only the tools they need, write actions can require approval and every action is logged.

When chat is the right home for an agent, and when it is not

Chat platforms are good at short exchanges, notifications, approvals and collaboration around a shared thread. They are poor at dense tables, long forms and work that needs a persistent workspace. Before choosing the surface, sort the use case.

Use case patternGood fit for Teams or Slack?Why
Answering questions from policies, documentation or a knowledge baseYesShort question and answer; links out to sources
Raising and tracking requests (IT, HR, procurement, facilities)YesThe request starts in conversation; status updates arrive as messages
Approvals with context (expenses, discounts, access requests)YesThe approver sees a summary and acts in one place
Summarising a channel, thread or meeting for someone catching upYes, with careValuable, but raises data access and retention questions
Look-ups across business systems (order status, account health, stock)YesOne question replaces several logins
Complex data entry, reconciliation, analysis with many columnsUsually noChat cannot display or edit dense data well; link to an app
Long-running, multi-step caseworkPartlyUse chat for notifications and decisions, an app for the case record

A useful rule: if a user would naturally message a colleague to get the task done, chat is a good home. If they would open a spreadsheet, it is not. Many good designs are hybrids, with the agent in chat handling the conversation and deep-linking into an application for the heavy part.

It is also worth asking whether you need to build at all. If your organisation is standardised on Microsoft 365, our comparison of Copilot for Microsoft 365, Copilot Studio and a custom AI assistant covers when the off-the-shelf route is enough. Custom agents earn their cost when they must act in your own systems, follow your own rules or serve both Teams and Slack users.

Action: list your candidate use cases and mark each as chat-native, hybrid or app-only before any design work starts.

How Teams and Slack expose agents today

Both platforms have moved beyond the old chatbot model towards first-class agent experiences, but they do so differently.

Microsoft Teams and Microsoft 365

Microsoft’s Microsoft 365 Agents SDK is a framework for building conversational agents that handles the messaging plumbing. Its documentation describes a channel abstraction that lets you write agent logic once and deliver it to Microsoft Teams, Microsoft Copilot, a website and other channels, including Slack. It supports C# on .NET 8, JavaScript on Node.js 18 or later and Python 3.9 to 3.11, provides state and storage management organised around conversation turns, and is explicitly AI-agnostic: you bring your own model or orchestration, such as Azure AI Foundry, OpenAI or Semantic Kernel.

Inside Teams, an agent can appear in a one-to-one personal chat, in group chats, in channels and around meetings, and it can send interactive cards for approvals and forms.

Slack

Slack provides dedicated agent surfaces: a split-view container alongside the user’s work, an entry point in the top navigation, app threads, suggested prompts and text streaming. Its developer documentation for agents describes methods such as assistant.threads.setStatus to show that the agent is working, assistant.threads.setSuggestedPrompts to offer starting points, the assistant:write scope that enables the agent entry point, and feedback buttons for thumbs-up and thumbs-down ratings. It also notes that some AI features need a paid Slack plan.

DimensionMicrosoft TeamsSlack
Primary build routeMicrosoft 365 Agents SDK (C#, JavaScript, Python)Slack platform APIs and SDKs with agent-specific surfaces
Where the agent appearsPersonal chat, group chats, channels, meetings; Microsoft Copilot as another channelSplit-view agent container, top navigation entry point, DMs, channels and threads
Interactive UICards with buttons and inputsBlock Kit messages with buttons, feedback elements and status indicators
Granular data permissionsResource-specific consent per team, chat or meetingOAuth scopes per app; data access governed by API terms and rate limits
DistributionCustom upload, publish to your organisation with admin approval, or Teams Store with Microsoft approvalInternal (undistributed) app, or Slack Marketplace after review
IdentityMicrosoft Entra ID across Teams and your Microsoft 365 dataSlack user identity; map to your identity provider for downstream systems

Action: if you need both platforms, check early whether one SDK can serve both channels for your use case, or whether two thin adapters on a shared core are cleaner.

A reference architecture that keeps you portable

The most common mistake we see is writing the agent’s logic inside the chat bot handler. It works for a demo and then locks every decision to one platform. We separate four layers.

  1. Channel adapters. One per platform. They receive events, verify signatures, translate messages into a neutral format, render responses as cards or blocks, and handle platform specifics such as status indicators, threads and streaming. They contain no business logic.
  2. Agent core. The orchestration: interpreting the request, retrieving context, choosing tools, deciding when to ask for confirmation, and composing the answer. This layer does not know whether the user is in Teams or Slack.
  3. Tools and connectors. Narrow, well-described functions that call your systems: look up an order, create a ticket, request an approval. Each tool enforces authorisation itself. Exposing them through a standard such as the Model Context Protocol, which we explained in MCP for business leaders, makes them reusable by other agents.
  4. Policy, audit and evaluation. Permission checks, approval rules, logging of every tool call, cost tracking and an evaluation suite that runs before each release.

State and conversation memory

Chat platforms give you threads and conversation identifiers, but not a memory model. Decide what the agent remembers per thread (the current task), per user (preferences, recent requests) and never (sensitive content beyond the session). Store that state in your own store with a retention policy rather than re-reading platform history on every turn, which also matters for the rate-limit reasons discussed below.

Latency and long-running work

Users expect a quick acknowledgement. Acknowledge immediately, show a working status (Slack’s status method, or a typing indicator or interim message in Teams), stream or post the answer when ready, and move anything longer than a minute or so to a background job that posts a follow-up. An agent that silently takes thirty seconds feels broken even when it is right.

Action: write the interface between the channel adapter and the agent core before writing either. If it mentions Teams or Slack types, it is not neutral yet.

Identity and permissions: whose authority does the agent use?

Every action an agent takes is done with someone’s authority. Getting this wrong is the main way chat agents leak data or do things nobody approved.

Two modes, chosen per tool

  • On behalf of the user (delegated). The agent can only see or do what the requesting user could. This is the right default for reading business data: a sales rep asking about an account should get an answer only if they could open that account themselves.
  • As the agent (application). The agent uses its own service identity. Appropriate for narrowly scoped actions that the business has explicitly delegated, such as creating a ticket in a queue or posting a summary to a channel the agent has been added to.

Narrow platform permissions

On Teams, resource-specific consent lets an app receive access to one specific team, chat or meeting rather than every instance in the tenant, for example permission to read channel messages only in the team where it is installed. Tenant administrators retain controls over whether such consent is allowed. Prefer these scoped permissions over tenant-wide Microsoft Graph permissions wherever they cover the use case. On Slack, request only the OAuth scopes the agent’s features need and review them whenever features change.

Authorisation lives in your systems

The language model must never be the component that decides whether a user is allowed to see a record. The tool that fetches the record checks the user’s rights in the source system, and retrieval for question answering filters by the user’s access before anything reaches the prompt. Our guide to permission-aware enterprise search describes the patterns, and our article on agent permissions and approvals covers deciding which actions an agent may take on its own.

Channels change the audience

An answer that is fine in a private chat may be a disclosure in a channel of two hundred people. The agent should know where it is replying, and tools that return sensitive data should either refuse in shared spaces or reply privately to the requester.

Platform rules that change the design

Chat platforms are not neutral pipes. Their terms, rate limits and distribution rules shape what is practical, and they change.

Slack’s data access limits

On 29 May 2025, Slack announced rate-limit changes for commercially distributed apps that are not approved for the Slack Marketplace. For new apps and new installations of such apps, conversations.history and conversations.replies dropped to one request per minute with a maximum of 15 objects per request. Marketplace apps and internal customer-built apps were not affected; internal apps keep limits of 50 or more requests per minute and up to 1,000 objects. Slack updated its API terms at the same time.

The design consequences are significant:

  • If you are building an internal agent for your own workspace, history access remains workable, but you should still avoid re-reading whole channels on every turn.
  • If you are building a product for other companies’ workspaces, plan for Marketplace approval or design the agent to work from the events it receives and the data it stores itself, rather than from bulk history reads.
  • In both cases, read the current API terms before designing any feature that copies Slack data into another system, such as an index for retrieval.

Teams distribution and admin control

Teams apps can be uploaded as custom apps for testing or team use, published to your organisation with Teams administrator approval, or published to the Teams Store with Microsoft approval. For internal agents, the organisational route is normal, which means your Teams administrators are stakeholders from the start: they control which apps users can install and which consent settings apply.

QuestionInternal agentAgent sold to other organisations
DistributionOrg publishing (Teams) or undistributed app (Slack)Teams Store and Slack Marketplace reviews
Data accessHigher limits; your own policies applyStricter limits and terms; minimise stored platform data
Who approvesYour Teams or Slack administrators, security and data ownersPlatform reviewers plus each customer’s administrators
Support burdenInternal service deskFormal support, security documentation and change notices

Action: decide internal versus distributed before architecture, because it changes data access, review timelines and the documentation you need.

Designing the conversation: threads, status, approvals and feedback

An agent in chat is judged on the same standard as a helpful colleague: quick to acknowledge, clear about what it is doing, and careful before doing anything consequential.

Patterns that work

  • Start with suggested prompts. Slack’s suggested prompts, or a short welcome card in Teams, tell people what the agent can do. Three to five concrete examples beat a paragraph of capabilities.
  • Reply in threads. Keep channels readable; one request, one thread.
  • Show progress. A status such as ‘checking order system’ reassures users and helps diagnose slowness.
  • Cite sources. When answering from documents, link to the source so people can check.
  • Confirm before acting. For anything with real-world effect, show a summary card with explicit confirm and cancel buttons. Slack’s own agent design guidance makes the same point: actions such as sending email or updating records need explicit human confirmation.
  • Collect feedback in place. Thumbs-up and thumbs-down buttons on answers feed your evaluation set at almost no cost.
  • Fail politely and specifically. ‘I cannot reach the HR system right now; your request is saved and I will post here when it is submitted’ is far better than a generic error.

Approval flows

Approvals are one of the highest-value uses of a chat agent. A good flow: the requester asks in natural language; the agent gathers missing details, checks policy, and posts a structured card to the approver with the context and a recommendation; the approver confirms or rejects with a reason; the agent performs the action in the source system and posts the outcome back to the requester’s thread. The decision and the action are logged with both identities.

For example, a 150-person professional services firm might start with a single agent that answers policy questions and raises access requests, then add expense pre-approvals once the first flow has run cleanly for a month. The numbers are illustrative; the sequencing is the point.

Security and risk: messages are untrusted input

An agent in a busy workspace reads text written by many people, sometimes including external guests and shared channels with other organisations. Any of that text can contain instructions aimed at the agent. Our article on prompt injection in agentic systems covers the attack patterns in detail.

The OWASP Top 10 for LLM applications describes this risk as excessive agency, with three root causes: excessive functionality, excessive permissions and excessive autonomy. Its mitigations translate directly to chat agents:

OWASP mitigationWhat it means in Teams or Slack
Minimise extensions and their functionsGive the agent a short list of narrow tools; no generic ‘call any API’ or ‘run a query’ tool
Limit permissions to the minimumScoped platform consent and read-only system access unless a write is the purpose of the tool
Execute in the user’s contextDelegated access for reads, so answers respect each user’s rights
Require human approval for high-impact actionsConfirmation cards for anything that sends, changes, pays or deletes
Enforce authorisation downstreamTools check rights in the source system, never trust the model’s judgement
Log, monitor and rate-limitEvery tool call recorded with user, channel, inputs and outcome; per-user and per-channel limits

Data handling

  • Decide which messages the agent may send to a model provider, under which contract, and with what retention. Workspace content often includes personal data.
  • Redact or avoid storing sensitive content in logs, while keeping enough to investigate incidents.
  • Be explicit about shared and external channels: many organisations disable the agent there by default.

A delivery plan and checklist

We run chat agent projects in short phases, each ending with real users and a decision.

  1. Weeks 1 to 2: discovery. Pick one or two chat-native use cases, map the systems and permissions involved, agree success measures (for example, requests resolved without a human, time to approval) and confirm platform constraints with your Teams or Slack administrators.
  2. Weeks 3 to 6: first agent. Build the channel adapter, agent core and two or three tools; implement delegated access, confirmation cards and logging; create an evaluation set from real questions.
  3. Weeks 7 to 8: pilot. Release to a small group through organisational publishing or an internal app, monitor feedback and logs daily, and fix the top failure categories.
  4. Weeks 9 onwards: expand. Add tools and audiences one at a time, each gated by the evaluation suite.

The timeline is illustrative; integration complexity and approval processes move it more than the agent itself. Observability matters from the first pilot user, as we set out in our piece on observability for AI agents.

Checklist before you launch

  • Use cases classified as chat-native, hybrid or app-only.
  • Internal or distributed decision made, with the platform rules and terms reviewed for that path.
  • Agent core separated from channel adapters.
  • Each tool’s identity mode (delegated or application) documented, with narrowest platform permissions requested.
  • Authorisation enforced in source systems and retrieval filtered per user.
  • Behaviour defined for private chats, channels, shared and external channels.
  • Confirmation required for all actions with real-world effects.
  • Every tool call logged with user, channel, inputs, outcome and cost.
  • Evaluation set built from real questions and run before each release.
  • Teams or Slack administrators, security and data owners signed off.

Done well, an agent in Teams or Slack does not feel like a new tool at all. It feels like a colleague who is always available, careful with permissions and honest about what it has done.

Frequently asked questions

Should we build our agent for Teams or for Slack first?

Start where most of the target users already work. If you need both, keep the agent core platform-neutral and add a second channel adapter later. Microsoft’s 365 Agents SDK documents Slack as one of its channels, so for some use cases one SDK can serve both; for others, two thin adapters on a shared core are cleaner.

Can an agent read our channel history to answer questions?

Technically yes, within each platform’s permissions, but be deliberate. On Teams, resource-specific consent can limit reading to specific teams or chats. On Slack, internal apps keep higher history limits, while commercially distributed non-Marketplace apps have been limited to one history request per minute since May 2025. In all cases decide what is stored, for how long, and who can see answers derived from it.

How do we stop the agent showing people data they should not see?

Use delegated access for reads so the agent acts with the requesting user’s rights, enforce authorisation in the tools and source systems rather than in the prompt, filter retrieval by user permissions before anything reaches the model, and make the agent aware of whether it is replying in a private chat or a large channel.

Do we need Microsoft 365 Copilot or a paid Slack plan?

Not necessarily for a custom agent, but check the features you plan to use. Slack’s documentation notes that some AI features require a paid plan. On the Microsoft side, a custom agent built with the Agents SDK can run in Teams without Copilot, while surfacing it inside Copilot depends on your licensing.

What does a first chat agent typically involve?

One or two use cases, a channel adapter, an agent core, two or three narrow tools, delegated permissions, confirmation cards for actions, logging and an evaluation set, followed by a small pilot. The effort depends mostly on the systems you integrate and your internal approval processes.

Is it safe to enable the agent in shared or external channels?

Treat it as a separate decision. Messages from external participants are untrusted input and audiences are wider, so many organisations disable the agent in shared channels by default or restrict it to read-only, non-sensitive tools there.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Microsoft Learn: Microsoft 365 Agents SDK overview — accessed 10 November 2026. Agents SDK purpose, channel abstraction across Teams, Microsoft Copilot, web and Slack, supported languages, turn-based state, and AI-agnostic design.
  2. Slack developer docs: Developing agents — accessed 10 November 2026. Slack agent surfaces and methods including assistant.threads.setStatus, setSuggestedPrompts, the assistant:write scope, feedback buttons and the note that some AI features need a paid plan.
  3. Slack developer changelog: Rate limit changes for non-Marketplace apps (29 May 2025) — accessed 10 November 2026. New limits on conversations.history and conversations.replies for commercially distributed non-Marketplace apps, and the exemption for Marketplace and internal apps.
  4. Microsoft Learn: Resource-specific consent for Teams apps — accessed 10 November 2026. Scoping app access to a specific team, chat or meeting instead of tenant-wide permissions, and administrator controls.
  5. OWASP GenAI Security Project: LLM06:2025 Excessive Agency — accessed 10 November 2026. Root causes of excessive agency and mitigations: minimal tools and permissions, user-context execution, human approval, downstream authorisation, logging and rate limiting.

Which of your workflows should an agent handle inside Teams or Slack?

We can help you pick the first use case, design the permissions and approvals, and deliver a pilot agent your administrators and security team are comfortable with.