> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Assistant

> Chat with Ravenna's AI Assistant in Microsoft Teams via 1:1 chat with the bot or by @-mentioning it in a channel to get answers, create tickets, and resolve requests.

The Ravenna AI Assistant brings <Tooltip headline="Agents" tip="AI Agents with custom prompts and tool integrations that automate Teams support" cta="Learn about Agents" href="/documentation/automate/agents/overview">Agent</Tooltip>-powered support into Microsoft Teams. Post a message in a connected request channel to start a conversation with Ravenna, get instant answers, create tickets, and resolve requests without leaving Teams.

<Note>
  1:1 chats with the Ravenna bot are not yet supported in the Teams beta. DMs sent directly to the bot are ignored. Use a connected request channel instead. DM support is on the roadmap.
</Note>

## Mental model

The Microsoft Teams AI Assistant is the same Ravenna Agents runtime used in the Admin, surfaced through the Bot Framework. Conversations in Teams are first-class chat conversations: a `ChatConversation` row backs the channel thread or 1:1 chat, and messages flow through the standard ticket lifecycle.

Behavior in connected channels:

* The first inbound message in a connected request channel creates a ticket and a `TicketMessage`. `MESSAGE_CREATED` triggers the Agent.
* Subsequent messages in the same thread sync as additional `TicketMessage`s on the same ticket.
* The Agent's response is rendered via the outbound pipeline (mention translation, Teams markdown conversion, authored-message wrapping for human authors, Adaptive Cards for forms).

***

## Conversation types

| Conversation type             | Behavior                                                                                                                                                                            |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `channel` (team channel)      | Primary entry point. Messages create tickets only in channels with a `ChatChannel` mapping. Unmapped channels surface the connect-flow card on @-mention and ignore other messages. |
| `personal` (1:1 with the bot) | Not processed in the beta. Approval cards and similar outbound DMs still send, but inbound messages from the user are not routed to a ticket or the Agent.                          |
| `groupChat`                   | Same as `personal`; not yet routed to tickets.                                                                                                                                      |

***

## Agent runtime hooks

* `stampAgentForInboundChat(queue)` assigns the V3 Agent to the ticket on creation so the working-on-it signal and `AGENT_ASSIGN` event fire. Returns no-op for V2 / no-agent queues.
* The ticket's `title` and `description` are intentionally left blank on creation so the AI title/description generator fills them in during `TICKET_PUBLISHED`. Pre-filling either short-circuits the generator.
* Outbound `MESSAGE_CREATED` events route through `TeamsOutboundRenderer.formatMessage`, which dispatches by agent response type (form → Adaptive Card, text → converted Teams markdown).

***

## Constraints and gotchas

* Auto-create on every message in a channel does **not** apply on Teams. Tickets are only created from channels with a `ChatChannel` mapping and a configured queue.
* The Agent runs whether or not the bot was explicitly @-mentioned in the message, as long as the channel is connected. Bot mention tokens (`<at>Ravenna</at>`) are stripped from the message before processing.
* Bot Framework cannot post on behalf of an arbitrary user, so human Ravenna users replying to Teams chats are surfaced via authored-message Adaptive Cards (avatar + name header) rather than impersonated. Avatar URLs occasionally fail to load if the user's Microsoft 365 photo isn't accessible to the bot.
* 1:1 DMs to the Ravenna bot are dropped in the beta. A DM-initiated ticket flow and DM assistant classifier are on the roadmap.
* DM and 1:1 conversations do not have a Teams deep-link format, so Ravenna omits the conversation link on tickets created from chats.
* Conversational form-fill via the Agent is in development on Teams. The Agent may escalate without rendering the configured request-type form. Use the explicit form card flow described in [Forms](/integrations/microsoft-teams/forms) until this is finalized.
