Confidential AI agents in Mattermost with Privatemode

Mattermost is the open-source collaboration platform that teams self-host to keep their communication under their own control. Its Agents plugin brings AI assistants into channels and threads. With Privatemode, those agents run on cloud-grade models while every message stays end-to-end encrypted.

Mattermost logo
Introduction

AI agents for your self-hosted collaboration platform

A Privatemode agent answering in a Mattermost thread

Self-hosted chat, cloud-grade AI

Teams choose Mattermost precisely because their conversations stay on their own infrastructure. Pointing the built-in Agents plugin at a traditional cloud LLM provider undermines that: every prompt and thread an agent reads is sent to that provider in plaintext.

Encrypted before leaving your environment

The Privatemode AI proxy runs alongside your Mattermost server and handles all traffic to the Privatemode service. It verifies the service through remote attestation, encrypts each request, and only then sends it out. By the time your data reaches the cloud, no one upstream can read it. Not even us.

Hardware-enforced on arrival

Requests are processed inside a confidential computing environment, sealed off from the host, the hypervisor, and our own operators. The full stack is open source and remotely attestable, so the guarantees are verifiable, not just promised.

Benefits

Why use Privatemode AI with Mattermost?

End-to-end encrypted AI in your chat

The local proxy encrypts every prompt before it leaves your environment and decrypts every reply as it comes back. Processing happens inside a hardware-enforced confidential computing environment on the Privatemode service. Neither the infrastructure provider nor Privatemode can access your conversations, by design.

Works with the built-in Agents plugin

Privatemode adheres to the OpenAI API specification, so it plugs into Mattermost's Agents plugin as a standard "OpenAI Compatible" AI service. No custom plugin, no code changes, just a different endpoint.

State-of-the-art models, no GPU required

Your agents get access to cloud-grade LLMs through Privatemode, all running inside a confidential computing environment. No model hosting or GPU infrastructure needed on your side.

How to get started

How to set up Privatemode in Mattermost

This tutorial assumes a running Mattermost deployment with the Agents plugin installed (it ships with Mattermost v10.3 and later). You deploy the Privatemode AI proxy next to your Mattermost server and register it as an AI service. From then on, all agent traffic is end-to-end encrypted and only decrypted inside the Privatemode service's confidential computing environment.

Privatemode portal sign-in screen

Get your API key

If you don't have a Privatemode API key yet, you can generate one for free here.

Start the Privatemode proxy

The proxy performs remote attestation on startup to verify the Privatemode service, then transparently encrypts all requests before they leave your server.

If Mattermost runs with Docker Compose, attach the proxy to the same network so it is reachable as http://privatemode-proxy:8080. If Mattermost runs directly on the host, drop the --network flag, publish the port with -p 127.0.0.1:8080:8080, and use http://localhost:8080 instead.

AI service configuration form in the Mattermost System Console

Configure the AI service

In Mattermost, go to System Console → Plugins → Agents and select Add a Service under AI Services. Configure it as shown in the screenshot:

  • Service name: Privatemode
  • Service type: OpenAI Compatible
  • API URL: http://privatemode-proxy:8080/v1
  • API Key: any placeholder value; authentication is handled by the proxy
  • Use Responses API: false, since Privatemode implements the Chat Completions API
  • Default model: the model your agents should use, for example kimi-latest

Save the configuration.

Agent configuration form in Mattermost with the Privatemode AI service selected

Create an agent

Open Agents from the product menu (or System Console → Plugins → Agents → Agents) and create a new agent. Give it a display name and username, such as privatemode-ai, and select the Privatemode AI service you just configured. Optionally override the service's default model and add custom instructions to shape how the agent responds.

A Privatemode agent answering in a Mattermost thread

Chat with your agent

Mention the agent with @privatemode-ai in any channel or thread and it replies in a thread. You can also message it directly, or use it through the AI Actions menu, for example to summarize a long thread.

a checkmark image

Done!

Your team now has AI agents in Mattermost, with every prompt and response end-to-end encrypted through confidential computing.

FAQ

Frequently asked questions about using Privatemode with Mattermost

Yes. The Privatemode proxy runs next to your Mattermost server and encrypts every request before it is transmitted. On startup it also performs remote attestation to verify that the Privatemode service is genuine. Requests are decrypted only inside the confidential computing environment.

Integrations

View more

Explore other Privatemode integrations

OpenClaw

Run an open-source personal AI assistant across your messaging apps and keep your AI interaction encrypted end-to-end.

Read guide
OpenClaw mascot

Open WebUI

Run Open WebUI as your team's self-hosted AI chat interface, with cloud-grade LLMs and full privacy.

Read guide
Open WebUI logo

Talk to an expert

Have a questions about Privatemode? Let's talk!

Want to look for yourself?