curl -fsSL https://raw.githubusercontent.com/trufae/pmai/main/www/install.sh | sh
Get it on the App Store ↗

Open source. Native Swift. Your choice of model.

Your agent.
On your terms.

Talk to it on your iPhone. Put it to work in your terminal. Reach your projects from anywhere. Keep the prompts, tools, models, and permissions in your hands.

Local models or your preferred API. Your conversations live with you.

From your pocket to your projectsIllustrated workflow
pmai · workstationACP

❯ /remote serve --protocol opentunnel

Gateway on loopback · encrypted public connection

Pairing request: PocketMai on your iPhone

❯ /remote accept

Projects, saved chats, and files are ready.

PocketMaiRemote host · your workstation
Let’s pick up the project I was working on.
Your projects. Your conversations.Browse files, continue a chat, run the agent.
One shared MaiCore engineNative iOSmacOS + Linux CLIAndroid preview + CLISwift

The useful differences

A personal agent.
A lot of possibilities.

Native device features, a capable terminal, and conversations you can actually take with you.

01 / Local voice · iOS

A conversation you can speak.

Talk, listen to replies, or attach a voice note. Transcription stays on device by default. Choose a local model and device voice for an offline conversation.

Native live transcription needs iOS 26+ and an installed speech model. Your selected model provider receives the resulting chat text.

02 / Remote hosts · iOS + CLI

Your workstation, in your pocket.

Pair with a running pmai host and continue its saved chats, work across projects, and browse or transfer files. Share on your LAN or use encrypted OpenTunnel access across firewalls.

How remote pairing works ↗

03 / Portable conversations

Take the whole conversation.

Share a .pocketmai file through AirDrop, a local file transfer, or your own storage. Continue in PocketMai or import it in the CLI, with attachments, tool messages, and subagent chats.

No internet service is needed to transfer the file. Provider credentials stay behind; the receiving device uses its own models.

04 / Documents that leave the chat

From a reply to a real document.

Export conversations to Word, EPUB, Markdown, HTML, plain text, or JSON. Bring documents back in: read DOCX and EPUB, convert PDFs, or use OCR for scanned pages.

.docx.epub.md.html.json

05 / Fine-grained control

You set the boundaries.

Choose tools per agent and per MCP server. Set file and folder rules to allow, ask, or deny. Review or edit tool arguments, control network tools, and set limits on turns, tokens, time, and subagents.

What the controls cover ↗

06 / An agent you can shape

Your prompts. Your skills. Your team.

Write reusable system prompts, create and import skills, and give each agent its own model and tools. Follow the subagent tree, read its work, send guidance, pause it, or stop a branch.

Choose separate models for chat, compaction, tool decisions, and approval review.

Phone + terminal

The right interface
for the work.

Native on the phone. At home in a shell. Connected when you want them to be.

On your phone

Use the device in your hand.

Speak a question, search the web, read a document, or ask about your calendar. Keep a browser in a floating PiP card and take over for a sign-in. Follow replies and tool activity from the Lock Screen.

Native iOS integrations, with permissions you choose.

In your terminal

Keep your coding workflow.

$ git diff | pmai --stdin "review this change"
$ pmai --vim install
❯ /projects
❯ /help

Pipe in context, run approved shell tools, hand over to interactive programs, and manage chats from the prompt. The bundled Vim integration can review and apply changes to a selection.

Connect your agent ecosystem

Bring tools in. Serve an agent out.

Connect MCP servers and drive other ACP agents as providers. Run pmai as an ACP agent for an editor, or expose its configured agent as a tool to another MCP client.

pmai --acppmai --mcp/agent acp list

The tool proxy offers direct, deferred, hidden, and disabled modes to control discovery and schema size.

A useful set of tools

Small superpowers.
Everyday uses.

Built-in capabilities and open protocols. Enable the tools you need for each agent.

16 capabilities

iOS

Make little apps

Create and run WebXDC mini apps with HTML, CSS, and JavaScript. Keep revisions, roll back, and share a .xdc for PocketMai or Delta Chat. The runner blocks network access.

iOS

A browser you can take over

Open a PiP WebKit browser. Let the agent read text or the DOM, use OCR, click, type, and scroll. Enlarge the card and take over whenever you need to.

iOS + CLI

Search and read the web

Search with a configured provider, fetch pages as readable content, and download files. Choose your search service, including a SearXNG instance.

iOS + CLI

Look inside GitHub

Read repositories, source files, PR diffs, commits, issues, releases, and CI logs. A configured token can grant access to private repositories. Built-in GitHub tools are read-only.

iOS + CLI

Your local knowledge index

Index project docs, source, and supported documents with vdb. Retrieve passages with paths and line references. Default retrieval uses local TF-IDF + BM25, without downloading an embedding model.

iOS + CLI

Work with your files

Read, search, write, and patch within your configured workspace. On iOS, browse and preview local or remote files, edit text, and upload or download documents.

iOS

Use your calendar

Read upcoming events or a date range. Enable event creation separately when you want the assistant to add an event, using native Calendar permissions.

iOS 26.1+

Set an actual alarm

Ask for a countdown, a one-time alarm, or a repeating weekday alarm through AlarmKit. List or cancel the alarms scheduled by PocketMai.

iOS + CLI

Check the weather

Get conditions and forecasts for a configured location. On iOS, opt into device location when it is useful.

iOS + CLI

Connect to Mastodon

Search posts and read a user’s recent updates on your chosen instance. Posting and replies require you to enable writes and configure credentials.

iOS · macOS CLI

Read images and scans

Extract text locally with Apple Vision. Import scanned pages without uploading them to an OCR service. Other CLI platforms can use an installed Tesseract.

iOS + CLI

Remember the project

Keep project memory and persistent todos. Organize saved conversations by workspace, search past chats, and reopen the context you need.

iOS + CLI

Add skills and MCP tools

Create, edit, and import SKILL.md skills. Connect remote Streamable HTTP MCP servers; the CLI also supports local stdio servers and native plugins.

CLI

Serve and compose agents

Use ACP agents as providers or subagents. Serve pmai over ACP or expose its selected agent through MCP, retaining its configured model, tools, and limits.

iOS + CLI

Supervise the agent tree

Inspect subagent transcripts, status, and usage. Give each agent a role, model, and tool set. Steer ongoing work or stop a branch.

iOS + CLI

Edit the context

Edit, undo, trim, search, or compact a conversation with a focus. Use a separate compaction model and keep linked tool-call transactions valid.

Platform labels describe PocketMai on iOS and the pmai CLI. The Android app preview has a smaller feature set, detailed below.

Your resources, your rules

Make the choices
that matter.

Choose the model and the tools, then decide how much autonomy to give them.

Pick your inference.

Use Apple Intelligence or MLX on supported Apple hardware, a local Ollama or llama.cpp endpoint, or an OpenAI-compatible API. Each agent can use a different provider.

Grant access deliberately.

Set per-resource file rules and per-tool policies, choose manual or model-assisted approval, and edit arguments before execution. Enforce run budgets and turn off internet tools when working offline.

What can stay offline?

With a local model and local tools selected, conversations, project memory, document retrieval, and supported OCR can run without an internet service. On-device speech requires supported, installed language assets. Remote providers, web tools, and remote hosts need their respective connections. The CLI’s airplane setting limits tools; it does not disconnect the selected inference provider.

How far does the sandbox extend?

Files and local document retrieval enforce workspace boundaries, path rules, and resolved symlink checks. iOS also runs within its app sandbox and system-granted resources. CLI shell commands run with the privileges of the pmai process and their own approval rules; file-tool policies are not an OS sandbox for shell commands.

Can I move a chat without exporting my API keys?

Yes. A .pocketmai conversation file includes the conversation and embedded attachments, including tool messages and nested agent chats. It excludes provider credentials and diagnostic reports. Transfer the file without internet using AirDrop or local storage, then continue with the receiving device’s configured provider.

Are all features available on Android?

The Android app is a native chat preview with provider and model setup, custom system prompts, streaming replies, saved conversations, and light/dark themes. Voice, tools, MCP, attachments, OCR, local inference, and remote host navigation are not in that app yet. The separate Android CLI provides the terminal agent feature set.

Get started

Pick your pocket.
Or your terminal.

Open source, built with Swift. Bring the model provider that suits you.

PocketMai app icon

Native iOS app

PocketMai

Voice, native tools, documents, WebXDC apps, and remote projects.

Get it on the App Store ↗iOS 18+ · some features need a newer OS or supported hardware.
pmai CLI icon

macOS · Linux · Android

pmai CLI

A terminal agent with projects, shell tools, skills, MCP, ACP, and Vim integration.

curl -fsSL https://raw.githubusercontent.com/trufae/pmai/main/www/install.sh | sh
No root needed · checksummed release download.
Update an existing installation with pmai -U.
CLI guide ↗

Native Android preview

PocketMai for Android

Provider setup, custom prompts, streaming chat, and saved history. A smaller app, growing with the same Swift core.

Download Android APK ↓Latest successful main-branch development build · arm64 + x86_64. Updating debug builds may require reinstalling.

A little pocket.
A lot of agency.

Explore the source