Prerequisites

  • macOS, Linux, or Windows 11
  • One supported runtime to run the launcher: node, bun, or deno. The Windows installer can bootstrap Node.js automatically if none is already available.
  • One configured model provider (API Key or local Ollama)
  • Go 1.26+ (Required only for Source Build)

Installation

Downloads prebuilt binaries automatically. Current releases ship a launcher shim, a portable nami.js bundle, and the Go engine binary.

macOS / Linux

$ curl -fsSL https://raw.githubusercontent.com/channyeintun/nami/main/nami/install.sh | sh

Installs nami, nami.js, and nami-engine to /usr/local/bin or ~/.local/bin.

Windows (PowerShell)

PS> Set-ExecutionPolicy -Scope Process Bypass -Force; irm https://raw.githubusercontent.com/channyeintun/nami/main/nami/install.ps1 | iex

Runs in the current PowerShell session, installs nami.cmd, nami.js, and nami-engine.exe into %LOCALAPPDATA%\Programs\nami\bin and adds that directory to the user PATH. If no supported runtime is available, it downloads a local Node.js runtime automatically.

Manual Installation

Windows Release Archive

Download nami-windows-amd64.zip or nami-windows-arm64.zip from GitHub Releases, then place nami.cmd, nami.js, and nami-engine.exe in a directory on your PATH. Manual installs still require node, bun, or deno on your PATH.

A: Global Install

sudo install -m 755 nami /usr/local/bin/nami
sudo install -m 755 nami.js /usr/local/bin/nami.js
sudo install -m 755 nami-engine /usr/local/bin/nami-engine

B: Local User (No Sudo)

mkdir -p "$HOME/.local/bin"
install -m 755 nami "$HOME/.local/bin/nami"
install -m 755 nami.js "$HOME/.local/bin/nami.js"
install -m 755 nami-engine "$HOME/.local/bin/nami-engine"

Setup [BYOK]

Provider Env Variable
Anthropic ANTHROPIC_API_KEY
GitHub Copilot (use /connect)
OpenAI OPENAI_API_KEY
Google GEMINI_API_KEY
DeepSeek DEEPSEEK_API_KEY
Groq GROQ_API_KEY
Mistral MISTRAL_API_KEY
Ollama (none — runs locally)
Ollama Example
nami --model ollama/gemma4:e4b

GitHub Copilot

Run /connect within the TUI. For Enterprise domains:

/connect github-copilot your-company.example
  • • Prints device code in transcript
  • • Opens verification URL automatically
  • • Authorizes v5.4 models

First-Class Outputs

Artifacts in Nami are durable, structured outputs that stay reviewable in the main TUI instead of disappearing into the transcript.

  • Implementation Plans: Proposals before execution.
  • Task Lists: Real-time progress trackers.
  • Walkthroughs: Post-completion summaries.
  • Durable Returns: Large fetch/diff results.

Agent Swarms

Nami can run project-local agent swarms for planning, implementation, and review inside one repo. There is no separate launcher. Add a swarm file to your project, start Nami in that repo, and delegate child agents with a role. This workflow is also based on ideas from Uncle Bob's SwarmForge.

Setup

Add .nami/swarm.json and optional role notes under .nami/swarm/.

Usage

Launch child agents with a role such as architect, coder, or reviewer.

Visibility

Use the background tasks dialog to follow active roles and handoffs.

1. Add a Swarm File

Create .nami/swarm.json in your repository. This is the file Nami uses to understand which roles your swarm should have.

{
  "version": 1,
  "roles": [
    {
      "name": "architect",
      "purpose": "Plan the work",
      "subagent_type": "Explore",
      "model": "github-copilot/gpt-5.4",
      "workspace": "shared",
      "queue_policy": "fifo",
      "permission_profile": "read-only",
      "allow_tools": [
        "think",
        "read_file",
        "file_search",
        "grep_search",
        "swarm_submit_handoff",
        "swarm_list_inbox"
      ],
      "deny_tools": [],
      "handoff": {
        "required": false,
        "targets": ["coder"],
        "required_fields": ["summary", "verification"]
      },
      "metadata": {
        "owner": "planning"
      }
    },
    {
      "name": "coder",
      "purpose": "Implement the changes",
      "subagent_type": "general-purpose",
      "workspace": "worktree",
      "queue_policy": "latest-wins",
      "permission_profile": "write",
      "handoff": {
        "required": true,
        "targets": ["reviewer"],
        "required_fields": [
          "summary",
          "changed_files",
          "verification",
          "next_action"
        ]
      }
    },
    {
      "name": "reviewer",
      "purpose": "Review the result",
      "subagent_type": "verification",
      "workspace": "shared",
      "queue_policy": "batch-review",
      "permission_profile": "execute"
    }
  ]
}
  • version: optional. Omit it or set it to 1.
  • roles: required array with at least one role.
  • name: required. Lowercase letters, numbers, _, and - are supported.
  • purpose: required short description of what the role is for.
  • subagent_type: optional. Supported values are Explore, general-purpose, and verification. Default: Explore.
  • model: optional. Set a specific model such as github-copilot/gpt-5.4 or openai/gpt-4o.
  • workspace: optional. Supported values are shared, worktree, and snapshot. Default: shared.
  • queue_policy: optional. Supported values are fifo, batch-review, and latest-wins. Default: fifo.
  • permission_profile: optional. Supported values are inherit, read-only, execute, and write. Default: inherit.
  • allow_tools / deny_tools: optional. Use tool names to narrow what a role may use.
  • handoff.required: optional boolean. Set to true if the role must submit a structured handoff before it can finish.
  • handoff.targets: optional array of role names this role may hand work to.
  • handoff.required_fields: optional array using summary, changed_files, commands_run, verification, risks, and next_action. If handoff is required and you omit this list, Nami defaults to summary and verification.
  • metadata.owner: optional freeform label for your own organization.

If you want extra guidance for the whole swarm or for specific roles, add markdown files under .nami/swarm/, for example .nami/swarm/constitution.md or .nami/swarm/roles/coder.md.

Template Files

Starting-point templates are available under docs/swarm/. Copy them into your project's .nami/swarm/ directory and then customize them.

2. Start Nami in the Project

Open Nami from the repository root. If the swarm file is valid, Nami loads it automatically and shows a Swarm Spec artifact. If there is a problem, check that artifact first.

3. Delegate Work by Role

Swarm mode becomes useful when you launch child agents with a role. Use whatever role names you defined in .nami/swarm.json.

# ask the architect to plan
Use: agent with role: "architect"
# send coding work to the implementer
Use: agent with role: "coder"
# launch several roles together
Use: agent_team with role values per child

4. Pass Work with Handoffs

In normal swarm use, the role-aware child agent submits the handoff for you when one role finishes work for another. You only need to call the handoff tools yourself if you want to steer the workflow manually. In practice, that usually means asking Nami in plain language rather than typing a raw tool payload yourself. For a manual overview of queued swarm work, open /tasks.

Tool Purpose
swarm_submit_handoff Send work from one role to another
swarm_list_inbox See what work is waiting for a role
swarm_update_handoff Mark a handoff as acknowledged, in progress, completed, or blocked
# ask Nami to submit a handoff
Prompt: submit a handoff from coder to reviewer saying the queue policy work is ready for review, mention the files changed, and note that go build passed.
# ask Nami to inspect a role inbox
Prompt: show me the reviewer inbox.
# ask Nami to pull the next queued item
Prompt: get the next handoff for the reviewer role.

5. Check the Inbox

When you want to see what is waiting for a role, use swarm_list_inbox. If you want the next piece of work for a role, use it with dequeue: true. This is also the mechanism a receiving agent can use to pull its next queued handoff.

  • List work: see everything waiting for a role
  • Pull next work: ask for the next handoff with dequeue: true

6. Watch the Dashboard

Open the background tasks dialog with /tasks to see active roles, recent handoffs, and running background work in one place.

Tips

  • Start simple with three roles: architect, coder, and reviewer.
  • If a role is not behaving as expected, check the Swarm Spec artifact first.
  • Use handoffs to move work forward instead of relying on long freeform summaries.
  • Use the dashboard when you have multiple background roles active at once.

CLI Options

# Use a specific model
$ nami --model openai/gpt-4o
# Direct execution (skip planning)
$ nami --mode fast
# Auto-approve non-destructive tools
$ nami --auto-mode

MCP Management

Nami includes a small MCP management CLI for adding, inspecting, listing, and removing configured MCP servers without editing JSON by hand.

$ nami mcp add my-server -- npx my-mcp-server
$ nami mcp add --transport http sentry https://mcp.sentry.dev/mcp
$ nami mcp add-json docs '{"transport":"stdio","command":"uvx","args":["docs-mcp"]}'
$ nami mcp list
$ nami mcp get sentry
$ nami mcp remove sentry

Project Scope

Writes repo-local MCP config to .nami/mcp.json

User Scope

Writes user MCP config to ~/.config/nami/config.json

  • Supported transports: stdio, http, sse, and ws
  • Stdio flags: --env KEY=value and --startup-timeout-ms
  • Network flags: --header 'Key: Value' for http, sse, and ws
  • Runtime checks: list and get attempt a real MCP connection, so repo-scoped stdio servers are briefly spawned to inspect health and capabilities

Slash Commands

Command Description
/connect Connect GitHub Copilot login
/plan Switch to read-only planning mode
/fast Switch to direct execution mode
/model [name] Show or switch active model
/reasoning [level] Set o1 reasoning effort
/compact Compact the context window
/resume [id] Resume previous session
/clear Start a fresh session
/status Show current session status
/tasks Open the background tasks dialog, including swarm handoffs and active child agents
/sessions List recent sessions
/debug [status|path|off] Enable live debug capture, open the monitor, or inspect the current session log
/help Show command help

Permissions

Key Action
y Allow this one command
n Deny this command
a Always allow this exact command
s Allow read-only/safe commands for session

Use the --auto-mode flag at startup to automatically enable "Allow Safe" for the entire session.

Destructive commands (rm -rf, push --force) always require 'y' approval.

Tools Reference

Tool Capability
agent Spawn child agents with stable lineage tracking
agent_status Check background child agent lifecycle
agent_stop Request a background child agent to stop
bash Execute terminal commands
think Scratchpad reasoning without side effects
list_dir List contents as structured JSON
create_file Create brand-new files
read_file Read text files with range and partial-read support
file_write Overwrite entire file content
replace_string_in_file Exact find-and-replace snippet edits in one file
multi_replace_string_in_file Group several exact replacements into one tool call
apply_patch Apply multi-hunk/multi-file patches
file_diff_preview Preview a compact diff against existing content
file_search Find files by pattern
grep_search Content search using ripgrep
go_definition Resolve Go symbols using parser
go_references Find Go identifier references with parser-backed context
read_project_structure Read a bounded project tree for directories and files
project_overview Summarize repository structure, manifests, and languages
dependency_overview Summarize dependencies from common manifests
symbol_search Find likely symbol definitions across source files
web_search Perform web-scale research
web_fetch Retrieve URL content for parsing
list_commands List retained background commands with recent output
command_status Check background command timing/output
send_command_input Send stdin to a retained background command
stop_command Stop a running background command
forget_command Remove a retained background command from memory
file_history Track snapshots and diff file changes
file_history_rewind Restore tracked files to an earlier snapshot
git Read-only git ops (log, blame, status)

Child Agent Modes

The agent tool exposes three bounded modes. Explore is the default read-only search agent, general-purpose handles broader delegated work, and verification validates builds and tests without file edits.

Explore: Read-only codebase search and architecture research.
General Purpose: Broader delegated work.
Verification: Builds, tests, and validation without file edits.

Edit Tool Selection

  • replace_string_in_file: One exact snippet replacement in one existing file.
  • multi_replace_string_in_file: Several exact replacements grouped into one call when you already know the target strings.
  • apply_patch: Structural, multi-hunk, create/delete, or multi-file edits.
  • file_write: Full overwrite of one existing file.
  • create_file: Create one brand-new file.

Configuration Reference

File: ~/.config/nami/config.json

Env Variable Description
NAMI_MODEL Override default model
NAMI_API_KEY Override provider-specific key
NAMI_DEBUG Enable runtime diagnostic log
NAMI_AUTO_MODE Auto-approve non-destructive tool calls

MCP Configuration

Nami supports both a global user config and a repo-local MCP override. Use the global file when you want the same server in every workspace. Use .nami/mcp.json when you want MCP setup scoped to the current repo. The workspace file is merged on top of the global config for the current session. For routine setup, prefer the nami mcp add command and related management subcommands instead of editing JSON by hand.

Global

~/.config/nami/config.json

Repo Local

.nami/mcp.json

Global Config Style

{
  "model": "anthropic/claude-sonnet-4-20250514",
  "mcp": {
    "servers": {
      "chrome-devtools": {
        "transport": "stdio",
        "command": "npx",
        "args": ["-y", "chrome-devtools-mcp@latest"],
        "enabled": true,
        "trust": false
      }
    }
  }
}

Repo-Local .nami/mcp.json Style

{
  "servers": {
    "chrome-devtools": {
      "transport": "stdio",
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest"],
      "enabled": true,
      "trust": false
    }
  }
}

Chrome DevTools Example

This uses the upstream Chrome DevTools MCP server in Nami's config shape. Keep trust disabled by default because the server can inspect and modify a live browser session.

{
  "servers": {
    "chrome-devtools": {
      "transport": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp@latest",
        "--no-usage-statistics"
      ],
      "env": {
        "CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS": "1"
      },
      "enabled": true,
      "trust": false
    }
  }
}

Skills

Skills are task-specific instruction bundles that Nami can inject automatically when they match the current request. They are not always-on policy files. Use skills for reusable workflows, domain-specific guidance, and lightweight task playbooks that should only appear when relevant.

User Global Skills

~/.config/nami/agents/*.md

Project Skills

.agents/*.md

  • • Nami loads built-in skills first, then user-global skills, then project-local skills.
  • • If two skills share the same name, the later source wins, so project-local skills can override a global one.
  • • Nami auto-selects up to three relevant skills for a turn based on the user prompt.
  • • Skills are markdown files with optional frontmatter such as name, description, keywords, allowed-tools, and argument-hint.

Example Skill

---
name: go-review
description: Review Go changes for correctness, error handling, and package boundaries
keywords: go, golang, review, refactor
allowed-tools: read_file, grep_search, go_definition
argument-hint: repo path or changed files
---

Focus on obvious code, explicit error handling, and small package responsibilities.

AGENTS.md

AGENTS.md is Nami's project-instructions file. It is loaded automatically and treated as always-on guidance for the current workspace. Use it for coding standards, repository workflow rules, architecture constraints, and other durable team instructions that should apply across tasks.

Shared Project Instructions

AGENTS.md

Local Private Override

AGENTS.local.md

  • • Nami walks upward from the current working directory and loads AGENTS.md files it finds along the path.
  • • Files closer to the current directory have higher priority and are loaded later.
  • • These project instructions override default behavior when applicable.
  • • Use AGENTS.md for broad workspace policy. Use skills for task-specific workflows that should only be injected when relevant.

Example AGENTS.md

## Go Coding Philosophy

- Write obvious code, not clever code.
- Always check errors explicitly.
- Keep packages focused and composable.

## Workflow Rules

- Run formatting after each completed task.
- Build before proposing a commit.
- Prefer repo-local conventions over generic defaults.

Diagnostics

Nami now supports both startup debug capture and live session capture. The canonical log format is structured JSONL so you can tail it directly or pipe it into external monitoring tools.

From Launch

NAMI_DEBUG=1 nami

Inside The TUI

/debug
/debug status
/debug path
/debug off

Manual Monitor

nami debug-view --file ~/.config/nami/sessions/<session-id>/debug.log
tail -F ~/.config/nami/sessions/<session-id>/debug.log | jq .
  • • On macOS, /debug opens a new Terminal window with the live monitor attached to the current session log.
  • • Each line in debug.log is a structured event envelope with fields like schema_version, ts, session_id, component, event, level, metrics, data, and error.
  • • Sensitive raw payloads are redacted and truncated before they are written to the log.

Architecture

Nami uses a split-process architecture. A Silvery-powered terminal UI communicates with a Go engine over NDJSON. Every turn, the engine assembles context from four cooperating layers: live retrieval, durable preference memory, session memory, and compaction. Retrieval stays repo-first — no cached code summaries.

See the implementation write-up in docs/lean-retrieval-architecture.md for the retrieval layer, session graph, session-memory/compaction interplay, invalidation rules, and telemetry details behind this diagram.

The Core Harness
A high-performance Go engine driving anchored agentic loops
GO ENGINE CORE LOOP TUI RETRIEVAL MEMORY PLANNER TOOLS LLM INFRASTRUCTURE
Per-Turn Retrieval Pipeline
Retrieval stays lean; session memory and compaction preserve continuity around it
Input Signals Prompt 8.2kB Git Diff 14kB Tool Logs 2.1kB EXTRACT ANCHORS Graph Instance: d351b0 SESSION GRAPH F S CONNECTED F: File Node | S: Symbol Node 0.94 CONFIDENCE BUDGET: 4.2k LLM TOOL EXECUTION INVALIDATION RE-PARSE Graph persists across session turns PRESSURE GATE halves budget

This diagram is intentionally retrieval-scoped. It shows how Nami selects fresh repo context per turn. Continuity under context pressure is handled by separate layers: session memory preserves structured working state, and compaction trims or summarizes older transcript state without replacing live retrieval.

Building from Source

bun run setup       # Build TS & compile Go
bun run start       # Run dev Silvery TUI
make release-local  # Package launcher shim + nami.js + engine
make install        # Install to /usr/local/bin
Navigation
Prerequisites Installation Manual Install Setup GitHub Copilot
First-Class Outputs Agent Swarms CLI Options MCP Management Slash Commands Permissions
Tools Reference
Child Agent Modes Edit Tool Selection Configuration Reference MCP Configuration Diagnostics Architecture Building from Source