Based 2.0

Where humans and agents work together.

Based is a personal AI workflow platform that turns your filesystem into a shared workspace for you and your AI agents. It orchestrates Claude, Codex, Gemini, and Ollama from a single control plane โ€” CLI, API, MCP, and web UI.

Based doesn't wrap providers behind a proxy or replace their CLIs. It runs them as real terminal sessions, coordinates their work through a shared filesystem, and gives you full visibility into what they're doing.

What's in the box

๐Ÿ–ฅ๏ธ Terminal-First

tmux sessions are the real workspace. Based launches, monitors, and coordinates them. Real PTY, real shell, real tools.

๐Ÿ” 12 Queryable Domains

Projects, sessions, artifacts, git, logs, memory, config, health, views, usage, files, hosts โ€” all searchable from one API call.

๐Ÿค– Multi-Provider

Claude, Codex, Gemini, Ollama. Same workspace, same tools, same context. Providers compete on strengths, not lock-in.

๐Ÿง  Agent System

8 specialized agents, skill definitions, slash commands, hooks, and a memory system that persists across sessions.

๐Ÿ’ฌ Messaging

Three messaging pathways: Box (file drop), Msg (structured mailbox), Beam (real-time tmux). Agents communicate without HTTP.

๐ŸŒ Web UI

19 navigation modes, Monaco editor, integrated terminal, kanban, notes, dashboards โ€” with adaptive shells for phone, tablet, and desktop.

Architecture at a glance

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    You / Agent                   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   CLI    โ”‚  Web UI  โ”‚  MCP      โ”‚  REST API     โ”‚
โ”‚  base *  โ”‚ :3333    โ”‚  20 tools โ”‚  /api/*       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              based-api (:3334)                    โ”‚
โ”‚  12 domain adapters ยท agent query ยท orchestrator โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              Filesystem (DATA_ROOT)              โ”‚
โ”‚  bases ยท sessions ยท memory ยท config ยท telemetry  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚           Intelligence Providers                  โ”‚
โ”‚  Claude CLI ยท Codex CLI ยท Gemini CLI ยท Ollama    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quick links

Installation

macOS and Linux. One command.

Quick install

curl -fsSL https://based.md/install | sh

Detects your platform (darwin-arm64, darwin-x64, linux-x64, linux-arm64), downloads the binary, and installs to /usr/local/bin/based.

Alternative: npm

# npm
npm install -g @based/cli

# bun
bun add -g @based/cli

Verify

base doctor

Checks for required dependencies:

DependencyRequiredNotes
tmuxYesSession orchestration backbone
gitYesPer-base state tracking
nodeYesv22+ for API server
claudeAt least oneClaude Code CLI
codexAt least oneOpenAI Codex CLI
geminiAt least oneGoogle Gemini CLI
ollamaOptionalLocal model inference

Platform support

PlatformStatus
macOS (Apple Silicon)โœ… Primary
macOS (Intel)โœ… Supported
Linux (x64)โœ… Supported
Linux (ARM64)โœ… Supported
WindowsโŒ Use WSL

Quick Start

First session in 2 minutes.

1. Initialize a base

# In any project directory
base new myproject

Creates a base.md manifest. Based discovers it automatically on the next scan.

2. Start a session

base start myproject

Launches a tmux session with your preferred AI provider. Based auto-selects from the intelligence chain, or you can specify:

base start myproject --provider claude
base start myproject --provider codex

3. Check status

base status

Cross-project dashboard showing active sessions, dirty repos, inbox items, and provider health.

4. Query across everything

# CLI (via API)
curl -s "http://localhost:3334/api/agent/query?q=deploy" -H "Authorization: Bearer $TOKEN"

# MCP (from any connected agent)
based_query({ query: "deploy" })

Searches all 12 domains in parallel โ€” projects, sessions, files, git, logs, memory, config, and more.

5. Open the web UI

# Default: http://localhost:3333
open http://localhost:3333

Full IDE-like interface with 19 navigation modes, Monaco editor, integrated terminal, and real-time filesystem sync.

Core Concepts

The ideas that make Based work.

Bases

A base is any directory with a base.md manifest. It's the atomic unit of Based โ€” a project, a service, a set of docs, a task. Based discovers bases by scanning DATA_ROOT and its subdirectories.

# base.md frontmatter
---
name: my-api
type: code
realm: production
tags: [api, express, deployed]
lifecycle: active
priority: high
---

# my-api
Express backend for the main product.
## Notes
- Deployed to .11
- Uses PostgreSQL

Convention over configuration

Based uses typed subdirectories under DATA_ROOT:

  • code/ โ€” source code projects
  • host/ โ€” infrastructure configs
  • agent/ โ€” agent definitions
  • space/ โ€” workspaces and planning
  • task/ โ€” task-scoped work

Drop a directory in the right place with a base.md, and Based picks it up. No registration, no imports, no config files.

Sessions

Sessions are real tmux terminal sessions where AI providers run. Based discovers sessions from provider-specific stores:

  • ~/.claude/projects/**/*.jsonl โ€” Claude Code
  • ~/.codex/sessions/YYYY/MM/DD/*.jsonl โ€” Codex
  • ~/.gemini/sessions/*.jsonl โ€” Gemini

Every session has token counts, tool call history, and timing metadata โ€” all queryable from the API.

The filesystem is the database

Based doesn't use a database. Project manifests, memory files, config, mailbox messages, telemetry โ€” everything is a file. This means:

  • Git tracks all changes automatically
  • Any editor can modify any data
  • Agents read and write directly โ€” no ORM, no migration
  • Backup is rsync

Agent-first design

Every API endpoint returns structured, typed data. The Agent API (/api/agent/) is self-describing โ€” one call returns every domain, every field, every filter, and example queries in natural language. Any agent can understand the entire platform without reading documentation.

CLI Reference

18 commands. All terminal-native.

The base command dispatches to base-<cmd> scripts. All commands share helpers from base-lib (path resolution, telemetry, hooks).

Sessions

CommandAliasDescription
base start <name>sLaunch or resume a tmux session with provider selection
base kill <name>kStop a session (runs post-kill hooks)
base listls, lList all registered bases
base statusstCross-project dashboard

Project

CommandAliasDescription
base new <name>nScaffold a new base with manifest
base migratemigConvert .base.yaml โ†’ base.md
base migrationโ€”Run data migration operations

Messaging

CommandAliasDescription
base boxbxFile-drop inbox
base inboxinInbox management
base msgโ€”Structured JSONL mailbox (send/inbox/ack/broadcast)
base beamsendSend keystrokes to tmux sessions

System

CommandAliasDescription
base doctorโ€”Health and dependency checks
base selftesttestEnd-to-end integration suite
base docsdGenerate shell aliases for ~/.bashrc
base telemetryteleView CLI usage analytics
base flagsflagView/set feature flags

Orchestration

CommandAliasDescription
base swarmโ€”Orchestrator plan + task controls
base memoryโ€”Memory extraction + consolidation

Shell Aliases

Generated by base docs --apply.

b    โ†’ base
bl   โ†’ base list
bs   โ†’ base status
ho   โ†’ base inbox
bd   โ†’ base doctor

Realm wrappers

Based provides realm-aware credential wrappers for common CLIs:

wr <cmd>    โ†’ Wrangler (Cloudflare), injects token by realm
aw <cmd>    โ†’ Appwrite, switches profile by realm
gh-wrap <cmd> โ†’ GitHub CLI, switches account by realm

Realm mapping is configured in cli-profiles.yaml.

System Architecture

Two services, one filesystem, many providers.

Services

ServicePortScopeDescription
based-api3334Loopback onlyExpress + MCP server. Domain adapters, agent query, orchestrator, mailbox.
based-web3333All interfacesExpress + React SPA (Vite). File ops, terminal, search, git, explorer. Proxies /api/based/* to based-api.
@based/sharedโ€”LibraryShared errors, logger, path/validation helpers, intelligence query.

WebSockets

  • /ws โ€” real-time filesystem change events (file create/update/delete)
  • /ws-terminal โ€” interactive terminal I/O (shell access from the browser)

Proxy architecture

based-web sits in front. Browser calls hit :3333, which strips Origin headers and injects the bearer token before forwarding to :3334. The browser never sees the API token.

Deploy model

Based separates development and production onto different machines. Edits happen on dev, deploys push to production via rsync, and builds always happen on the target machine (never locally) to avoid chunk hash drift between environments.

Data Layer

The filesystem is the database.

Canonical roots

DATA_ROOT=/data              # default
BASED_SCAN_ROOTS=/data       # discovery paths

Typed subdirectories:

  • code/ โ€” source code projects
  • host/ โ€” infrastructure configs
  • agent/ โ€” agent definitions
  • space/ โ€” workspaces and planning
  • task/ โ€” task-scoped work

Base manifests

Canonical format is base.md โ€” markdown with YAML frontmatter:

---
name: my-project
type: code
realm: production
tags: [api, express]
lifecycle: active
completion: 0.7
priority: high
assignee: tree
depends_on: [shared-lib]
custom:
  deploy_target: ".11"
---

# my-project
Project description and notes here.

Legacy .base.yaml is still supported. Use base migrate to convert.

Global config

Lives in /data/based/config/:

FilePurpose
.envSecrets, ports, paths
flags.yamlFeature flags
cli-profiles.yamlRealm โ†’ credential mapping
hosts.yamlInfrastructure inventory
intelligence.yamlAI provider chain + health
basedrcShell config
tmux.conftmux session config
telemetry.jsonlUnified append-only telemetry

Per-base artifacts

.claude/
  agents/*.md          โ€” agent definitions
  skills/*/SKILL.md    โ€” reusable skills
  commands/*.md        โ€” slash commands
  settings.json        โ€” hooks, permissions, shortcuts
  hooks/               โ€” pre/post-tool-use scripts
.mcp.json              โ€” per-base MCP server config
.memory/
  MEMORY.md            โ€” memory index
  topics/*.md          โ€” topic-scoped memory files

12 Domains

Everything is queryable.

Based organizes all data into 12 domain adapters. Each domain is searchable individually or via cross-domain fan-out (/api/agent/query). Each adapter has a 5-second timeout; partial failures are surfaced in data.errors.

DomainDescription
projectsDiscovered bases โ€” name, path, type, realm, tags, lifecycle
sessionsProvider sessions with token/tool metadata (Claude, Codex, Gemini)
artifactsCLAUDE.md, agents, rules, commands, hooks, skills, MCP configs
gitStatus, branch, recent commits per base
logsService + tmux logs, searchable
memoryMEMORY.md + topic files per base
configBase manifests (frontmatter fields)
healthNode + service state
viewsArtifact aggregation (shared scanner)
usageToken + cost analytics across providers
filesFile listing + content (parallel per-project scan, budget-limited)
hostsInfrastructure inventory from hosts.yaml

Cross-domain search

# Search across all 12 domains
GET /api/agent/query?q=deploy

# Response shape
{
  "results": [...],
  "errors": [...],
  "meta": {
    "byDomain": {
      "projects": 3,
      "files": 12,
      "git": 5,
      ...
    }
  }
}

REST API

Full endpoint reference.

based-api (port 3334)

Agent API

MethodPathDescription
GET/api/agentSelf-describing manifest โ€” every domain, field, filter
GET/api/agent/query?q=Cross-domain fan-out search
GET/api/agent/:domainList per domain
GET/api/agent/:domain/:idEntity detail
GET/api/agent/projects/:name/fullMulti-domain aggregate for one project

Core

MethodPathDescription
GET/POST/api/basesManifest CRUD + stats
GET/api/hostsInfrastructure inventory from hosts.yaml
GET/api/based/sessionsProvider session discovery
GET/api/based/sessions/statsSession summary
GET/api/based/sessions/:id/messagesSession message history
GET/api/based/sessions/:id/toolsSession tool call history
GET/api/based/statusLive base status summary
GET/api/based/logsLog search
GET/api/based/usageToken + cost stats
GET/api/based/viewsArtifact aggregation
*/api/messagesMailbox + ack (seq model)
*/api/notesMarkdown note CRUD
*/api/orchestratorPlans, tasks, verification, memory/dream
GET/api/intelligenceProviders + health + query
*/api/claude-accountsAccount management
GET/api/systemDiagnostics + telemetry

based-web (port 3333)

File operations

MethodPathDescription
GET/api/files/contentRead text file
GET/api/files/rawStream binary with Content-Type
GET/api/files/listFlat file listing
POST/api/files/writeWrite file
POST/api/files/moveMove/rename
POST/api/files/mkdirCreate directory
POST/api/files/uploadUpload file
DELETE/api/files/Delete file

Explorer + Search

MethodPathDescription
GET/api/explorer/:baseId/list?path=Lazy directory listing
GET/api/explorer/__all__/listAll registered bases
GET/api/explorer/:baseId/artifactsClaude artifact discovery
GET/api/searchContent search
GET/api/gitStatus, branch, history

Other

MethodPathDescription
*/api/terminalTerminal session control
*/api/kanbanBoard persistence
*/api/templatesTemplate CRUD
GET/api/musicLocal track control
GET/api/processestmux process summary
GET/api/cli-toolsDetected binaries + health
GET/api/systemHost metrics, telemetry, CLI detection

Authentication

Bearer token, timing-safe.

API token

# Get a token
TOKEN=$(curl -s -X POST http://localhost:3334/api/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"pin":"YOUR_PIN"}' | jq -r '.token')

# Use it
curl -s http://localhost:3334/api/agent/ \
  -H "Authorization: Bearer $TOKEN"

Web proxy

The web frontend at :3333 handles auth transparently โ€” it strips Origin headers and injects the bearer token before forwarding to the API. The browser never sees the raw token.

Security model

  • Bearer token with timing-safe comparison (no timing attacks)
  • API server binds to loopback only (:3334) โ€” not reachable from network
  • Path validation: base-path containment checks reject directory traversal
  • File APIs surface all entries (including dotfiles) โ€” no hidden policy, full transparency

MCP Server

20+ tools for native agent access.

Based exposes a Model Context Protocol server that any MCP-compatible agent can connect to. Same data as the REST API, native tool interface.

Search & Query

ToolDescription
based_queryCross-domain search, returns results grouped by domain
based_files_searchFile name + content search
based_memory_searchMemory topic search
based_logs_searchtmux + service log search

Projects & Sessions

ToolDescription
based_projects_listAll registered bases
based_project_fullMulti-domain aggregate for one project
based_sessions_listClaude/Codex/Gemini sessions
based_artifacts_listAgents, skills, commands, hooks, MCP configs
based_git_statusGit state per base

Infrastructure

ToolDescription
based_health_checkNode + service health
based_hosts_listInfrastructure inventory

Config & Views

ToolDescription
based_config_getProject manifest
based_views_listView/artifact aggregation
based_usage_statsToken + cost stats

tmux

ToolDescription
based_tmux_listActive sessions
based_tmux_sendSend keystrokes to a session
based_tmux_broadcastSend to all sessions

Mailbox

ToolDescription
based_msg_sendEnqueue message
based_msg_inboxRead messages for participant
based_msg_ackAcknowledge up to sequence number
based_msg_broadcastSend to all participants

Intelligence

ToolDescription
intelligence_queryPrompt with provider fallback
intelligence_providersList providers + status
intelligence_healthHealth check all providers

System

ToolDescription
based_system_guideFull platform reference document

Web Frontend

19 modes. Three shells. One state.

What's in it

  • File explorer โ€” lazy-loaded tree with Monaco code editor
  • Terminal โ€” full interactive shell (tmux sessions from the browser)
  • Session browser โ€” see every AI session, token usage, tool calls
  • Kanban โ€” persistent boards for task tracking
  • Notes โ€” markdown scratch space
  • Memory browser โ€” view/search agent memory topics
  • Real-time sync โ€” filesystem changes appear instantly via WebSocket

Adaptive shells

The web UI uses three physical shell components instead of one responsive layout:

  • CompactShell (<640px) โ€” single pane, bottom tab bar, sheets for secondary content
  • TabletShell (640โ€“1024px) โ€” icon rail, slide-over panels
  • DesktopShell (1024px+) โ€” full 5-column IDE layout, ultrawide-aware

All three consume the same Zustand store. Shared state, distinct rendering. Desktop-only features render a placeholder on compact โ€” not a broken miniature.

Terminal

tmux is the workspace. Based gives you a window into it.

Every Based session is a tmux session. When you run base start, it creates a tmux session, launches your AI provider inside it, and wires up the context. When you run base beam, it sends keystrokes to that tmux session. When you run base kill, it stops it. tmux is the backbone โ€” Based orchestrates on top of it.

The web UI gives you access to these sessions from the browser. You can launch sessions, watch their output, type into them, split into panes, and broadcast commands โ€” all without leaving the Based interface.

Launching sessions

The fastest way to start working is the Quick Command panel in the right sidebar. Pick a base and a provider, click, and you're in a session:

# From the CLI:
base start myproject                    # auto-select provider
base start myproject --provider claude  # specific provider
base start myproject --provider codex   # or codex, gemini, ollama

Sessions persist independently of the browser โ€” close the tab, come back later, the tmux session is still running. Reattach from the web UI or from your local terminal with tmux attach.

Panes and layouts

Split the terminal view into multiple panes to watch several sessions at once:

  • Groups โ€” up to 2 panes per group, unlimited groups
  • Grid mode โ€” maximize to see all panes at once (2-up, L-layout, or auto-grid)
  • Per-pane focus โ€” click a pane to focus it, the rest stay visible

Broadcast mode

Toggle broadcast to type the same input into every pane simultaneously โ€” useful for running the same command across multiple projects or providers at once.

Beam (remote keystrokes)

Send commands to any tmux session without switching to it:

base beam myproject "npm test"    # type into a specific session
base beam --all "git pull"        # broadcast to every session

This is how agents communicate in real-time โ€” beam is one of the three messaging pathways alongside Box and Msg.

Context sidebar

When the terminal is active, the right sidebar shows Quick Commands โ€” one-click launch buttons organized by base ร— provider. No typing base start every time.

Agent System

8 specialists. Skills, commands, hooks.

Based ships with 8 specialized agent definitions in .claude/agents/. Each agent gets a focused role, relevant context, and appropriate tool access.

Specialized agents

AgentRole
auditorCodebase audits, gap analysis, compliance
testerPlaywright + integration tests
bug-fixerRoot-cause analysis + targeted fixes
reviewerCode review against project standards
frontend-devReact / TypeScript / Tailwind
backend-devExpress / Node / API work
cli-devBash / CLI scripting
docs-writerReference documentation

Supporting artifacts

  • .claude/skills/*/SKILL.md โ€” reusable skill invocations
  • .claude/commands/*.md โ€” slash commands for interactive use
  • .claude/settings.json โ€” hooks, permissions, shortcuts
  • .claude/hooks/ โ€” pre/post-tool-use scripts (approval gates, logging)

Intelligence Layer

Multi-provider. First healthy wins.

Based doesn't pick a provider for you โ€” it runs a prioritized chain defined in intelligence.yaml. When you query, the first healthy provider handles it. If it fails, the next one catches it.

Provider chain

PriorityProviderNotes
1CodexPrimary for code work
2GeminiSecondary
3ClaudeVia CLI wrapper
4OllamaLocal inference

Health checking

Providers are health-checked asynchronously with TTL-cached results. Disabled or unhealthy providers are skipped automatically. Monitor via:

# API
GET /api/intelligence

# MCP
intelligence_providers()
intelligence_health()

Direct selection

base start myproject --provider claude
base start myproject --provider codex

Orchestrator Mode

Coordinator + workers + verification. Feature-flagged.

The orchestrator enables multi-agent coordination with role-based tool scoping. It's behind feature flags โ€” enable when ready.

How it works

  1. Coordinator creates a plan with discrete tasks
  2. Workers execute tasks with scoped tool access
  3. Verification step validates each completed task
  4. Communication happens via the mailbox system

Role-scoped tools

When role_scoped_tools flag is enabled:

RoleTools
observerRead-only query tools
workerTask execution tools
coordinatorPlanning + orchestration tools only (never touches files)

Feature flags

  • coordinator_mode โ€” enable the coordinator role
  • role_scoped_tools โ€” restrict tools by agent role
  • verify_execution โ€” require verification after task completion

CLI

base swarm          # orchestrator plan + task controls
base swarm plan     # create a new plan
base swarm tasks    # list tasks
base swarm verify   # run verification

Memory System

Persistent context across sessions.

Each base gets a .memory/ directory that persists across sessions. Agents read from it automatically; Based indexes it for search.

Structure

.memory/
  MEMORY.md          โ€” index file, always loaded into context
  topics/
    deploy.md        โ€” deployment notes and procedures
    gotchas.md       โ€” hard-won debugging lessons
    preferences.md   โ€” coding style and conventions
    architecture.md  โ€” design decisions and rationale

Pipeline

  • base memory โ€” manual extraction + consolidation
  • Auto-dream (feature-flagged: auto_dream, auto_memory_extract) โ€” background pipeline that synthesizes sessions into memory topics automatically

Search

# MCP
based_memory_search({ query: "deploy procedure" })

# API (via agent query)
GET /api/agent/memory?q=deploy

Messaging

Box. Msg. Beam. Three pathways.

Based has three messaging systems, each for a different use case. No HTTP between agents โ€” everything is filesystem or tmux.

Box (file drop)

Drop anything into a base's inbox/ directory. Markdown, images, links, data files. The simplest possible messaging โ€” it's a folder.

base box myproject          # open inbox
base box myproject note.md  # drop a file

Msg (structured mailbox)

JSONL append-only files per participant under /data/based/state/mailbox/. Sequence + acknowledge model โ€” receivers mark messages as processed.

base msg send alice "review the deploy script"
base msg inbox              # read your messages
base msg ack 5              # acknowledge through seq 5
base msg broadcast "standup at 2pm"

Also available via API (/api/messages) and MCP (based_msg_*).

Beam (real-time tmux)

Send keystrokes directly to a tmux session. Real-time, zero latency, no intermediary.

base beam myproject "npm test"   # type into session
base beam --all "git pull"       # broadcast to all

Pairs

Two agents. One project. Emergent routing.

Pairs is not a feature โ€” it's a behavior that emerges from Based's existing primitives. When two AI providers work the same project, they communicate through the shared filesystem and mailbox system. Over time, they start routing tasks to each other based on strengths.

How it works

  1. Start two sessions on the same base with different providers
  2. They share: filesystem, .memory/, mailbox, git state
  3. Msg and Box handle coordination โ€” no orchestrator needed
  4. Each provider develops a model of the other's strengths
base start myproject --provider claude   # session 1
base start myproject --provider codex    # session 2

# They communicate via:
base msg send codex "review the auth module"
base box myproject findings.md

Why it works

Different models have genuinely different strengths. Opus excels at architecture and nuanced decisions. Codex is faster at file-level edits and test writing. When they can communicate, they self-organize around these strengths without being told to.

Deploy Pipeline

deploy.sh โ€” sync, build, restart.

Based includes a deploy script (deploy.sh) for syncing between development and production machines. It handles the full lifecycle: commit dirty changes, rsync to the target, build on the remote, restart services, and verify health.

Commands

./deploy.sh all        # full deploy: shared โ†’ config โ†’ cli โ†’ api โ†’ web
./deploy.sh shared     # sync + build @based/shared library
./deploy.sh config     # sync config files only
./deploy.sh cli        # sync CLI scripts, chmod +x
./deploy.sh api        # sync + remote build + restart based-api
./deploy.sh web        # sync + remote build + restart based-web
./deploy.sh health     # verify API + web are responding
./deploy.sh pull       # pull remote changes back to dev

Workflow

  1. Edit on your dev machine
  2. deploy.sh auto-commits any dirty changes before syncing
  3. Sync to production via rsync
  4. Build on the production machine (never locally โ€” avoids chunk hash drift)
  5. Restart services via systemd and verify via health endpoint

Feature Flags

Ship incrementally. flags.yaml.

FlagDescriptionDefault
coordinator_modeEnable orchestrator coordinator roleoff
role_scoped_toolsRestrict MCP tools by agent roleoff
mailbox_ipcFile-backed mailbox messagingon
worktree_isolationGit worktree per sessionoff
auto_memory_extractAuto-extract memory from sessionsoff
auto_dreamBackground reflection/consolidationoff
context_compaction_v2v2 compaction algorithmoff
verify_executionRequire verification after tasksoff
# View flags
base flags

# Set a flag
base flags set coordinator_mode true

Configuration

Convention-driven. Minimal config.

Environment

# /data/based/config/.env
DATA_ROOT=/data
BASED_SCAN_ROOTS=/data
API_TOKEN=your_token_here
PORT_API=3334
PORT_WEB=3333

basedrc

Shell configuration sourced by the CLI:

# /data/based/config/basedrc
export BASED_SCAN_ROOTS="/data"
export BASED_CONFIG_DIR="/data/based/config"

hosts.yaml

Infrastructure inventory:

hosts:
  - name: gpu-server
    ip: 10.0.0.10
    role: proxmox
    specs: "64 cores, 192GB RAM"
  - name: inference
    ip: 10.0.0.20
    role: inference
    specs: "128GB DDR5, local models"

intelligence.yaml

Provider chain:

providers:
  - name: codex
    priority: 1
    enabled: true
  - name: gemini
    priority: 2
    enabled: true
  - name: ollama
    priority: 4
    endpoint: "http://localhost:11434"
    enabled: true

Telemetry

Append-only. Local-only. Your data.

Based logs usage events to a single JSONL file. No external services, no analytics platforms. The data stays on your machine.

Sources

Events are collected from three surfaces, all appending to the same file:

  • CLI โ€” every base command, session start/stop
  • API โ€” deploy events, per-route instrumentation
  • Web UI โ€” navigation, file saves, searches, messaging

Event types

SourceEvents
CLIcli_command, session_started, session_ended
APIdeploy_started, deploy_completed, per-route instrumentation
Webtab_viewed, file_saved, search_performed, box_sent, msg_sent, beam_sent

Read

GET /api/system/telemetry?period=24h   # last 24 hours
GET /api/system/telemetry?period=7d    # last week
GET /api/system/telemetry?period=all   # everything

base telemetry                          # CLI view

The recent-activity homepage widget is the live visualization of this data.

Flow Triggers

Your workspace knows deep work isn't just code โ€” it's state of mind.

What it is

Based includes a built-in audio player designed for one thing: getting into flow state. This isn't a music app. There's no library browser, no recommendations, no social features. You queue a few tracks you already know work for you, hit play, and forget about it for hours.

Why it's in a dev tool

Research supports what deep workers already know intuitively: intentional music selection โ€” choosing specific tracks to regulate your cognitive state โ€” has a direct positive effect on performance (PMC, 2023). Not background noise. Not Spotify's algorithmic playlist. The three songs you've listened to 400 times that flip the switch in your brain.

The key finding: autonomous control over music (choosing what, when, and why) is what drives the benefit. That's why it's built in. You stay in your workspace. No alt-tab, no context switch, no notification from a streaming app breaking your concentration.

CLI

# Queue tracks
base play add ~/flow/boards-of-canada-roygbiv.mp3
base play add ~/flow/tycho-awake.mp3

# Control playback
base play              # start / pause
base play skip         # next track
base play loop         # toggle loop mode (track / queue / off)
base play status       # what's playing, queue depth, loop mode
base play clear        # empty the queue

Design principles

  • Minimal surface. Queue, play, pause, skip, loop. That's it. If you want equalizers and crossfade, use a music app.
  • Local files only. No streaming integration, no API keys, no accounts. Your MP3s, your FLAC files, your WAVs. Drag from Finder, paste a path, done.
  • Loop-first. Default behavior is queue loop. Most flow state usage is the same 2โ€“5 tracks on repeat for an entire session. The player assumes that.
  • No interruptions. No "up next" popups, no end-of-track silence, no notifications. Gapless playback. The audio is infrastructure, not an experience.
  • Session-scoped. Your queue lives with your Based session. Different projects can have different flow tracks. Start a session, your flow tracks are already there.

Web UI

The web frontend includes a minimal player bar at the bottom of the workspace โ€” track name, progress, play/pause, skip, loop toggle. It stays out of the way. Click to expand for queue management. Collapse and it's a single 32px bar.

The philosophy

Based treats the human operator as a first-class citizen. Agents get memory, messaging, orchestration. Humans get those too โ€” plus the tools that sustain long sessions. Flow triggers exist because the workspace should support the whole workflow, not just the code part.

Three songs on repeat for six hours. You know the ones.

Known Gotchas

Hard-won lessons.

If you're using Based

  • $TMUX in the web terminal โ€” if base start from the web UI tries to switch your existing tmux instead of creating a new session, make sure $TMUX is unset in the terminal's shell environment. Based handles this automatically, but custom shell configs can re-set it.
  • YAML numbers โ€” YAML parses 3334 as a number, not a string. If you're comparing ports or IDs in manifests, be aware that "3334" !== 3334.
  • Build on the production machine โ€” always run builds on the deploy target, not locally. Vite chunk hashes differ between machines, which breaks browser caching.
  • ESM imports need .js extensions โ€” if you're writing plugins or extending Based, all TypeScript imports must include .js in the import path. TS compiles but doesn't rewrite them.

If you're contributing to Based

See docs/HARD-WON-FIXES.md in the repo for the full developer gotchas list (pino version pinning, symlink handling in readdir, localStorage migration patterns, etc.).

Philosophy

Why Based exists.

Local-first

Your tools. Your terminal. Your filesystem. No cloud dependency, no account required, no data leaves your machine. Based runs on your hardware and uses your existing AI subscriptions through their official CLIs. When a provider changes their terms, you switch โ€” Based doesn't care which model you use.

Terminal-native

The terminal is the workspace, not a feature of the workspace. tmux sessions are real, processes are real, file edits are real. The web UI is a window into the terminal world, not a replacement for it.

Convention over configuration

Drop a base.md in a directory. That's it. No registration, no database migration, no config files beyond the manifest. Based discovers, indexes, and serves.

Agent-first, human-usable

Every API is designed for agents to discover and use at runtime. But every interface also works for humans โ€” the CLI is fast, the web UI is full-featured, the docs are readable. The best tools serve both.

Co-work, not automation

Based doesn't automate humans out of the loop. It puts humans and agents in the same workspace with shared context, shared tools, and transparent communication. The human decides what matters; the agents help execute.