# Conversations (IRPCConversationOperations)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/

Stores conversations with Aino and their chat turns in the vault, per user.

- **gRPC service:** `MFiles.IRPCConversationOperations`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 6
- **Proto file:** [`mfiles/IRPCConversationOperations.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCConversationOperations.proto)

<a id="overview"></a>

## Overview

A per-user history store for chat-style features. A
[Conversation](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Conversation/index.md) has a title and a type; its
[ChatTurn](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ChatTurn/index.md)s hold the exchanged messages as text that the server stores
without interpreting it. The vault does not run any agent here: the caller writes what it wants
to keep.

- **Create or rename a conversation**:
  [AddOrUpdateConversation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/AddOrUpdateConversation/index.md).
- **Add or change a chat turn**:
  [AddOrUpdateChatTurn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/AddOrUpdateChatTurn/index.md).
- **Read**: [GetConversations](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetConversations/index.md),
  [GetConversationById](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetConversationById/index.md),
  [GetChatTurns](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetChatTurns/index.md).
- **Delete** a conversation with its chat turns:
  [DeleteConversationById](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/DeleteConversationById/index.md).

All methods need a vault session and no special vault rights. A conversation belongs to the user
who created it; reading, renaming or deleting another user's conversation fails with "Access is
denied.". Administrators get no exception.

**Paging.** [GetConversations](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetConversations/index.md) and
[GetChatTurns](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetChatTurns/index.md) return at most 100 items,
newest first (descending `sort_key`). For the next page, send the smallest `sort_key` you
received; the server returns the items whose `sort_key` is less than it. 0 starts from the
newest. `more_results` is true while older items remain.

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [AddOrUpdateChatTurn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/AddOrUpdateChatTurn/index.md) | Adds a chat turn to one of the caller's conversations, or replaces the content of an existing chat turn. | `write` `session` |
| [AddOrUpdateConversation](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/AddOrUpdateConversation/index.md) | Creates a conversation, or renames an existing one of the caller. | `write` `session` |
| [DeleteConversationById](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/DeleteConversationById/index.md) | Deletes one of the caller's conversations and all its chat turns. | `write` `session` |
| [GetChatTurns](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetChatTurns/index.md) | Gets the chat turns of one of the caller's conversations, newest first, up to 100 per call. | `write` `session` |
| [GetConversationById](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetConversationById/index.md) | Gets one of the caller's conversations by ID. | `write` `session` |
| [GetConversations](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCConversationOperations/GetConversations/index.md) | Gets the caller's conversations, newest first, up to 100 per call. | `write` `session` |
