/bento:paperclipfrom bento
Operates the Paperclip API on a bento VPS to create/configure agents, write instruction bundles, import skills, manage issues/projects/goals, and wire the MCP server as a control plane.
Ships in bento. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You operate the application API of a paperclip stack that is already
deployed by bento. This is day-2 work: you configure agents and skills, manage
the board, and wire integrations. You do NOT install or redeploy the stack —
that is /bento:deploy. All artifacts stay in English.
Golden rule — mutate via the API, never the DB or disk. Creating agents, editing instruction bundles, syncing skills, and changing config must go through the HTTP API. The API validates schemas, applies defaults, fires the runtime side-effects the app expects (instruction-folder scaffold, config revisions, audit log, skill-content sync), and never leaves an agent half-built. Raw
INSERT/UPDATEon Postgres orcat > fileinto the container can diverge from what the app expects. The only tolerated DB exception is minting a bootstrap board key (below) — and you delete it after. Read-only DB/code inspection to understand the API is always fine.
For getting paperclip running use /bento:deploy. For provider API keys
(OpenAI/Anthropic) use /bento:auth — paperclip reads those propagated envs.
Read the host from bento state on the VPS (same source the other skills use):
ssh "$user@$host" "jq -r '.envs.paperclip.PAPERCLIP_HOST' \$HOME/.config/bento/state.json"
Base URL is https://<PAPERCLIP_HOST>. Find the company id (you almost always
need it — most routes are /api/companies/:companyId/...):
# from inside the box, against the loopback API (see headless mode below)
docker exec "$(paperclip_container)" node -e \
'fetch("http://127.0.0.1:3100/api/companies",{headers:{authorization:"Bearer "+process.env.TOK}}).then(r=>r.json()).then(d=>console.log(JSON.stringify(d,null,2)))'
Bento swarm container names are conventional across deploys:
paperclip_paperclip.1.*postgres_postgres.1.*paperclip_container() { ssh "$user@$host" "docker ps --filter name=paperclip_paperclip -q | head -1"; }
The API's actorMiddleware accepts Authorization: Bearer <token>. If the
token hashes (sha256(token), hex) to a row in board_api_keys, the request
becomes a board actor carrying that key owner's memberships. A key owned by
an instance_admin short-circuits every assertCanMutate* check. Token format:
pcp_board_<48hex>. Bearer auth bypasses CSRF / Origin / cookie entirely — this
is why it's the right path for automation (no browser session needed).
Get a key the clean way: the Paperclip web UI → company → Settings → API keys. Hand that key to the skill via an env var; never echo it.
Bootstrap a temporary key (the one tolerated DB write) when no UI key exists yet — mint, use, delete:
# 1. mint (TOKEN generated locally; store its sha256 only)
# user_id must be an instance_admin for full mutate rights
ssh "$user@$host" "docker exec \$(docker ps -qf name=postgres_postgres) \
psql -U postgres -d paperclip -c \
\"INSERT INTO board_api_keys (user_id,name,key_hash,expires_at) \
VALUES ('<ADMIN_USER_ID>','tmp-cc','<SHA256_OF_TOKEN>',now()+interval '1 hour')\""
# 2. ... use TOKEN as Bearer (see below) ...
# 3. delete when done
ssh "$user@$host" "docker exec \$(docker ps -qf name=postgres_postgres) \
psql -U postgres -d paperclip -c \"DELETE FROM board_api_keys WHERE name='tmp-cc'\""
A — over HTTPS (from anywhere, with a real board key). Plain REST:
curl -s -H "authorization: Bearer $TOK" "https://$PAPERCLIP_HOST/api/companies/$COMPANY/agents"
B — headless on the box (no public exposure, no TLS, no CSRF). Run fetch
inside the container against http://127.0.0.1:3100 — useful for bootstrap and
for routes that are picky about Origin/Referer when hit cross-site:
ssh "$user@$host" "docker exec -e TOK -e COMP \$(docker ps -qf name=paperclip_paperclip) \
node -e 'fetch(\"http://127.0.0.1:3100/api/companies/\"+process.env.COMP+\"/agents\",\
{headers:{authorization:\"Bearer \"+process.env.TOK}}).then(r=>r.json()).then(d=>console.log(JSON.stringify(d)))'"
All under /api. Company-scoped routes take :companyId.
| Goal | Endpoint | Schema / note |
|---|---|---|
| List / get agents | GET /companies/:cid/agents | |
| Create agent | POST /companies/:cid/agents | createAgentSchema — never INSERT into agents |
| Update agent (title, config, manager) | PATCH /companies/:cid/agents/:id | updateAgentSchema |
Update permissions (e.g. canCreateAgents) | dedicated permissions route | updateAgentPermissions — hiring is gated here |
| Instruction bundle (whole) | PATCH …/agents/:id/instructions | updateAgentInstructionsBundle |
| Single instruction file | PUT …/agents/:id/instructions/<file> | upsertAgentInstructionsFile — never write SOUL/AGENTS/etc to disk |
| Sync an agent's skills | POST /agents/:agentId/skills/sync | agentSkillSyncSchema, body {desiredSkills:[...]} |
| Import skills (company) | POST /companies/:cid/skills/import | {source:<path>} — see gotcha below |
| Delete a company skill | DELETE /companies/:cid/skills/:skillId | 422 if still assigned to an agent (sync it off first) |
| Issues | GET/POST /companies/:cid/issues, POST …/issues/:id/comments | create / list / comment |
| Projects & goals | project routes + project_goals (PATCH project goalIds) | goals have level = company/team/agent/task |
Instruction bundles are pure execution code. The 4 files (SOUL / AGENTS /
HEARTBEAT / TOOLS) describe work only. Two things do NOT belong in them:
(1) human life-vision — an agent has no family, sleep, or weekend; don't
encode "don't run after 17h" as an execution gate. Model the async human board
instead: "produce, queue the decision, keep going on what you can." (2)
runtime/substrate meta — the agent needn't know which model/adapter/gateway
runs it; TOOLS.md is just the Paperclip API surface + its skill list. Keep
infra notes in a folder README for the human, not in the bundle.
skills/import wants the PARENT dir, not a skill dir. The server walks
source for nested <slug>/SKILL.md and builds each skill's file inventory by
filtering entry.startsWith(skillDir + "/"). Point source at the directory
that contains many skill subdirs:
source = "/paperclip/skill-sources" → discovers every subdir, full inventory each.source = ".../skill-sources/alex-hormozi" → skillDir=".", filter never matches → inventory is just [SKILL.md].
Re-import upserts by key (only delete first if renaming/cleaning). The path
lives inside the container; ship skills with
tar czf - <slugs> | ssh "$user@$host" "docker exec -i \$(docker ps -qf name=paperclip_paperclip) sh -c 'cd /paperclip/skill-sources && tar xzf -'".DELETE /api/issues/:id returns a blind 500 on dependents. Seven FK tables
are ON DELETE NO ACTION (cost_events, feedback_votes, finance_events,
issue_comments, issue_inbox_archives, issue_read_states,
issue_thread_interactions) plus issues.parent_id. The handler doesn't
pre-clean. For bulk cleanup, do it in one DB transaction instead of looping the
endpoint:
BEGIN;
CREATE TEMP TABLE _t AS SELECT id FROM issues WHERE <filter>;
DELETE FROM cost_events WHERE issue_id IN (SELECT id FROM _t);
DELETE FROM feedback_votes WHERE issue_id IN (SELECT id FROM _t);
DELETE FROM finance_events WHERE issue_id IN (SELECT id FROM _t);
DELETE FROM issue_comments WHERE issue_id IN (SELECT id FROM _t);
DELETE FROM issue_inbox_archives WHERE issue_id IN (SELECT id FROM _t);
DELETE FROM issue_read_states WHERE issue_id IN (SELECT id FROM _t);
DELETE FROM issue_thread_interactions WHERE issue_id IN (SELECT id FROM _t);
UPDATE issues SET parent_id = NULL WHERE parent_id IN (SELECT id FROM _t);
DELETE FROM issues WHERE id IN (SELECT id FROM _t);
COMMIT;
heartbeat_runs has the same orphan-FK pattern (activity_log,
agent_task_sessions.last_run_id, cost_events, finance_events,
heartbeat_run_events) — cascade-clean those before deleting failed runs.
Skill DELETE is 422 while a skill is still assigned. First
POST /agents/:id/skills/sync with desiredSkills excluding that slug, then delete.
To let a hermes agent (or any MCP client) drive the board, use the official
@paperclipai/mcp-server (stdio, thin wrapper over this REST API). In hermes'
config.yaml:
paperclip:
command: npx
args: [-y, '@paperclipai/mcp-server@<PINNED_VERSION>'] # PIN — "latest" can break silently at boot
env:
PAPERCLIP_API_URL: http://paperclip:3100 # internal overlay
PAPERCLIP_API_KEY: ${PAPERCLIP_BOARD_KEY} # ref the .env, don't hardcode
PAPERCLIP_COMPANY_ID: <COMPANY_ID>
enabled: true
tools: {include: [paperclipListAgents, paperclipListIssues, paperclipCreateIssue, paperclipAddComment, paperclipApiRequest]}
⚠️ A newly-added MCP only surfaces to the model after a gateway RESTART.
Added after boot → "Unknown toolset" → tools are fetched but never enter the
model's prompt. Clean restart in swarm: docker service update --force hermes_hermes
(never docker restart a swarm task — it orphans the container). See /bento:hermes.
GET …/agents) and show the result.Upstream API/source: paperclipai/paperclip. Inspect the running server's
/app/server/dist (read-only) to confirm a schema before mutating.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
paperclip, bento, agent-management, skill-sync, mcp-server, day-2-operations
npx claudepluginhub felipefontoura/bento --plugin bento14 skills in this plugin
/authRegister an AI-provider API key on a VPS running bento, via SSH, and propagate it to every BENTO_MANAGED stack. Drives bento-auth (Anthropic, OpenAI, OpenRouter, z.ai, Gemini, and any OpenAI-compatible endpoint). Use when the user says "add my OpenAI key", "register an Anthropic key", "set up provider auth on my bento server". NOTE: subscriptions (Claude Pro/Max, ChatGPT Plus) are OUT OF SCOPE — those use each app's native sign-in./chatwootOperate the Chatwoot customer support platform via HTTP API on an already-deployed bento VPS — reply to a customer, send a support message, create a new conversation, list open conversations, assign a conversation to an agent, resolve or reopen a ticket, create or search a contact, list help desk inboxes, add a private note, filter conversations by status/inbox/team/label. Use when the user says "reply to a customer", "send a message to a contact", "create a support ticket", "list open chats", "assign this conversation", "resolve a ticket", "create a contact in chatwoot", "set up a help desk inbox", "check unassigned conversations", "list my inboxes", "add a note to a conversation", "search for a contact", "get chatwoot conversations", or any other day-2 support desk operation. Deploying Chatwoot itself is `/bento:deploy`./deployAdd or redeploy application stacks on a VPS that ALREADY runs bento, via SSH. Drives bento's unattended Step 3 (BENTO_APPS) for the chosen apps, reconciles state against Portainer, verifies each app, and reports URLs + bootstrap artifacts. Use when the user says "add n8n to my server", "deploy chatwoot on my bento box", "install another app". For a brand-new server use the install skill instead./evolution-apiOperate the Evolution API (WhatsApp gateway) on a bento VPS — create WhatsApp instances, get the QR code to connect a phone, check connection state, send WhatsApp messages (text and media), configure webhooks, list or delete instances, and manage the full lifecycle of a WhatsApp bot or integration. Use when the user says "send a WhatsApp message", "connect my WhatsApp", "get the QR code", "set up a WhatsApp bot", "configure a WhatsApp webhook", "create a WhatsApp instance", "disconnect WhatsApp", "check WhatsApp status", "link my phone number to the API", "scan the QR", "set up WhatsApp automation", or anything about getting WhatsApp to work on their server. Day-2 operation of the running app's HTTP API. Deploying the stack is `/bento:deploy`./hermesOperate the Hermes agent gateway on a bento VPS — chat with the agent over its OpenAI-compatible API, run the CLI (sessions, tools, config), and wire MCP servers so the agent gains new tools. Use when the user says "talk to my hermes agent", "call my agent from a script/bot", "add an MCP server to hermes", "give my agent the youtube/search tools", "list hermes sessions", "change the hermes model", or otherwise wants to drive a running hermes stack. Two surfaces: the HTTP API (:8642, Bearer) and the CLI (`docker exec ... hermes`). Deploying hermes itself is the deploy skill./installDrive an end-to-end bento install on a FRESH Ubuntu/Debian VPS via SSH — pre-flight checks, unattended one-liner, post-hardening reboot, infra + app deploys, recovery from the failure modes that historically required manual operator intervention, and a final report with URLs + invite links. Use for a brand-new server. For adding apps to a server that already runs bento, use the deploy skill instead.Other plugins' skills for the same job