Documentation.

Everything you need to get Max running, configured, and doing useful things.

Installation.

Prerequisites

One-line install

terminal
$ curl -fsSL https://raw.githubusercontent.com/burkeholland/max/main/install.sh | bash

Or install with npm

terminal
$ npm install -g heymax

Upgrading from a previous version

If you already have Max installed, just run:

terminal
$ max update

Or upgrade manually with npm install -g heymax@latest. Your existing configuration in ~/.max/.env is fully backward-compatible — no changes needed.

What happens automatically on upgrade:

  • If you had SQLite-based memories from an earlier version, they are migrated into wiki pages on first launch and originals are archived.
  • Bundled agent definitions are synced — your customizations are preserved, only missing agents are added.
  • No data is lost. Your Telegram config, model preferences, and wiki all carry forward.

Setup.

After installing, run the interactive setup wizard:

terminal
$ max setup

The wizard walks you through:

  1. Model selection — pick your default Copilot model (you can switch anytime later)
  2. Telegram setup (optional) — create a bot via @BotFather, lock it down to your user ID, and configure it

Telegram lockdown is required. If you choose to set up Telegram, Max will not proceed until you provide your user ID. This prevents unauthorized access to your machine through the bot.

Configuration is saved to ~/.max/.env. You can re-run max setup anytime to reconfigure.

Running Max.

CommandDescription
max startStart the Max daemon. Launches the orchestrator, HTTP API (port 7777), and Telegram bot (if configured).
max tuiOpen the terminal UI. Connects to the running daemon via SSE for real-time streaming.
max setupRun the interactive setup wizard.
max helpShow available commands.
max updateCheck for updates and install the latest version.
max --versionPrint the version number.

Typical workflow: Start the daemon in one terminal with max start, then open a second terminal and run max tui to chat. Or just message Max on Telegram from your phone.

Commands.

Slash commands work in both the TUI and Telegram. They're instant — they don't go through the AI, so they're great for quick actions.

CommandDescriptionWhere
/cancelCancel the in-flight messageTUI TG
/modelShow the current modelTUI TG
/model <name>Switch to a different modelTUI TG
/memoryShow the wiki index (everything Max has stored)TUI TG
/skillsList installed skillsTUI TG
/workersList active agent tasksTUI TG
/restartRestart the Max daemonTUI TG
/statusDaemon health checkTUI
/clearClear the terminal screenTUI
/quitExit the TUITUI
/helpShow command helpTUI TG

Tip: In the TUI, press Escape to cancel a running message — no need to type /cancel.

Talking to Max.

Anything that isn't a slash command gets sent to Max as a natural language message. Max decides how to handle it:

You can also address agents directly with @mentions: @coder fix the login bug or @designer make the landing page responsive.

Messages are tagged with their source channel — [via telegram] or [via tui] — so Max can adapt his response style. Telegram gets shorter responses; TUI gets more detail.

Agents.

Max delegates work to specialist agents — each one runs in its own Copilot CLI session with full tool access. Max acts as the orchestrator: he receives your messages, decides which agent should handle the work, and dispatches the task.

Built-in agents

AgentDefault ModelWhat it does
@codergpt-5.4Software engineering — implementation, debugging, refactoring, tests, deployment
@designerclaude-opus-4.6UI/UX design — components, styling, layouts, mockups. Bundles the frontend-design skill.
@general-purposeautoAnything else — research, docs, data processing, system tasks. Model chosen per task.
@maxclaude-sonnet-4.6The orchestrator itself — routes tasks, answers simple questions, manages agents.

How to use agents

You can talk to agents in two ways:

Agent tasks run in the background. Max dispatches the task and responds immediately — you don't wait for the agent to finish. When the agent completes, Max relays the results. Multiple agents can work in parallel.

conversation
You: @coder Fix the auth bug in ~/dev/myapp Max: On it — I've asked @coder to handle that. ...a few minutes later... Max: @coder finished. The token refresh wasn't catching expired JWTs. Want me to push a PR?

Agent definition files

Each agent is defined by a simple .agent.md file in ~/.max/agents/. The file has YAML frontmatter for configuration and a markdown body for the system prompt:

~/.max/agents/coder.agent.md
--- name: Coder description: Software engineering specialist model: gpt-5.4 --- You are Coder, a software engineering specialist. Read existing code before writing new code. Follow the project's existing patterns...

Frontmatter fields

FieldRequiredDescription
nameYesDisplay name of the agent
descriptionYesShort description — shown in agent roster and help
modelYesDefault model (gpt-5.4, claude-sonnet-4.6, auto, etc.)
skillsNoList of skills to load (e.g. frontend-design)
toolsNoTool allowlist. Omit to give the agent all tools.
mcpServersNoMCP servers to connect

Changing an agent's model

Edit the model: field in the agent's .agent.md file. For example, to switch @coder to Claude:

~/.max/agents/coder.agent.md
model: claude-sonnet-4.6

Set model: auto to let the orchestrator pick the best model per task. Changes take effect on the next agent session — no restart needed.

Creating custom agents

Ask Max to create one, or use the create_agent tool directly:

conversation
You: Create an agent called "reviewer" that does code reviews Max: Done — created @reviewer at ~/.max/agents/reviewer.agent.md

Or create the file manually: add a your-agent.agent.md file to ~/.max/agents/ with the frontmatter format above.

Bundled agent updates

When Max updates, bundled agent definitions are synced automatically. If you've customized a built-in agent (edited the file), your changes are preserved — Max only overwrites agents that haven't been modified since the last sync. Built-in agents (max, coder, designer, general-purpose) cannot be deleted, but you can freely edit them.

Tip: Use /workers to see all running agent tasks, their status, and which agent is handling each one.

Skills.

Skills are markdown instruction files (SKILL.md) that teach Max how to use external tools. They're stored in ~/.max/skills/.

Using skills

Just ask Max to do something. If he has a skill for it, he'll use it automatically. Ask "what skills do you have?" or use /skills to see what's available.

Learning new skills

When you ask Max to do something he doesn't know how to do, he'll:

  1. Spin up a worker to research what CLI tools are available on your machine
  2. Figure out how to accomplish the task
  3. Save the instructions as a SKILL.md so he remembers for next time
  4. Do the task

You can also explicitly teach Max: "Learn how to use kubectl" and he'll research it and create a skill.

Community skills

Max can discover and install skills from the open source community skill library. Just say "find me a skill for X".

Bundled skills

Max ships with the gogcli skill for Google services (Gmail, Calendar, Drive, Contacts, Tasks, Sheets) — requires gogcli to be installed.

Memory.

Max has a wiki-based memory system that stores knowledge as interlinked markdown pages — organized like a personal Obsidian vault, not a flat list of facts.

Wiki knowledge base

Max maintains a personal wiki at ~/.max/wiki/ — a living knowledge base that grows with every conversation. Preferences, people, projects, routines — organized into searchable markdown pages with YAML frontmatter, automatically indexed, and injected into context.

Entity pages, not flat dumps

Max keeps a dedicated page per entitypages/people/burke.md, pages/projects/max.md — instead of one giant people.md. New facts are merged into the right page, related entities are cross-linked with [[wiki links]], and pages carry tags + created/updated dates in frontmatter.

Max saves knowledge two ways:

For structured, longer-form knowledge, Max uses wiki_update to create or edit full pages. You can also ask Max to search his wiki (wiki_search), read specific pages (wiki_read), ingest external content like URLs or documents (wiki_ingest), or run wiki_lint to find broken links and orphan pages.

Index-first context injection

Every message Max receives is paired with a ranked table of contents of his entire wiki — pages scored by keyword relevance to the current message, recency (last 7 days get a boost), and tags. Max sees the index first, then uses wiki_read to drill into specific pages as needed. No more force-feeding stale page content into every prompt.

Episodic memory

After roughly every 10 turns of conversation (with a 30-minute idle gap), a lightweight background writer summarizes the session into a daily conversation page at pages/conversations/YYYY-MM-DD.md — with cross-references back to the people, projects, and decisions involved. This runs asynchronously after responses are delivered, so it never blocks you.

Forgetting

Ask Max to "forget that" and the forget tool picks the right surgery: removing a single line, rewriting a section of a synthesized entity page, or deleting a whole page. Use /memory to see the current wiki index.

Persistent session

Max maintains a single long-running orchestrator session using the Copilot SDK's infinite sessions. The SDK automatically compacts context in the background when it fills up, preserving important information. This means Max naturally remembers your conversation across messages — no manual history injection needed.

Conversation log

All messages are logged to SQLite with their source channel (Telegram, TUI, background). This provides cross-channel awareness — if you tell Max something on Telegram, the TUI session knows about it too. The log is also what feeds the episodic writer.

Migration from SQLite memories

If you're upgrading from an older version that used flat SQLite-based memories, Max automatically migrates them into wiki pages on first launch, then runs a one-time reorganization pass that splits flat dumps into per-entity pages and archives the originals to sources/migrated-archive/. No action needed.

Models.

Max can use any model available through your Copilot subscription. Switch models in two ways:

Ask Max "what models are available?" to see the full list with billing multipliers. The model choice persists across restarts.

Default model: claude-sonnet-4.6

Environment Variables.

Configuration lives in ~/.max/.env. You can edit it directly or use max setup.

VariableDefaultDescription
COPILOT_MODELclaude-sonnet-4.6Default LLM model for the orchestrator
API_PORT7777HTTP API port (1–65535)
TELEGRAM_BOT_TOKENBot token from @BotFather (optional)
AUTHORIZED_USER_IDYour Telegram numeric user ID (required if using Telegram)

Telegram Setup.

Telegram is optional but lets you talk to Max from your phone anywhere.

  1. Open @BotFather on Telegram and send /newbot
  2. Choose a name and username for your bot
  3. Copy the bot token
  4. Get your user ID from @userinfobot — send it any message and it replies with your ID
  5. Run max setup and enter both values when prompted

Security: The AUTHORIZED_USER_ID is mandatory. Without it, anyone who finds your bot could control your machine. Max silently ignores messages from unauthorized users.

We also recommend disabling group joins: in @BotFather, go to /mybots → your bot → Bot Settings → Allow Groups → disable.

How It Works.

Max is a Node.js daemon process built on the GitHub Copilot SDK. Here's the architecture:

All data lives in ~/.max/:

~/.max/
.env # configuration max.db # SQLite database agents/ # agent definitions (.agent.md files) sessions/ # Copilot SDK session state skills/ # learned skills (SKILL.md files) wiki/ # personal wiki knowledge base

Copilot SDK.

Max is built on the GitHub Copilot SDK (@github/copilot-sdk). Key SDK features Max uses:

For more on the SDK: Getting Started · GitHub Repository

For more on Copilot CLI: Documentation · Features