percy

module
v0.392.931446400 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: Apache-2.0

README

Percy: a coding agent

Percy is a fork of Shelley — an awesome foundation built by Bold Software — with a bunch of new features on top.

Percy is a mobile-friendly, multi-conversation, multi-modal, multi-model, single-user coding agent with both a web UI and a terminal UI. It does not come with authorization or sandboxing: bring your own.

Mobile-friendly because ideas can come any time.

Web and terminal UI, because you should use whichever fits your workflow — browser, SSH session, or headless server.

Multi-modal because screenshots, charts, and graphs are necessary, not to mention delightful.

Multi-model to benefit from all the innovation going on.

Single-user because it makes sense to bring the agent to the compute.

What's new in Percy

Percy remembers past conversations. After each conversation ends, messages are automatically chunked and indexed into a separate memory database. The agent can recall earlier decisions, code changes, and context using the memory_search tool. Supports hybrid search combining FTS5 keyword matching with optional vector embeddings (Ollama, or FTS5-only with zero dependencies).

LSP Code Intelligence

Compiler-accurate code navigation powered by Language Server Protocol. The code_intelligence tool gives the agent five operations: definition, references, hover, symbols, and diagnostics. Works with Go (gopls), TypeScript, Python (pyright), Rust (rust-analyzer), and other LSP-enabled languages.

Bundled Skills

14 workflow skills ship embedded in the binary, covering test-driven development, systematic debugging, brainstorming, plan writing and execution, code review, git worktrees, parallel agent dispatch, and more. Skills follow the Agent Skills specification and can be overridden by user or project-level skills.

Skills Discovery

Percy discovers skills from multiple sources: bundled skills, user config directories (~/.config/percy/, ~/.percy/), shared agent skills (~/.config/agents/skills/), project .skills/ directories, and SKILL.md files anywhere in the project tree. Use the /skills command to see what's available.

Programmatic Tool Calling

Inspired by Anthropic's programmatic tool calling, but provider-independent. The scripted_tools tool lets the agent write Python scripts that call Percy's tools programmatically — intermediate tool results stay in the script and only the final print() output enters the conversation context. This dramatically reduces token consumption for multi-tool workflows like scanning many files, running bulk checks, or aggregating data across tools.

# Agent writes this to check 20 files — only the summary enters context
results = []
for path in file_list:
    content = await read_file(path=path)
    if "TODO" in content:
        results.append(path)
print(f"Found {len(results)} files with TODOs: {', '.join(results)}")

Requires uv (Python package manager) in PATH.

Context Window Management

Proactive monitoring of LLM context usage with warnings at 80% capacity, automatic retry on response truncation (up to 2 retries), and increased max output tokens (16,384) for longer responses.

Conversation Distillation

When a conversation gets long, Percy can distill it into an operational brief and continue in a fresh conversation. The distillation preserves files modified, decisions made, current state, and next steps — everything the agent needs to pick up where it left off.

Terminal UI (TUI)

percy tui launches a Bubble Tea terminal client that connects to a running Percy server via HTTP/SSE. List conversations, chat with streaming responses, markdown rendering, and all the key bindings you'd expect. The TUI is a pure HTTP client — it runs as a peer to the web UI, and both can be open simultaneously against the same server.

# Start the server
./bin/percy serve

# In another terminal
./bin/percy tui
./bin/percy tui --server http://myhost:8080  # custom server URL
MuninnDB Augmentation (Optional)

Percy can optionally push memories to a MuninnDB server and include its context-aware activations in search results. This enables cross-agent memory sharing on a LAN — what one Percy instance learns becomes available to all others. MuninnDB adds temporal decay (recently-used memories rank higher), Hebbian association (co-retrieved memories form automatic links), and predictive activation on top of Percy's local FTS5 search.

# Start MuninnDB (Docker)
docker run -d --name muninndb -p 8475:8475 ghcr.io/scrypster/muninndb:latest

# Configure Percy
export PERCY_MUNINN_URL=http://192.168.1.67:8475
export PERCY_MUNINN_VAULT=percy        # optional, default: percy
export PERCY_MUNINN_TOKEN=your-token   # optional, default: empty

Local SQLite memory remains primary. MuninnDB is additive — if unreachable, Percy operates normally.

Markdown Table Rendering

Agent responses containing markdown tables are rendered as styled, readable HTML tables — bordered, with header highlighting, column alignment, hover rows, and horizontal scroll on mobile. No external markdown library needed; a lightweight built-in parser handles detection and rendering while leaving the rest of the text untouched.

Notification Channels

Get notified when the agent finishes work. Supports Discord webhooks and email, with a test endpoint to verify connectivity. Channels are configurable via the API and persist in the database.

Installation

Pre-Built Binaries (macOS/Linux)
curl -Lo percy "https://github.com/tgruben-circuit/percy/releases/latest/download/percy_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')" && chmod +x percy

The binaries are on the releases page.

Homebrew (macOS)
brew install --cask tgruben-circuit/tap/percy
Build from Source

You'll need Go and Node.

git clone https://github.com/tgruben-circuit/percy.git
cd percy
make

Architecture

The technical stack is Go for the backend, SQLite for storage, TypeScript and React for the web UI, and Bubble Tea for the terminal UI.

The data model is that Conversations have Messages, which might be from the user, the model, the tools, or the harness. All of that is stored in the database, and we use a SSE endpoint to keep the UI updated.

Acknowledgments

Percy stands on the shoulders of Shelley by Bold Software. Shelley provided the solid core — the agentic loop, multi-model LLM integration, tool execution, SSE-based UI, and the mobile-friendly web interface. We're grateful for that foundation.

Shelley was itself partially based on Sketch.

Open source

Percy is Apache licensed. We require a CLA for contributions.

Building Percy

Run make. Run make serve to start Percy locally.

Dev Tricks

If you want to see how mobile looks, and you're on your home network where you've got mDNS working fine, you can run

socat TCP-LISTEN:9001,fork TCP:localhost:9000

Directories

Path Synopsis
Package bundled_skills provides embedded skill definitions that ship with Percy.
Package bundled_skills provides embedded skill definitions that ship with Percy.
Package claudetool provides tools for Claude AI models.
Package claudetool provides tools for Claude AI models.
browse
Package browse provides browser automation tools for the agent
Package browse provides browser automation tools for the agent
editbuf
Package edit implements buffered position-based editing of byte slices.
Package edit implements buffered position-based editing of byte slices.
lsp
onstart
Package onstart provides codebase analysis used to inform the initial system prompt.
Package onstart provides codebase analysis used to inform the initial system prompt.
Package cluster provides NATS-based clustering for Percy instances.
Package cluster provides NATS-based clustering for Percy instances.
cmd
A command line tool for generating typescript type declarations from go struct types.
A command line tool for generating typescript type declarations from go struct types.
muninn-backfill command
Command muninn-backfill exports Percy memory cells and topic summaries to a MuninnDB server.
Command muninn-backfill exports Percy memory cells and topic summaries to a MuninnDB server.
percy command
db
Package db provides database operations for the Percy AI coding agent.
Package db provides database operations for the Percy AI coding agent.
examples
cluster/01_single_node command
Example 01_single_node demonstrates bootstrapping a single Percy cluster node with an embedded NATS server, registering itself, and querying the agent registry.
Example 01_single_node demonstrates bootstrapping a single Percy cluster node with an embedded NATS server, registering itself, and querying the agent registry.
cluster/02_two_nodes command
Example 02_two_nodes demonstrates multi-node clustering with Percy.
Example 02_two_nodes demonstrates multi-node clustering with Percy.
cluster/03_task_lifecycle command
Example 03: Task Lifecycle with CAS Concurrency
Example 03: Task Lifecycle with CAS Concurrency
cluster/04_worker command
Example 04_worker demonstrates the Worker auto-execution loop with capability-based task matching.
Example 04_worker demonstrates the Worker auto-execution loop with capability-based task matching.
cluster/05_dependencies command
Example 05_dependencies demonstrates the Orchestrator's dependency DAG execution.
Example 05_dependencies demonstrates the Orchestrator's dependency DAG execution.
cluster/06_locks command
Example 06_locks demonstrates distributed file locking across Percy cluster nodes.
Example 06_locks demonstrates distributed file locking across Percy cluster nodes.
cluster/07_heartbeat command
Example 07: Stale Agent Detection and Recovery
Example 07: Stale Agent Detection and Recovery
cluster/08_merge command
Example 08_merge demonstrates the git merge pipeline provided by cluster.MergeWorktree.
Example 08_merge demonstrates the git merge pipeline provided by cluster.MergeWorktree.
cluster/09_full_pipeline command
Example 09: Full End-to-End Cluster Pipeline
Example 09: Full End-to-End Cluster Pipeline
Package gitstate provides utilities for tracking git repository state.
Package gitstate provides utilities for tracking git repository state.
llm
Package llm provides a unified interface for interacting with LLMs.
Package llm provides a unified interface for interacting with LLMs.
ant
gem
imageutil
Package imageutil provides image manipulation utilities.
Package imageutil provides image manipulation utilities.
llmhttp
Package llmhttp provides HTTP utilities for LLM requests including custom headers and database recording.
Package llmhttp provides HTTP utilities for LLM requests including custom headers and database recording.
oai
Package skills implements the Agent Skills specification.
Package skills implements the Agent Skills specification.
Package templates provides embedded project templates for percy.
Package templates provides embedded project templates for percy.
Package tui implements a Bubble Tea terminal UI client for Percy.
Package tui implements a Bubble Tea terminal UI client for Percy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL