# mai — the terminal that keeps working when you close the lid

mai is a terminal for people who run AI coding agents. Every tab is backed by a
detached **tmux session**, so your shells and your agents survive a closed
laptop, a dropped connection or a reboot. The same sessions render in an app
window, in a browser, and on a phone.

Homepage: <https://usemai.ai/>

## Why it exists

An AI coding agent is only useful if it can keep thinking while you are not
watching. A normal terminal ties an agent's life to a window: close it and the
work is gone. mai inverts that. The window is just a view; the session is the
durable thing.

## What you get

### Persistent sessions
One tmux session per tab, one control-mode client per tab. Close mai, reboot the
machine, come back — the shell is still there and the agent still has its train
of thought. A session can also be put to sleep to free memory and woken later
from its own transcript.

### Many agents, one surface
- **Claude Code** is the default harness.
- **Codex** (ChatGPT) and **Antigravity** (Gemini) run as native sessions.
- **DeepSeek, Kimi, GLM, Qwen, OpenRouter, Groq** run inside the Claude harness
  by pasting an API key.
- **Local models** run through Ollama, which mai installs for you without sudo.

### A tiling canvas
Split panes horizontally and vertically, group them into workspaces, and give
each session its own display style — a raw terminal, or a chat view rendered
from the agent's structured output. There is an approval queue that shows you
only the sessions actually waiting on you, a notes pane, an embedded editor, and
a companion browser an agent can drive.

### The Hive
Point mai at a project and it runs a shared task board. A long-lived "Queen"
session holds the board and spawns worker agents, each in **its own git
worktree**, assigns them tasks, unblocks their prompts, and — with your
approval — merges the finished work. The Queen never reads a diff; token-heavy
jobs run in short-lived workers that return a one-line digest and exit.

### Reachable from anywhere
mai binds to loopback. You reach it from other devices over an SSH tunnel or
Tailscale, and you can hand someone a read-only link to a single workspace where
their input is queued for your approval before it reaches a session.

## Pricing

| Plan | Price | Concurrent sessions |
|---|---|---|
| Free / lite | EUR 0 | 3 sessions, 2 projects |
| mai Bonsai | EUR 5 / month | 5 |
| mai Personal | EUR 20 / month (first 3 months EUR 5) | 50 |
| mai Team | EUR 50 / seat / month (min. 5 seats, 50% off for 3 months) | unlimited per seat |

14-day free trial, no card required. Cancel anytime. Bonsai is a downgrade-only
tier — you start on Personal and can move down at renewal. Buying for a company?
mai Team is the plan: <https://usemai.ai/teams>.

## Getting it

mai runs on **Linux**, **macOS** and **Windows**. Three ways in, all at
<https://usemai.ai/download>:

- `curl -fsSL https://usemai.ai/install.sh | sh` — the signed binary into
  `~/.local`, on every platform. On Linux that is the CLI and the browser UI.
- A signed **apt repository** for Debian and Ubuntu (`apt install mai`), which
  upgrades mai with the rest of the system and **fences every session by
  default** — a session can only write inside its own folder.
- A **container image**, `docker pull usemai.ai/mai:latest`, for the browser UI
  with nothing installed on the host.

The account area at <https://usemai.ai/account> manages your subscription and
license.

Every release is written up at <https://usemai.ai/changelog>, back to the
first public build.

Built on tmux and Zig.

## For agents

- [`/llms.txt`](https://usemai.ai/llms.txt) — short orientation.
- [`/changelog.md`](https://usemai.ai/changelog.md) — every release, newest first.
- [`/changelog.json`](https://usemai.ai/changelog.json) — the same history, machine-readable.
- [`/auth.md`](https://usemai.ai/auth.md) — what is public and how to authenticate.
- [`/.well-known/api-catalog`](https://usemai.ai/.well-known/api-catalog) — RFC 9727 catalog of the public API.
- [`/openapi.json`](https://usemai.ai/openapi.json) — OpenAPI description of the public API.
- [`/.well-known/mcp/server-card.json`](https://usemai.ai/.well-known/mcp/server-card.json) — the MCP server mai ships.
- [`/.well-known/agent-skills/index.json`](https://usemai.ai/.well-known/agent-skills/index.json) — installable skills for driving mai.
