A compact coding agent for the terminal.
Plan, edit, run commands, review Markdown, and coordinate parallel subagents without leaving the TUI.
bun i -g pum-agent@beta
pumPUM opens the login panel automatically on the first start. Press ? on an
empty prompt to see every control.
Select a model in Ctrl+P. GPT-6 Astra, Luna and Sol are listed for OpenAI
and Codex. To use them, your provider account must have access. Press r in the model
list to refresh providers that support catalog discovery.
Use /model <name or provider/model-id> [effort] to change the main-agent model.
Names and IDs match exactly, without case sensitivity. Display names can contain spaces.
Use the provider-qualified ID when a name matches more than one model.
/model opens the model picker. /effort <level> changes only reasoning effort.
/effort shows the current effort and supported levels.
Both commands autocomplete available values and reject unsupported efforts before changing the model.
Model and effort changes use the same authentication and persistence as Settings.
Run these commands from the main transcript while the agent is idle; child models remain unchanged.
Use /store or /s to save current settings as global defaults, exactly like s in Settings.
These aliases promote PUM settings and clear session overrides. Pi already persists model and effort separately.
Warning
PUM can read, write, and delete files. Check mode adds deterministic policy checks, and supported hosts can enforce native Bash isolation, but the file-tool sandbox is a process-local path guard, not operating-system isolation. Read Safety before using untrusted workspaces.
These are real OpenTUI renders, not mockups. bun run scripts/capture-screenshots.tsx
drives the actual TUI and converts the captured cells to SVG.
- A full coding loop —
read,write,edit, andbash, with streaming Markdown, syntax highlighting, usage, cost, and Git status. - Parallel subagents — persistent agents that share the project by default, with optional isolated Git worktrees. They message each other durably and report to their spawner. See Subagents.
- Goals that outlive a turn —
/goalkeeps working, reviewed after each turn by a judge that reads but never writes. See Goals. - Project memory across sessions — the main agent maintains private Markdown facts that follow linked Git worktrees. See Tools.
- Supervised processes — background shells and external triggers such as
gh run watch, which wake the exact agent that was waiting. See Tools. - Layered safeguards — a path guard on the file tools, deterministic Check mode, and a native OS sandbox for the processes the model starts. See Safety.
- A terminal-first look — nine themes, semantic colour overrides, and optional animation. See Appearance.
PUM uses pi for the agent loop and OpenTUI for rendering.
| Guide | Contents |
|---|---|
| Command line | Options, headless runs, sandboxed launches, environment |
| Controls | Keys, slash commands, shell command mode, copying, News |
| Goals | /goal, the judge, retries, stopping |
| Subagents | Spawning, merging, previews, readonly children |
| Tools | Tool groups, patches, questionnaires, triggers, shells, todos |
| Safety | Filesystem sandbox, Check mode, native sandbox, outer sandbox |
| Appearance | Transcript detail, themes, Markdown, animation, title |
| Configuration | Where PUM stores things, and what |
| Request diagnostics | Opt-in safe request reports; transport signals are not server cache hits |
- Bun — PUM runs on Bun, not Node
- Git
- An interactive terminal with ANSI/VT and Unicode support
- Credentials for a supported provider, or an OpenAI-compatible endpoint
Linux and macOS are the primary environments. Windows CI checks the code and Windows path behaviour, but native Windows TUI operation is provisional.
Native Bash sandboxing is optional and platform-specific: on Linux it needs
Bubblewrap (bwrap) with working unprivileged user namespaces, which PUM probes
by launching a minimal sandbox rather than by finding the executable; on Windows
it uses the alpha @microsoft/mxc-sdk and its base-container tier. On Windows,
also install Git for Windows, keep bash.exe on PATH, and use Windows
Terminal with PowerShell — not PowerShell ISE.
git clone https://github.com/eugen1763/Pum.git
cd Pum
bun install --frozen-lockfile
bun run login
bun run startUse bun run start -r to resume the latest session for the current directory,
and /login to add or update a provider later.
Inside the TUI, /history or its alias /resume opens the saved-session browser.
For local request debugging, start with PUM_REQUEST_DIAGNOSTICS=1 bun run start
and use /diagnostics in the selected transcript. Headless runs emit the safe
report on stderr only. Diagnostics stay in bounded process memory, not session
files, and do not establish provider cache hits. See Request diagnostics.
Agents have separate context tools: history searches and reads the active session
transcript. get_context_remaining reports the context budget. new_context
requests a rollover, deferred until the entire tool batch succeeds. Rollover keeps
the canonical session ID, session file, and full entries across resume. The agent
can supply an optional literal handoff; rollover never generates a summary.
Automatic summarization is disabled in these runtimes. Rollover is explicit, not
automatic. Manual /compress is unchanged before the first rollover. With an
active PUM rollover boundary, the controller refuses /compress before native
summarization or authentication preflight. Use new_context instead; the complete
transcript remains available. These tools are available to main, headless, and
worker agents, including readonly workers, but not internal judges or AFK delegates.
history returns metadata-only reads for structural entries, so agents can follow
parentId links without exposing private custom data. History pages run
sequentially and account for prior history results in the same tool batch.
Only one PUM instance can own a saved session at a time. Close the owning session before resuming it elsewhere. This also applies to headless runs, managed agents, and worktree resume aliases. A locked history selection leaves the current session unchanged. PUM automatically recovers locks from dead processes when it can verify the owner. It never expires a live process lock.
The published package is called pum-agent because the bare pum name is
taken; the installed command is still pum. npm i -g pum-agent copies the
files, but pum then fails with env: 'bun': No such file or directory —
install Bun first.
bun install --frozen-lockfile
bun test
bun run typecheck
git diff --checkRun the TUI from the repository root with bun run start, and refresh the
README images with bun run scripts/capture-screenshots.tsx. Use a throwaway
PUM_DIR for local integration tests, and capture TUI output through tmux
rather than piping standard output. AGENTS.md holds the mandatory
security/workflow core and routes to the indexed current contracts,
source layout, and TUI test guidance.
Detailed rules remain mandatory; historical research
is clearly separated from current authority.
PUM 0.2 is in beta. Interfaces and persisted formats can still change before
the stable release. Review the release notes before upgrading sessions or custom
configuration.
PUM is available under the MIT License.