Coding

peen

Try it

Configure and operate Peen, the durable coding-agent backend. Use when setting up a provider and Docker workspace, sending work over WebSocket, adding project harness rules, or inspecting and controlling durable sessions.

What it does

Peen is a durable coding-agent backend. It works in a mounted directory, starts turns over WebSocket, and persists the conversation, tools, model rounds, compactions, child-agent work, and process jobs in SQLite.

The skill document

Peen

Peen is a durable coding-agent backend. It works in a mounted directory, starts turns over WebSocket, and persists the conversation, tools, model rounds, compactions, child-agent work, and process jobs in SQLite.

Security & safety

Treat a Peen workspace as direct shell and filesystem access for the model. Mount only a project the operator is willing to let it change. Never mount a home directory, Docker socket, SSH directory, or a directory containing credentials unless the operator explicitly wants that exposure. Tool output is stored in the transcript and delivered to connected clients, so do not let the agent read or print secrets.

Keep provider credentials in a gitignored .env or a deployment secret store. Use a real PEEN_API_TOKEN and wss:// before exposing Peen beyond a trusted local network.

When to use

  • Starting Peen for one project in Docker.
  • Adding project rules, skills, agents, events, or hooks to a workspace.
  • Building a WebSocket client that starts turns and follows live events.
  • Reading a durable session, cancelling a turn, or inspecting jobs, model calls, compactions, and child-agent runs.

When NOT to use

  • Editing Peen's own Go implementation. Use the repository development docs and Make targets instead.
  • Treating Peen as a sandbox. The deployment container, its user, mounts, and network policy are the actual security boundary.

Start Peen

From a Peen source checkout, copy .env.example to the gitignored .env and configure one provider. PEEN_UPSTREAMS is raw JSON for Docker, so do not source .env in Bash.

Build the image, create a state directory and the single workspace you want the model to access, then run it:

make docker-build
mkdir -p ./data/peen ./workspace
sudo chown 10001:10001 ./data/peen ./workspace

docker run --rm \
  --env-file .env \
  -p 8080:8080 \
  -v "$(pwd)/data/peen:/data/peen" \
  -v "$(pwd)/workspace:/workspace" \
  peen run

PEEN_CONFIG_DIR=/data/peen holds SQLite, logs, and an optional trusted base harness. PEEN_WORKING_DIR=/workspace is the default workspace. Both host directories must exist and be writable by UID and GID 10001 before launch.

Send and follow work

Generate a UUIDv4 for each new conversation. Send it as metadata.sessionId in a message.send WebSocket event. Reuse it to continue the conversation. A normal connection gets live events for every session, so the client builds tabs by filtering event metadata. ?sessionId= is an optional server-side outbound filter only. It does not select a session for a new message.

Use REST for durable reads and control, never to start a turn. Supply X-Session-ID for session-scoped endpoints. For example, list messages with GET /v1/messages and request turn cancellation with POST /v1/session/cancel. The complete frame and endpoint contracts are in the API reference.

Teach it the project

Put always-on project rules in AGENTS.md. Add named procedures under .agents/skills//SKILL.md, bounded child-agent definitions under .agents/agents/, external-event handlers under .agents/events/, and mechanical guards in .agents/hooks.yaml.

Peen resolves the configuration directory first, then every filesystem layer from root to the active workspace. A closer layer is more specific. A skill description is present in context; the model loads the full skill only when it chooses to use it. Hooks are different: they are mechanical and can inject, deny, run a direct command, or emit a session notice.

References

  • Setup, providers, WebSocket, and REST
  • Configuration
  • Hook configuration
  • API reference

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván1 installs

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván1 installs

More from psyb0t

Browse all skills

Drive a user-deployed mt5-httpapi MetaTrader 5 bridge over HTTP, with per-action confirmation on every real-money call.

by psyb0t107 installs4 stars

Docker-packaged browser automation for QA against anti-bot stacks and authorized detection testing.

by psyb0t137 installs2 stars

Self-hosted OpenAI-compatible speech service — transcription, translation, and synthesis from one container.

by psyb0t13 installs

Run ffmpeg, sox, and ImageMagick jobs against your files in a fixed-allowlist SSH sandbox.

by psyb0t71 installs

Generate speech audio via Qwen3-TTS over SSH with preset voices, voice cloning, and voice design.

by psyb0t55 installs

Drive one or more IMAP/SMTP mailboxes through a single REST + MCP endpoint — read, search, send, mark-seen, and delete across accounts in parallel.

by psyb0t15 installs