ppipodocs
Pipo/Technical Documentation
PERSISTENT WORKFLOW ENGINE & AGENT DAEMON

Pipo is an autonomous, always-on AI workflow engine and desktop daemon.

Unlike tab-bound chatbots or prompt wrappers, Pipo runs as a persistent background daemon paired with native Go companion sidecars. It retains durable context in an SQLite WAL vault, coordinates multi-step DAG workflows, schedules autonomous daily rhythms, and drives local desktop automation — governed by strict, runtime authority fences.

START HERE

Before you deploy Pipo

Pipo decouples intelligence from execution. The central Brain coordinates memory, LLM routing, and workflows. Local Hands (companion sidecars) execute terminal commands, inspect screens via OCR, and interact with desktop software over an encrypted, token-authenticated WebSocket channel.

01 / DEPLOYMENT TARGETS

Installation & Setup

Pipo runs as a native Bun daemon or a Docker container. The core server listens on port 1846 (HTTP REST API, WebSocket transport, and embedded Web Dashboard). Setup includes 1-click zero-token onboarding for local setups, eliminating manual enrollment key friction.

macOS & Linux / 1-Click Shell Script (Recommended)
curl -fsSL https://raw.githubusercontent.com/motius/pipo/main/install.sh | bash

What install.sh does: Checks and installs the Bun runtime if missing; clones the repository to ~/.pipo/daemon; compiles UI assets via bun run build:ui; symlinks the pipo binary into your PATH; provisions ~/.pipo/config.yaml with auth.insecure_open_access: true; and launches the daemon in the background.

Windows 10/11 / 1-Click PowerShell Script (WSL2 + Native Sidecar)
irm https://raw.githubusercontent.com/motius/pipo/main/install.ps1 | iex

What install.ps1 does: Validates WSL2 and active distributions; downloads install.sh byte-safely without PowerShell CRLF corruption; compiles the brain in WSL2; pre-populates ~/.pipo/config.yaml; queries/mints the desktop JWT enrollment token and writes it directly to ~/.pipo/sidecar.yaml; and automatically opens http://localhost:1846 in your browser. Zero token copy-pasting is required.

Docker Container (Isolated Daemon Deployment)
docker run -d --name pipo -p 1846:1846 -v pipo-data:/data ghcr.io/motius/pipo:latest

Data Persistence: The /data volume retains SQLite databases (vault.db), encryption keys (.secrets.enc), and logs. Note: Docker containers cannot manipulate the host desktop directly; install a native sidecar on the host machine to grant computer interaction.

Source Checkout & Manual Build
git clone https://github.com/motius/pipo.git cd pipo bun install bun run build:ui bun run src/daemon/index.ts
Zero-Token Local Setup The daemon automatically initializes a local desktop enrollment on first boot, pre-populating ~/.pipo/sidecar.yaml with full capabilities and a valid ES256 JWT.
Remote Sidecar Enrollment For remote companions (e.g. headless servers, secondary laptops), mint a dedicated token using pipo enroll "remote-name" and supply it to the remote companion binary.
Desktop Companion Binaries Windows uses pipo-Setup.exe; macOS uses Install-pipo.dmg.
Port Allocation Port 1846 is hardcoded as Pipo's primary gateway. Ensure port 1846 is free before launching.
02 / FIRST VERIFICATION

Quick start

  1. Confirm daemon health. Verify the daemon is alive and listening: curl http://localhost:1846/api/health. The JSON response reports uptime, memory (Heap/RSS), and status for all 7 internal services.
  2. Access the control plane. Navigate to http://localhost:1846. On fresh installations with insecure_open_access: true, the dashboard loads instantly without blocking on JWT authentication headers.
  3. Connect your model provider. Open Settings → Models in the dashboard. Enter your API key for Anthropic Claude, OpenAI, Google Gemini, OpenRouter, or DeepSeek. For 100% local, private inference, select Ollama at http://127.0.0.1:11434. Keys are encrypted at rest using AES-256-GCM.
  4. Verify desktop companion connection. Launch the desktop sidecar application. The dashboard header and the stationary circular Pebble HUD (anchored at the bottom-right corner) will glow Electric Indigo, confirming WebSocket connection.
03 / SYSTEM SPECS

System requirements

Runtime Engine
Bun v1.0.0 or higher is required for native execution. Bun provides high-performance V8 execution, built-in SQLite bindings, and zero-overhead native WebSocket servers.
Operating Systems
macOS: macOS 12 (Monterey) or later (Apple Silicon & Intel).
Linux: Ubuntu 20.04+, Debian 11+, Fedora 36+, Arch Linux (x86_64 & ARM64).
Windows: Windows 10/11 64-bit with WSL2 (Ubuntu 22.04 LTS recommended) for the daemon; native Win32 companion for desktop control.
Hardware Footprint
Memory: 150MB RSS baseline for daemon + SQLite vault. 2GB RAM minimum system memory. (Local model execution via Ollama requires 8GB–16GB RAM for 7B/8B models).
Disk: ~350MB for daemon dependencies and compiled UI bundle; durable disk storage for SQLite database and vector embeddings.
Network & Ports
Port 1846 must be available locally. Sidecars communicate via WebSocket (ws://localhost:1846/sidecar/connect). Outbound HTTPS access is required for external LLM APIs (port 443).
04 / LIFECYCLE

First run & onboarding mechanics

When Pipo initializes for the first time, it performs deterministic initialization steps before accepting traffic:

1. SQLite Schema Migration Initializes vault.db with WAL mode enabled. Creates tables for sidecars, secrets, memory vectors, cron schedules, workflow definitions, and audit logs.
2. Keypair Generation Generates an asymmetric ES256 (ECDSA P-256) keypair in ~/.pipo/sidecar-keys. The private key signs sidecar JWT enrollment tokens; the public key is exposed at /api/sidecars/.well-known/jwks.json.
3. Local Auto-Enrollment ensureLocalEnrollment() queries the database for an existing desktop registration. If absent, it inserts the record, assigns standard capabilities, and populates ~/.pipo/sidecar.yaml.
4. Service Bus Startup Initializes the 7 concurrent core services, registers built-in tools (manage_goals, run_command, read_file), and starts the 30-second health monitoring ticker.
05 / FILE VS DATABASE SPLIT

Configuration architecture

Pipo maintains a hard separation between low-level system infrastructure (managed via YAML on disk) and authoritative runtime state (managed exclusively in the SQLite database).

System Configuration (~/.pipo/config.yaml)
Controls only foundational system settings required to boot the daemon:
daemon:
  port: 1846
  data_dir: "~/.pipo"
  log_file_path: "~/.pipo/logs/pipo.log"
  log_file_max_bytes: 10485760 # 10MB rotation
auth:
  insecure_open_access: true    # False requires JWT Bearer auth
telemetry:
  enabled: false                # Opt-in anonymous crash metrics
Authoritative Database Vault (~/.pipo/vault.db)
Stores all user and operational state:
  • LLM Providers: Endpoints, active models, fallback routes.
  • Encrypted API Keys: Stored in .secrets.enc using AES-256-GCM authenticated encryption.
  • Voice & Personality: Engine selection (openwakeword, WebSpeech) and behavioral prompt guidelines.
  • Workflows & Schedules: DAG step graphs, execution logs, and autonomous rhythm triggers.
  • Device Registry: Enrolled sidecar device IDs, public keys, and granted capabilities.
No Sugarcoating: The Discard Rule

Any user-owned blocks (such as llm:, voice:, personality:, or billing:) manually added to ~/.pipo/config.yaml are explicitly discarded on reload. The SQLite database is the sole authoritative source of truth. All model and provider adjustments must be made through the dashboard UI or REST API.

06 / TOPOLOGY

Platform support & boundaries

macOS (Intel & Apple Silicon) Daemon runs natively under Bun. Native Go companion sidecar leverages macOS Accessibility APIs, CoreGraphics for display capture, and AppKit for window management.
Linux (x86_64 & AArch64) Daemon runs natively under Bun or Docker. Companion sidecar interacts with X11 / Wayland (via desktop portals), DBus notifications, and standard POSIX shells.
Windows 10 / 11 Daemon runs inside WSL2 (Ubuntu) or Docker for full POSIX and Bun stability. Companion sidecar runs as a native Win32 executable (pipo-Setup.exe), providing desktop tray and overlay controls.
Headless Servers & Cloud VMs Daemon operates independently in headless environments. Remote sidecars connect back to the central daemon over TLS-encrypted WebSocket connections.
07 / SYSTEM ANATOMY

High-level architecture

Pipo decouples the reasoning engine from the execution surface via an asynchronous JSON-RPC protocol over WebSocket.

01Bun Daemon (:1846) Engine · SQLite WAL · LLM Router · Crons
↑↓ WebSocket (ES256 JWT)
02Desktop Companion Sidecar (Go) Terminal · Filesystem · OCR · Window Control
↑↓ Direct UI Interop
03Stationary Pebble HUD Bottom-Right Dock · Real-time Voice & Thought Feed
08 / RUNTIME INTERNALS

Daemon & runtime services

The Bun daemon manages 7 concurrent microservices via a central ServiceRegistry:

SidecarManager
Maintains the WebSocket connection pool at /sidecar/connect. Validates ES256 JWT tokens, routes tool execution calls to the appropriate companion machine, and executes periodic revocation sweeps to sever stale sessions immediately.
AgentLoop
Executes the core ReAct reasoning loop. Ingests user input, evaluates active context from the SQLite vector memory vault, selects tools, enforces authority checks, and streams output.
GoalService & CronScheduler
Maintains autonomous circadian rhythms without requiring manual user prompts:
  • goals:morning (0 7 * * *): Reviews uncompleted goals and schedules daily priorities.
  • goals:evening (0 20 * * *): Reviews task progress, logs learnings to memory, and summarizes accomplishments.
  • cron.hourly: Background database compaction and health auditing.
HealthMonitor
Executes every 30 seconds. Monitors heap memory allocation, process RSS footprint, SQLite WAL size, and connection ping/pong latency.
Telemetry & Observers
Observes local workspace filesystem alterations and collects anonymous diagnostic logs when explicitly enabled by the user.
09 / WEB CONTROL PLANE

Control plane dashboard

Served directly by the daemon at http://localhost:1846. Built as an optimized, zero-node-runtime Single Page Application (SPA) bundled into ui/dist.

Chat & Agent Workflows DAG Memory Vault Tool Registry Sidecars Authority Fences Activity Logs Circadian Goals Settings
10 / AMBIENT INTERFACE

Ambient circular Pebble HUD

Pipo includes an ambient desktop interface called the Pebble. It provides an immediate visual status indicator and voice interaction point.

Stationary Geometry The Pebble lens is strictly circular (border-radius: 50% !important; aspect-ratio: 1 / 1;) and anchored permanently to the bottom-right corner (bottom: 32px; right: 32px).
Zero Cursor Tracking Design Fact: The Pebble does not follow the mouse cursor. Cursor-tracking lenses cause visual distraction, cursor occlusion, and accidental clicks. Pipo's Pebble remains stationary.
Click Interaction Clicking the stationary circular pebble immediately opens voice input or displays the quick-prompt thread without taking focus away from your active work.
Narration Feed The speech and tool narration thread floats directly above the dock at bottom: 86px; right: 32px, displaying real-time agent thoughts and approval cards.

State Color Architecture

INDIGO Focus & Listening (#6366F1) Agent is awake, awaiting input, or actively synthesizing context.
CYAN Streaming Speech & Action (#06B6D4 / #38BDF8) Agent is actively executing a tool or streaming neural voice audio.
AMBER Hold / Approval Required (#F59E0B) A workflow step requires human approval before proceeding.
EMERALD Success / Connected (#10B981) Sidecar connection healthy; task completed successfully.
11 / NATIVE COMPANION

Desktop companion sidecar

The sidecar is a native Go application compiled for each target OS. It runs as a low-overhead background process, connecting to the daemon over WebSocket.

Sidecar Configuration (~/.pipo/sidecar.yaml)
config_version: 2 token: "eyJhbGciOiJFUzI1NiIsIntpZCI6..." # Minted JWT token brain: "" # Empty defaults to ws://localhost:1846/sidecar/connect capabilities: - terminal - filesystem - clipboard - screenshot - system_info - awareness - desktop - browser - ocr - windows - pebble - sub_pebble - file_watch - processes - notifications
12 / NATIVE CAPABILITY MATRIX

Capability matrix & sandboxing

Sidecar capabilities are gated at the RPC layer. When an action is requested, both the sidecar configuration and daemon authority rules evaluate the call:

terminal Spawns scoped shell commands. Enforces command blocklists and execution timeouts. Refuses dangerous destructive syntax.
filesystem Scoped file read/write/list operations. Strict path blacklist permanently protects sensitive directories: ~/.ssh, ~/.aws, ~/.gnupg, ~/.kube, ~/.pipo/sidecar-keys, and system startup folders.
awareness & ocr Captures active screen frames and extracts on-screen text into working memory, allowing Pipo to understand visual workspace context.
windows Enumerates active window titles and process IDs. Can bring windows into focus for workflow orchestration.
browser Controls Google Chrome via Chrome DevTools Protocol (CDP) for page navigation, element inspection, and form interactions.
clipboard & screenshot Reads/writes system clipboard and captures targeted UI screenshots for multimodal reasoning.
processes & notifications Lists running system tasks and pushes native desktop alerts when workflows require attention.
revocation-sweep Daemon sweeps active sessions against the database. If a sidecar is revoked in the UI or CLI, its live WebSocket connection is severed immediately.
13 / DAG ENGINE

Workflows & DAG engine

Pipo's EngineFlowExecutor coordinates Directed Acyclic Graph (DAG) workflows. Workflows blend deterministic programmatic logic with bounded AI judgement.

TRIGGEREvent / Schedule / Webhook
CONTEXTVector Memory Retrieval
STEP 01Sidecar Tool Call (e.g. Read File)
STEP 02LLM Judgement & Schema Extraction
APPROVALHuman Gate (Hold for Approval)
STEP 03External Side Effect (e.g. Dispatch Mail)

Step Types & Semantics

llm Step Executes prompt inference against the configured provider with strict JSON schema outputs and token bounds.
tool Step Dispatches an RPC call to a registered sidecar or built-in daemon tool with typed input/output validation.
script Step Runs sandboxed code. Requires explicit per-workflow opt-in and does not inherit daemon environment variables.
approval Step Pauses workflow execution, records the proposed action in the database, and alerts the operator via Pebble HUD and dashboard.
14 / CONCEPTUAL ARCHITECTURE

System mental model

Brain (The Daemon)
Always-on Bun process on port 1846. Owns durable state, vector memory, LLM orchestration, and cron triggers.
Hands (The Companion Sidecar)
Local Go process running on user hardware. Possesses the physical operating system capabilities (screen, shell, files, keyboard).
Recipe (The Workflow DAG)
The deterministic execution graph connecting triggers, tools, AI reasoning, and approval checkpoints.
Boundary (The Authority Engine)
The security firewall intercepting every tool call and enforcing Allow, Ask, or Block decisions.
15 / SECURITY POLICY

Authority & safety fences

Authority in Pipo is enforced at runtime, never bypassable by model hallucinations.

REVIEW MODE Default Production Policy Read operations are allowed automatically. Any external side effect (writing files, shell execution, sending emails) requires explicit human approval.
AUTONOMOUS MODE Bounded Execution Allowed tools execute without pausing. Destructive commands (rm, formatting, system modifications) and credential access remain strictly blocked.
LOCKED MODE Emergency Lockdown Immediate killswitch. Cancels active workflows, closes sidecar RPC dispatch, and locks the database into read-only mode.
16 / TOPOLOGY INTEGRATION

Cross-platform setup

Deploying Pipo across multiple machines allows one central daemon to coordinate several physical devices:

Central Brain Host the daemon on a local workstation, home server, or cloud VM on port 1846.
Local Sidecars Install sidecars on your work laptop, home desktop, and test servers. Each registers under a distinct name.
Targeted Routing Workflows can target specific machines: e.g. run browser scraping on desktop-A while executing builds on build-server.
Network Security Never expose port 1846 directly to the public internet. Use a WireGuard / Tailscale VPN or an authenticated HTTPS reverse proxy (Caddy / Nginx).
17 / COMMAND LINE INTERFACE

CLI command reference

pipo start Starts the Pipo daemon in the background (or foreground with --foreground).
pipo stop Gracefully shuts down running daemon processes and closes active WebSocket sessions.
pipo status Prints process PID, port 1846 binding, memory footprint (Heap/RSS), database size, and connected sidecars.
pipo doctor Executes diagnostic suite checking Bun runtime, SQLite integrity, port availability, and network routes.
pipo enroll "device-name" Mints an ES256 JWT enrollment token for pairing a remote companion sidecar.
pipo sidecars list Displays all registered companion sidecars, connection timestamps, and granted capabilities.
pipo sidecars revoke <id> Revokes sidecar credentials and immediately disconnects active WebSocket connections.
pipo logs -f Follows live colored daemon logs with real-time tool execution output.
18 / PRIVACY & OFFLINE CAPABILITIES

Local models & voice engine

Pipo natively supports completely offline, private operation without sending data to third-party cloud APIs:

Ollama Local LLM Routing
Route conversational reasoning directly to a local Ollama instance at http://127.0.0.1:11434. Recommended models: llama3.1:8b, qwen2.5-coder:7b, or mistral-nemo.
Private On-Device Wake Word (openwakeword)
Pipo runs an ONNX-runtime based wake-word model directly on your CPU. Zero microphone audio is streamed anywhere until the wake phrase is validated locally.
Neural Voice & STT
Supports local Whisper STT models and edge neural TTS for responsive, natural spoken interaction through the Pebble HUD.
19 / RELIABILITY & BACKUPS

Production operations

Autostart as a Service Configure systemd on Linux (systemctl --user enable pipo) or launchd on macOS to ensure the daemon automatically restarts after reboots.
Database Backups The entire daemon state resides in ~/.pipo/vault.db. Perform atomic backups using SQLite backup API: sqlite3 ~/.pipo/vault.db ".backup ~/.pipo/vault-backup.db".
Secret Key Protection Protect ~/.pipo/.secrets.key and ~/.pipo/sidecar-keys. If lost, encrypted credentials cannot be recovered and sidecars must be re-enrolled.
Log Rotation Configured via daemon.log_file_max_bytes (default 10MB). Automatically rotates log archives to avoid disk exhaustion.
20 / MONITORING & TELEMETRY

Logs, health & telemetry

Pipo exposes structured health endpoints for integration with monitoring systems:

Health Check Endpoint (GET /api/health)
{ "uptime": 1420, "services": { "telemetry": "running", "agent": "running", "observers": "running", "channels": "running", "sidecar-manager": "running", "websocket": "running", "site-builder": "stopped" }, "memory": { "heapUsed": 15728640, "heapTotal": 16777216, "rss": 119537664 }, "database": { "connected": true, "size": 2719744 } }
21 / MULTI-DEVICE TOPOLOGY

Scaling & multi-sidecar operations

Scale execution capacity horizontally across multiple client machines while keeping the brain and authority rules centralized:

  • Run single authoritative daemon instance per workspace. Do not mount multiple daemons against the same SQLite database file.
  • Connect separate sidecars for distinct operational tasks: Developer Laptop, Remote Scraper, CI Builder.
  • Assign least-privilege capability masks to each enrolled device in sidecar.yaml.
22 / DIAGNOSTICS & REPAIR

Troubleshooting guide

Port 1846 is already in use +

Another process or prior Pipo daemon is holding port 1846. Check active listeners with netstat -ano | findstr 1846 (Windows) or lsof -i :1846 (macOS/Linux). Terminate the conflicting process with pipo stop or kill the PID before starting.

Sidecar shows disconnected in dashboard +

Verify that the daemon is running and reachable. Inspect ~/.pipo/sidecar.yaml and ensure the token: field contains a valid JWT. For remote setups, verify that firewall rules allow outbound WebSocket connections on port 1846.

WSL2 localhost connectivity issues (Windows) +

Windows 11 mirrors WSL2 localhost ports by default. If http://localhost:1846 fails on older Windows 10 setups, check your WSL2 IP with wsl hostname -I or enable mirrored networking in %USERPROFILE%\.wslconfig: [wsl2] networkingMode=mirrored.

EBUSY or database locked errors on Windows +

Occurs if multiple processes attempt to access vault.db without WAL mode. Ensure all file operations route through Bun's SQLite driver and close external SQLite browser utilities before running migrations.

23 / AUTOMATION PATTERNS

Production workflow patterns

01 / MEETINGSAutonomous Action Tracker Monitors calendar triggers, inspects meeting transcripts via local filesystem, extracts deliverables, and holds draft follow-ups for one-click approval. ↗
02 / OPERATIONSInbox & Ticket Triage Pulls support emails via IMAP/APIs, classifies sentiment and urgency, cross-references internal documentation, and queues prepared replies. ↗
03 / ENGINEERINGCI Failure Investigator Listens to build webhooks, fetches failure logs via sidecar terminal, extracts stack traces, and prepares pinpoint diff suggestions. ↗
24 / DATA RESIDENCY

Privacy & data isolation

Pipo is built around explicit data residency. Your files, conversation history, workflow runs, and encryption keys never leave your controlled hardware unless you configure a hosted third-party LLM provider.

Local Vector Memory Embeddings and memory notes are stored in local SQLite tables. No external vector database accounts required.
Gated Desktop Capture Screen awareness and OCR run strictly locally. Capture buffers are kept in ephemeral memory and discarded after processing.
Encrypted Secrets API keys and tokens are encrypted with AES-256-GCM authenticated cipher before writing to disk.
Audit Ledger Every tool invocation, terminal execution, and sidecar RPC is recorded in the local audit log table for inspection.
25 / OPERATIONAL BOUNDARIES

Disclaimer & operational boundaries

Pipo possesses direct operating system and application control capabilities. Always maintain least-privilege configurations and verify workflow steps before elevating autonomy.

You Retain Ultimate Authority

Do not grant unconditional terminal or filesystem permissions on critical production systems without human-in-the-loop approval gates. Always maintain external offline backups of sensitive files.

GET STARTED TODAY

Turn repetitive workflows into reliable systems.

Explore Pipo plans ↗