Nicolas Noben

Valen

A lightweight coding-agent harness in a single Go binary

Free • Open Source • Go • macOS first

Go, AI, coding agent, terminal, Bubble Tea, OpenCode, OpenRouter, TUI, CLI

Introduction

Valen is a lightweight coding-agent harness in a single Go binary, inspired by OpenCode. It has no server and no runtime dependencies.

The aim is the same agent loop at a small fraction of the resource footprint: about 50 MB of RAM in use, and less than 10% CPU per agent running.

It has a terminal chat UI and a one-shot headless mode, talks to OpenCode Go/Zen and OpenRouter models, and runs the tool loop locally.

Valen is built macOS first, with Linux as a secondary target.

Features
Interface Bubble Tea terminal UI and headless -p mode. —
Tools shell, read, write, edit, glob, grep, web_search, web_fetch, plus todos and questions. —
Attachments @ fuzzy picker for files and folders, drag-and-drop paths and ctrl+v screenshots. —
Models Live model, reasoning-effort and OpenRouter routing switching (/model, /effort, /route). —
Subagents Foreground tasks with isolated history, up to 5 in parallel. —
Sessions JSONL session logs, resume, and summary-style auto-compaction. —
MCP Stdio MCP servers. —
Plan Mode Read-only investigation before making changes. —
Sandboxed macOS sandbox-exec first, Linux bubblewrap. Blocks writes outside the workdir and hides secrets. —
Install

github.com/keyle/valen

git clone https://github.com/keyle/valen && cd valen
make install

Requires Go. macOS is the primary target; Linux works too, with bubblewrap. Set an API key and run valen.