编程

peen

试用

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.

它能做什么

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.

技能文档

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

相关技能

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván555 次安装18 星标

诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。

作者 Iván854 次安装69 星标

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai21 次安装8 星标

通过一个命令行工具完成多链加密货币交易、钱包管理与 AI 市场分析。

作者 lowesyang162 次安装109 星标

按用户明确指令,在得到大脑(Get笔记)中保存、搜索并管理笔记与知识库。

作者 iswalle763 次安装66 星标

psyb0t 的更多技能

浏览全部技能

对接用户自部署的 mt5-httpapi MetaTrader 5 网关,每次涉及真实资金的写操作都必须逐笔确认后再执行。

作者 psyb0t107 次安装4 星标

面向反爬检测栈 QA 与授权测试场景的 Docker 浏览器自动化工具。

作者 psyb0t137 次安装2 星标

自托管、OpenAI 兼容的语音服务,一个容器搞定转写、翻译与合成。

作者 psyb0t13 次安装

在固定白名单的 SSH 沙箱里跑 ffmpeg、sox、ImageMagick 处理音视频和图片。

作者 psyb0t71 次安装

通过 SSH 调用 Qwen3-TTS 生成语音,支持预设音色、声音克隆与声音设计。

作者 psyb0t55 次安装

一个端点统一管控多个 IMAP/SMTP 邮箱,跨账号并行完成读取、检索、发送、标记与删除。

作者 psyb0t15 次安装