paimon

Guide

How to work with Paimon day to day. Every switch, key and setting mentioned here is listed in full in the reference.

First launch

uvx paimon

The first launch asks for a provider, its API base and key, then a model. The first provider on offer, Kilo, needs no account: its free models run without a key, but the providers behind them may keep and train on your prompts and code, and use is limited to 200 requests an hour per IP address.

The same can be done without the UI. Each provider keeps its own credentials, and the model to run on is chosen separately:

paimon login zai --api-key-env ZAI_API_KEY
paimon model zai:glm-4.7
paimon status

A ChatGPT plan works in place of an API key: paimon login chatgpt signs in through the browser. paimon login antigravity does the same for an Antigravity plan, which Google does not support outside Antigravity: Paimon signs in as the Antigravity client and calls an internal endpoint, so the account may be limited or closed, and the risk is yours. The sign-in asks you to accept that before it starts.

paimon model kilo:cohere/north-mini-code:free picks a free Kilo model without logging in at all. A Kilo key opens its paid models too.

Inside the app, Switch model in the command palette (Ctrl+P) changes the model, and Log in to a provider adds another one.

Asking for things

Type what you want done. Paimon reads and edits files in the directory it was started in and runs commands there.

Pasting from the clipboard only works where Paimon runs on the same machine as your desktop: on Linux that needs wl-paste or xclip, and inside WSL the Windows clipboard is read through PowerShell.

Permission modes

Shift+Tab switches how much the agent may do on its own, and --mode sets it at launch.

modewhat runs without asking
read Reads inside the working directory and a small set of clearly read-only commands (ls, cat, git status, …). Everything else is refused.
auto The same, plus edits inside the working directory. Everything else goes to a reviewer model, which answers allow or block.
yolo Everything. This is the default.

The reviewer sees your messages and the agent's tool calls, but not its reasoning or any tool output. Paimon asks you instead when the reviewer cannot be reached or has blocked three calls in a row; under -p, where there is nobody to ask, those are refusals. --strict holds every command, the read-only ones included.

All of this is a guardrail against agent mistakes, not a security boundary. For real isolation, run Paimon inside a container or VM.

Panes and parallel work

Ctrl+T opens another session in a pane of its own, Ctrl+W closes one, and Ctrl+PageUp and Ctrl+PageDown move between them. Ctrl+G jumps to a pane that is waiting for your permission.

Paimon can also split the work itself. Ask for two independent things and it starts a second agent in a tab of its own, where you can watch it work and answer what it asks. Its answer comes back into the conversation when it is done, and closing the tab stops it. A dev server or a watcher can be left running in a tab the same way, instead of holding up a turn.

Sessions

Every conversation is saved, and Paimon prints the command that brings it back when you leave.

paimon -r            # choose a session started in this directory
paimon -r a1b2c3     # resume one by id
paimon -c            # resume the most recent one
paimon sessions      # list them
paimon log a1b2c3    # what a session did, one line per event

A long conversation is summarized in place when it nears the model's context limit, and Compact context in the command palette does it on demand. The full history stays on disk, where the agent can still search it. Fork session copies the conversation into a new one to try something else from the same point.

Come back to a pane after a few idle minutes and Paimon offers a short recap of where things stand.

Skills

Paimon loads Agent Skills from ~/.config/paimon/skills, ~/.agents/skills and every .agents/skills from the working directory up to the repository root. Only each skill's name and description go into the system prompt; the model reads the SKILL.md when a task matches.

/skill:name args sends a skill explicitly, and typing / lists them. More locations go in the config as "skills": ["~/.claude/skills"] or on the command line with --skill PATH. When two skills share a name, explicit paths beat the project's, which beat the global ones.

Paimon can search the web without an API key, and does so in every permission mode, because a search changes nothing on your machine. Searches go through ddgs, a metasearch library, so a query may be sent to any of several public search engines. --no-web-search takes the tool away for a run.

Thinking effort and themes

Thinking effort in the command palette sets how hard the model thinks before it answers, from off to max, or leaves it to the model. The choice is kept in the config and holds for every pane; --thinking covers one run. A model with no such setting ignores it, and so do Antigravity's, whose level is part of the model name. Compaction summaries, auto mode's reviews and recaps are sent without it.

Paimon comes in two themes of its own, paimon (a night sky, the default) and paimon-light. Change theme in the command palette switches between them and Textual's, and the choice is remembered.

Without the UI

paimon -p "what does cli.py do?"
cat log.txt | paimon -p "summarize this"

-p runs one prompt and exits. The answer goes to stdout and everything else to stderr, so $(paimon -p ...) captures just the answer. It never stops to ask, so with the default yolo mode it can already write files and run commands; pass --mode read or --mode auto to hold it back.

A calling program should add --output-format result, which prints a single JSON object with the outcome and the session id. --timeout and --max-tool-calls bound a run. The session is saved either way, so a follow-up is paimon -r ID -p "...".

As a subagent

Frontier models are good at planning and reviewing; the steps in between are often mechanical. Point Paimon at a cheaper model and let Claude Code or Codex write the plan and check the result.

paimon login zai --api-key-env ZAI_API_KEY
paimon --model zai:glm-4.7 -p "apply the plan in PLAN.md" --mode auto --output-format result

The bundled skill teaches the calling agent this workflow:

paimon install-skill                  # into Claude Code (~/.claude/skills/paimon)
paimon install-skill --target codex   # into Codex; --dest DIR for anywhere else
npx skills add aisk/paimon            # the same skill, via skills.sh

From Python

The agent loop is importable, so a program can drive it without going through the CLI. Agent.open() starts or resumes a session and agent.run_until_idle() yields typed events, one per text chunk, tool call and turn end.

import asyncio

from paimon.agent import Agent
from paimon.events import TextDelta

async def main():
    with Agent.open(mode="auto") as agent:
        async for event in agent.run_until_idle("summarize the tests in this directory"):
            if isinstance(event, TextDelta):
                print(event.text, end="", flush=True)

asyncio.run(main())

run_until_idle() returns once the agent is done, including any agents it started along the way. agent.run() runs exactly one turn and returns with those agents possibly still at work; it is the call for a program that wants to decide itself when to run the model again, with agent.run(None). An agent runs one turn or compaction at a time, and starting a second raises AgentBusyError.

Agent.open() also takes a working directory, an async confirm callback for the permission prompts that are left, and a toolset to hand the model fewer tools or tools of your own. It writes the same session files as the CLI, so a run started in code can be resumed later with paimon -r. How the pieces fit is on the architecture page.

In a browser, and in Herdr

paimon --web serves the same UI in a browser, on port 8000 unless --port says otherwise.

Inside a Herdr pane the UI reports its state and resume command to Herdr on its own, with nothing to install. It also reports its state to the terminal itself with OSC 7501, for terminals that show it.