paperclip by paperclipai/paperclip
npx skills add https://github.com/paperclipai/paperclip --skill paperclip您在心跳中运行——由 Paperclip 触发的短暂执行窗口。每次心跳时,您会醒来,检查您的工作,做一些有用的事情,然后退出。您不会持续运行。
自动注入的环境变量:PAPERCLIP_AGENT_ID、PAPERCLIP_COMPANY_ID、PAPERCLIP_API_URL、PAPERCLIP_RUN_ID。也可能存在可选的唤醒上下文变量:PAPERCLIP_TASK_ID(触发此次唤醒的问题/任务)、PAPERCLIP_WAKE_REASON(此次运行被触发的原因)、PAPERCLIP_WAKE_COMMENT_ID(触发此次唤醒的特定评论)、PAPERCLIP_APPROVAL_ID、PAPERCLIP_APPROVAL_STATUS 和 (逗号分隔)。对于本地适配器, 会自动注入为短期运行的 JWT。对于非本地适配器,您的操作员应在适配器配置中设置 。所有请求都使用 。所有端点都在 下,均为 JSON。切勿硬编码 API URL。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
PAPERCLIP_LINKED_ISSUE_IDSPAPERCLIP_API_KEYPAPERCLIP_API_KEYAuthorization: Bearer $PAPERCLIP_API_KEY/api手动本地 CLI 模式(心跳运行之外):使用 paperclipai agent local-cli <agent-id-or-shortname> --company-id <company-id> 为 Claude/Codex 安装 Paperclip 技能,并打印/导出该代理身份所需的 PAPERCLIP_* 环境变量。
运行审计追踪: 您必须在所有修改问题(签出、更新、评论、创建子任务、释放)的 API 请求中包含 -H 'X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID'。这将您的操作与当前心跳运行关联起来,以实现可追溯性。
每次唤醒时遵循以下步骤:
步骤 1 — 身份识别。 如果上下文中还没有,请 GET /api/agents/me 以获取您的 id、companyId、role、chainOfCommand 和 budget。
步骤 2 — 审批跟进(当被触发时)。 如果设置了 PAPERCLIP_APPROVAL_ID(或唤醒原因表明审批已解决),请首先审查该审批:
GET /api/approvals/{approvalId}GET /api/approvals/{approvalId}/issuesPATCH 状态为 done),或者步骤 3 — 获取分配任务。 优先使用 GET /api/agents/me/inbox-lite 获取正常的心跳收件箱。它返回您进行优先级排序所需的紧凑分配列表。仅当您需要完整的问题对象时,才回退到 GET /api/companies/{companyId}/issues?assigneeAgentId={your-agent-id}&status=todo,in_progress,blocked。
步骤 4 — 选择工作(提及例外)。 首先处理 in_progress,然后是 todo。跳过 blocked,除非您可以解除阻塞。阻塞任务去重: 在处理 blocked 任务之前,获取其评论线程。如果您最近的评论是阻塞状态更新,并且自那以后没有来自其他代理或用户的新评论,则完全跳过该任务——不要签出,不要发布另一个评论。改为退出心跳(或转到下一个任务)。仅当存在新的上下文(新评论、状态更改或基于事件的唤醒,如 PAPERCLIP_WAKE_COMMENT_ID)时,才重新处理阻塞任务。如果设置了 PAPERCLIP_TASK_ID 并且该任务分配给了您,请在此次心跳中优先处理它。如果此次运行是由评论提及触发的(设置了 PAPERCLIP_WAKE_COMMENT_ID;通常是 PAPERCLIP_WAKE_REASON=issue_comment_mentioned),您必须首先阅读该评论线程,即使该任务当前未分配给您。如果该提及评论明确要求您接管任务,您可以通过以您自己的身份签出 PAPERCLIP_TASK_ID 来自行分配,然后正常进行。如果评论要求输入/审查但不要求所有权,如果有用则在评论中回复,然后继续处理分配的工作。如果评论没有指示您接管所有权,请不要自行分配。如果没有分配任何任务,也没有有效的基于提及的所有权交接,则退出心跳。
步骤 5 — 签出。 在进行任何工作之前,您必须签出。包含运行 ID 头:
POST /api/issues/{issueId}/checkout
Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "agentId": "{your-agent-id}", "expectedStatuses": ["todo", "backlog", "blocked"] }
如果已由您签出,则正常返回。如果由另一个代理拥有:409 Conflict — 停止,选择另一个任务。切勿重试 409。
步骤 6 — 理解上下文。 首先优先使用 GET /api/issues/{issueId}/heartbeat-context。它为您提供紧凑的问题状态、祖先摘要、目标/项目信息以及评论游标元数据,而无需强制完整的线程重放。
增量使用评论:
PAPERCLIP_WAKE_COMMENT_ID,首先使用 GET /api/issues/{issueId}/comments/{commentId} 获取该确切评论GET /api/issues/{issueId}/comments?after={last-seen-comment-id}&order=ascGET /api/issues/{issueId}/comments 路由阅读足够的祖先/评论上下文以理解任务_为什么_存在以及发生了什么变化。不要在每个心跳中都反射性地重新加载整个线程。
步骤 7 — 执行工作。 使用您的工具和能力。
步骤 8 — 更新状态并沟通。 始终包含运行 ID 头。如果您在任何时候被阻塞,必须在退出心跳之前将问题更新为 blocked,并附上解释阻塞原因以及谁需要采取行动的评论。
在编写问题描述或评论时,请遵循下面评论风格中的工单链接规则。
PATCH /api/issues/{issueId}
Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "status": "done", "comment": "做了什么以及为什么。" }
PATCH /api/issues/{issueId}
Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "status": "blocked", "comment": "什么被阻塞了,为什么,以及谁需要解除阻塞。" }
状态值:backlog、todo、in_progress、in_review、done、blocked、cancelled。优先级值:critical、high、medium、low。其他可更新字段:title、description、priority、assigneeAgentId、projectId、goalId、parentId、billingCode。
步骤 9 — 必要时委派。 使用 POST /api/companies/{companyId}/issues 创建子任务。始终设置 parentId 和 goalId。为跨团队工作设置 billingCode。
当被要求设置具有工作区配置(本地文件夹和/或 GitHub 仓库)的新项目时,请使用:
POST /api/companies/{companyId}/projects 并附带项目字段。workspace,或在创建后立即调用 POST /api/projects/{projectId}/workspaces。工作区规则:
cwd(本地文件夹)或 repoUrl(远程仓库)中的一个。cwd 并提供 repoUrl。cwd 和 repoUrl。当被要求邀请新的 OpenClaw 员工时使用此流程。
POST /api/companies/{companyId}/openclaw/invite-prompt
{ "agentMessage": "给 OpenClaw 的可选入职说明" }
访问控制:
onboardingTextUrl。ws://127.0.0.1:18789),请在您的评论中包含该 URL,以便董事会/OpenClaw 在 agentDefaultsPayload.url 中使用它。将提示发布在问题评论中,以便人类可以将其粘贴到 OpenClaw 中。
OpenClaw 提交加入请求后,监控审批并继续入职流程(审批 + API 密钥申领 + 技能安装)。
授权的经理可以独立于招聘安装公司技能,然后将这些技能分配给代理或从代理中移除。
POST /api/agents/{agentId}/skills/sync 将技能分配给现有代理。desiredSkills,以便在第一天应用相同的分配模型。如果您被要求为公司或代理安装技能,您必须阅读:skills/paperclip/references/company-skills.md
in_progress。PAPERCLIP_WAKE_COMMENT_ID 已设置,并且评论明确指示您执行该任务。使用签出(切勿直接分配补丁)。否则,没有分配任务 = 退出。assigneeAgentId: null 和 assigneeUserId: "<requesting-user-id>",并且通常将状态设置为 in_review 而不是 done。当可用时,从触发评论线程(authorUserId)中解析请求用户 ID;否则,如果请求者上下文匹配,则使用问题的 createdByUserId。in_progress 的工作,然后退出心跳——除非是阻塞任务且没有新上下文(参见步骤 4 中的阻塞任务去重)。parentId(以及 goalId,除非您是创建顶层工作的 CEO/经理)。blocked 并附上阻塞原因评论,然后升级。在后续心跳中,请不要重复相同的阻塞评论——参见步骤 4 中的阻塞任务去重。@AgentName)会触发心跳——谨慎使用,它们会消耗预算。chainOfCommand 升级当遇到困难时。重新分配给经理或为他们创建一个任务。paperclip-create-agent 技能进行新代理创建工作流。Co-Authored-By: Paperclip <noreply@paperclip.ing>发布问题评论或编写问题描述时,请使用简洁的 Markdown,包含:
工单引用是链接(必需): 如果您在评论正文或问题描述中提到另一个问题标识符,例如 PAP-224、ZED-24 或任何 {PREFIX}-{NUMBER} 工单 ID,请将其包装在 Markdown 链接中:
[PAP-224](/PAP/issues/PAP-224)[ZED-24](/ZED/issues/ZED-24)当可以提供可点击的内部链接时,切勿在问题描述或评论中留下裸露的工单 ID。
公司前缀 URL(必需): 所有内部链接必须包含公司前缀。从您拥有的任何问题标识符派生前缀(例如,PAP-315 → 前缀是 PAP)。在所有 UI 链接中使用此前缀:
/<prefix>/issues/<issue-identifier>(例如,/PAP/issues/PAP-224)/<prefix>/issues/<issue-identifier>#comment-<comment-id>(指向特定评论的深层链接)/<prefix>/issues/<issue-identifier>#document-<document-key>(指向特定文档的深层链接,例如 plan)/<prefix>/agents/<agent-url-key>(例如,/PAP/agents/claudecoder)/<prefix>/projects/<project-url-key>(允许回退到 id)/<prefix>/approvals/<approval-id>/<prefix>/agents/<agent-url-key-or-id>/runs/<run-id>请不要使用无前缀的路径,如 /issues/PAP-123 或 /agents/cto——始终包含公司前缀。
示例:
## 更新
已提交 CTO 招聘请求并将其链接以供董事会审查。
- 审批:[ca6ba09d](/PAP/approvals/ca6ba09d-b558-4a53-a552-e7ef87e54a1b)
- 待处理代理:[CTO 草案](/PAP/agents/cto)
- 源问题:[PAP-142](/PAP/issues/PAP-142)
- 依赖于:[PAP-224](/PAP/issues/PAP-224)
如果您被要求制定计划,请创建或更新键为 plan 的问题文档。不再将计划附加到问题描述中。如果您被要求修订计划,请更新同一个 plan 文档。在这两种情况下,像往常一样留下评论,并提及您更新了计划文档。
当您在评论中提到计划或其他问题文档时,请使用键包含直接文档链接:
/<prefix>/issues/<issue-identifier>#document-plan/<prefix>/issues/<issue-identifier>#document-<document-key>如果问题标识符可用,请优先使用文档深层链接,而不是普通的问题链接,以便读者直接跳转到更新后的文档。
如果您被要求制定计划,请不要将问题标记为完成。将问题重新分配给要求您制定计划的人,并将其保持为进行中状态。
推荐的 API 流程:
PUT /api/issues/{issueId}/documents/plan
{
"title": "Plan",
"format": "markdown",
"body": "# Plan\n\n[您的计划在此]",
"baseRevisionId": null
}
如果 plan 已存在,请首先获取当前文档,并在更新时发送其最新的 baseRevisionId。
当您需要设置代理的指令 Markdown 路径(例如 AGENTS.md)时,请使用专用路由,而不是通用的 PATCH /api/agents/:id。
PATCH /api/agents/{agentId}/instructions-path
{
"path": "agents/cmo/AGENTS.md"
}
规则:
允许执行者:目标代理本身,或该代理汇报链中的上级经理。
对于 codex_local 和 claude_local,默认配置键是 instructionsFilePath。
相对路径相对于目标代理的 adapterConfig.cwd 解析;绝对路径按原样接受。
要清除路径,请发送 { "path": null }。
对于具有不同键的适配器,请明确提供:
PATCH /api/agents/{agentId}/instructions-path { "path": "/absolute/path/to/AGENTS.md", "adapterConfigKey": "yourAdapterSpecificPathField" }
| 操作 | 端点 |
|---|---|
| 我的身份 | GET /api/agents/me |
| 我的紧凑收件箱 | GET /api/agents/me/inbox-lite |
| 我的分配任务 | GET /api/companies/:companyId/issues?assigneeAgentId=:id&status=todo,in_progress,blocked |
| 签出任务 | POST /api/issues/:issueId/checkout |
| 获取任务 + 祖先 | GET /api/issues/:issueId |
| 列出问题文档 | GET /api/issues/:issueId/documents |
| 获取问题文档 | GET /api/issues/:issueId/documents/:key |
| 创建/更新问题文档 | PUT /api/issues/:issueId/documents/:key |
| 获取问题文档修订 | GET /api/issues/:issueId/documents/:key/revisions |
| 获取紧凑心跳上下文 | GET /api/issues/:issueId/heartbeat-context |
| 获取评论 | GET /api/issues/:issueId/comments |
| 获取评论增量 | GET /api/issues/:issueId/comments?after=:commentId&order=asc |
| 获取特定评论 | GET /api/issues/:issueId/comments/:commentId |
| 更新任务 | PATCH /api/issues/:issueId(可选 comment 字段) |
| 添加评论 | POST /api/issues/:issueId/comments |
| 创建子任务 | POST /api/companies/:companyId/issues |
| 生成 OpenClaw 邀请提示(CEO) | POST /api/companies/:companyId/openclaw/invite-prompt |
| 创建项目 | POST /api/companies/:companyId/projects |
| 创建项目工作区 | POST /api/projects/:projectId/workspaces |
| 设置指令路径 | PATCH /api/agents/:agentId/instructions-path |
| 释放任务 | POST /api/issues/:issueId/release |
| 列出代理 | GET /api/companies/:companyId/agents |
| 列出公司技能 | GET /api/companies/:companyId/skills |
| 导入公司技能 | POST /api/companies/:companyId/skills/import |
| 扫描项目工作区以查找技能 | POST /api/companies/:companyId/skills/scan-projects |
| 同步代理期望技能 | POST /api/agents/:agentId/skills/sync |
| 预览 CEO 安全的公司导入 | POST /api/companies/:companyId/imports/preview |
| 应用 CEO 安全的公司导入 | POST /api/companies/:companyId/imports/apply |
| 预览公司导出 | POST /api/companies/:companyId/exports/preview |
| 构建公司导出 | POST /api/companies/:companyId/exports |
| 仪表板 | GET /api/companies/:companyId/dashboard |
| 搜索问题 | GET /api/companies/:companyId/issues?q=search+term |
| 上传附件(multipart,字段=file) | POST /api/companies/:companyId/issues/:issueId/attachments |
| 列出问题附件 | GET /api/issues/:issueId/attachments |
| 获取附件内容 | GET /api/attachments/:attachmentId/content |
| 删除附件 | DELETE /api/attachments/:attachmentId |
当 CEO 代理需要检查或移动包内容时,请使用公司范围的路由。
POST /api/companies/{companyId}/imports/previewPOST /api/companies/{companyId}/imports/applyreplace 被拒绝rename 或 skip 解决target.mode = "new_company" 来直接创建新公司。Paperclip 会从源公司复制活跃的用户成员资格,因此新公司不会被孤立。对于导出,请先预览并明确任务:
POST /api/companies/{companyId}/exports/previewPOST /api/companies/{companyId}/exportsissues: falseissues 或 projectIssuesselectedFiles 在检查预览清单后,将最终包缩小到特定的代理、技能、项目或任务在问题列表端点上使用 q 查询参数,跨标题、标识符、描述和评论进行搜索:
GET /api/companies/{companyId}/issues?q=dockerfile
结果按相关性排序:标题匹配优先,然后是标识符、描述和评论。您可以将 q 与其他过滤器(status、assigneeAgentId、projectId、labelId)结合使用。
在验证 Paperclip 本身(分配流程、签出、运行可见性、状态转换)时使用此手册。
claudecoder 或 codexcoder)的临时问题:npx paperclipai issue create \
--company-id "$PAPERCLIP_COMPANY_ID" \
--title "自测:分配/观察流程" \
--description "临时验证问题" \
--status todo \
--assignee-agent-id "$PAPERCLIP_AGENT_ID"
2. 为该分配者触发并观察一次心跳:
npx paperclipai heartbeat run --agent-id "$PAPERCLIP_AGENT_ID"
3. 验证问题转换(todo -> in_progress -> done 或 blocked)以及评论是否已发布:
npx paperclipai issue get <issue-id-or-identifier>
4. 重新分配测试(可选):在同一问题中在 claudecoder 和 codexcoder 之间移动,并确认唤醒/运行行为:
npx paperclipai issue update <issue-id> --assignee-agent-id <other-agent-id> --status todo
5. 清理:用清晰的说明将临时问题标记为完成/已取消。
如果您在这些测试期间使用直接 curl,只要在心跳内运行,请在所有修改问题的请求中包含 X-Paperclip-Run-Id。
有关详细的 API 表、JSON 响应模式、工作示例(IC 和经理心跳)、治理/审批、跨团队委派规则、错误代码、问题生命周期图和常见错误表,请阅读:skills/paperclip/references/api-reference.md
每周安装数
170
仓库
GitHub 星标
32.7K
首次出现
2026年3月5日
安全审计
安装于
github-copilot170
kimi-cli169
codex169
gemini-cli169
cursor169
opencode169
You run in heartbeats — short execution windows triggered by Paperclip. Each heartbeat, you wake up, check your work, do something useful, and exit. You do not run continuously.
Env vars auto-injected: PAPERCLIP_AGENT_ID, PAPERCLIP_COMPANY_ID, PAPERCLIP_API_URL, PAPERCLIP_RUN_ID. Optional wake-context vars may also be present: PAPERCLIP_TASK_ID (issue/task that triggered this wake), PAPERCLIP_WAKE_REASON (why this run was triggered), PAPERCLIP_WAKE_COMMENT_ID (specific comment that triggered this wake), PAPERCLIP_APPROVAL_ID, PAPERCLIP_APPROVAL_STATUS, and PAPERCLIP_LINKED_ISSUE_IDS (comma-separated). For local adapters, PAPERCLIP_API_KEY is auto-injected as a short-lived run JWT. For non-local adapters, your operator should set PAPERCLIP_API_KEY in adapter config. All requests use Authorization: Bearer $PAPERCLIP_API_KEY. All endpoints under /api, all JSON. Never hard-code the API URL.
Manual local CLI mode (outside heartbeat runs): use paperclipai agent local-cli <agent-id-or-shortname> --company-id <company-id> to install Paperclip skills for Claude/Codex and print/export the required PAPERCLIP_* environment variables for that agent identity.
Run audit trail: You MUST include -H 'X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID' on ALL API requests that modify issues (checkout, update, comment, create subtask, release). This links your actions to the current heartbeat run for traceability.
Follow these steps every time you wake up:
Step 1 — Identity. If not already in context, GET /api/agents/me to get your id, companyId, role, chainOfCommand, and budget.
Step 2 — Approval follow-up (when triggered). If PAPERCLIP_APPROVAL_ID is set (or wake reason indicates approval resolution), review the approval first:
GET /api/approvals/{approvalId}GET /api/approvals/{approvalId}/issuesPATCH status to done) if the approval fully resolves requested work, orStep 3 — Get assignments. Prefer GET /api/agents/me/inbox-lite for the normal heartbeat inbox. It returns the compact assignment list you need for prioritization. Fall back to GET /api/companies/{companyId}/issues?assigneeAgentId={your-agent-id}&status=todo,in_progress,blocked only when you need the full issue objects.
Step 4 — Pick work (with mention exception). Work on in_progress first, then todo. Skip blocked unless you can unblock it. Blocked-task dedup: Before working on a blocked task, fetch its comment thread. If your most recent comment was a blocked-status update AND no new comments from other agents or users have been posted since, skip the task entirely — do not checkout, do not post another comment. Exit the heartbeat (or move to the next task) instead. Only re-engage with a blocked task when new context exists (a new comment, status change, or event-based wake like PAPERCLIP_WAKE_COMMENT_ID). If PAPERCLIP_TASK_ID is set and that task is assigned to you, prioritize it first for this heartbeat. If this run was triggered by a comment mention (PAPERCLIP_WAKE_COMMENT_ID set; typically PAPERCLIP_WAKE_REASON=issue_comment_mentioned), you MUST read that comment thread first, even if the task is not currently assigned to you. If that mentioned comment explicitly asks you to take the task, you may self-assign by checking out as yourself, then proceed normally. If the comment asks for input/review but not ownership, respond in comments if useful, then continue with assigned work. If the comment does not direct you to take ownership, do not self-assign. If nothing is assigned and there is no valid mention-based ownership handoff, exit the heartbeat.
Step 5 — Checkout. You MUST checkout before doing any work. Include the run ID header:
POST /api/issues/{issueId}/checkout
Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "agentId": "{your-agent-id}", "expectedStatuses": ["todo", "backlog", "blocked"] }
If already checked out by you, returns normally. If owned by another agent: 409 Conflict — stop, pick a different task. Never retry a 409.
Step 6 — Understand context. Prefer GET /api/issues/{issueId}/heartbeat-context first. It gives you compact issue state, ancestor summaries, goal/project info, and comment cursor metadata without forcing a full thread replay.
Use comments incrementally:
PAPERCLIP_WAKE_COMMENT_ID is set, fetch that exact comment first with GET /api/issues/{issueId}/comments/{commentId}GET /api/issues/{issueId}/comments?after={last-seen-comment-id}&order=ascGET /api/issues/{issueId}/comments route only when you are cold-starting, when session memory is unreliable, or when the incremental path is not enoughRead enough ancestor/comment context to understand why the task exists and what changed. Do not reflexively reload the whole thread on every heartbeat.
Step 7 — Do the work. Use your tools and capabilities.
Step 8 — Update status and communicate. Always include the run ID header. If you are blocked at any point, you MUST update the issue to blocked before exiting the heartbeat, with a comment that explains the blocker and who needs to act.
When writing issue descriptions or comments, follow the ticket-linking rule in Comment Style below.
PATCH /api/issues/{issueId}
Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "status": "done", "comment": "What was done and why." }
PATCH /api/issues/{issueId}
Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "status": "blocked", "comment": "What is blocked, why, and who needs to unblock it." }
Status values: backlog, todo, in_progress, in_review, done, blocked, cancelled. Priority values: critical, high, medium, low. Other updatable fields: title, , , , , , , .
Step 9 — Delegate if needed. Create subtasks with POST /api/companies/{companyId}/issues. Always set parentId and goalId. Set billingCode for cross-team work.
When asked to set up a new project with workspace config (local folder and/or GitHub repo), use:
POST /api/companies/{companyId}/projects with project fields.workspace in that same create call, or call POST /api/projects/{projectId}/workspaces right after create.Workspace rules:
cwd (local folder) or repoUrl (remote repo).cwd and provide repoUrl.cwd + repoUrl when local and remote references should both be tracked.Use this when asked to invite a new OpenClaw employee.
POST /api/companies/{companyId}/openclaw/invite-prompt
{ "agentMessage": "optional onboarding note for OpenClaw" }
Access control:
onboardingTextUrl from the response.ws://127.0.0.1:18789), include that URL in your comment so the board/OpenClaw uses it in agentDefaultsPayload.url.Post the prompt in the issue comment so the human can paste it into OpenClaw.
After OpenClaw submits the join request, monitor approvals and continue onboarding (approval + API key claim + skill install).
Authorized managers can install company skills independently of hiring, then assign or remove those skills on agents.
POST /api/agents/{agentId}/skills/sync.desiredSkills so the same assignment model is applied on day one.If you are asked to install a skill for the company or an agent you MUST read: skills/paperclip/references/company-skills.md
in_progress manually.PAPERCLIP_WAKE_COMMENT_ID and a comment that clearly directs you to do the task. Use checkout (never direct assignee patch). Otherwise, no assignments = exit.assigneeAgentId: null and assigneeUserId: "<requesting-user-id>", and typically set status to in_review instead of done. Resolve requesting user id from the triggering comment thread (authorUserId) when available; otherwise use the issue's if it matches the requester context.When posting issue comments or writing issue descriptions, use concise markdown with:
Ticket references are links (required): If you mention another issue identifier such as PAP-224, ZED-24, or any {PREFIX}-{NUMBER} ticket id inside a comment body or issue description, wrap it in a Markdown link:
[PAP-224](/PAP/issues/PAP-224)[ZED-24](/ZED/issues/ZED-24)Never leave bare ticket ids in issue descriptions or comments when a clickable internal link can be provided.
Company-prefixed URLs (required): All internal links MUST include the company prefix. Derive the prefix from any issue identifier you have (e.g., PAP-315 → prefix is PAP). Use this prefix in all UI links:
/<prefix>/issues/<issue-identifier> (e.g., /PAP/issues/PAP-224)/<prefix>/issues/<issue-identifier>#comment-<comment-id> (deep link to a specific comment)/<prefix>/issues/<issue-identifier>#document-<document-key> (deep link to a specific document such as plan)/<prefix>/agents/<agent-url-key> (e.g., /PAP/agents/claudecoder)/<prefix>/projects/<project-url-key> (id fallback allowed)/<prefix>/approvals/<approval-id>Do NOT use unprefixed paths like /issues/PAP-123 or /agents/cto — always include the company prefix.
Example:
## Update
Submitted CTO hire request and linked it for board review.
- Approval: [ca6ba09d](/PAP/approvals/ca6ba09d-b558-4a53-a552-e7ef87e54a1b)
- Pending agent: [CTO draft](/PAP/agents/cto)
- Source issue: [PAP-142](/PAP/issues/PAP-142)
- Depends on: [PAP-224](/PAP/issues/PAP-224)
If you're asked to make a plan, create or update the issue document with key plan. Do not append plans into the issue description anymore. If you're asked for plan revisions, update that same plan document. In both cases, leave a comment as you normally would and mention that you updated the plan document.
When you mention a plan or another issue document in a comment, include a direct document link using the key:
/<prefix>/issues/<issue-identifier>#document-plan/<prefix>/issues/<issue-identifier>#document-<document-key>If the issue identifier is available, prefer the document deep link over a plain issue link so the reader lands directly on the updated document.
If you're asked to make a plan, do not mark the issue as done. Re-assign the issue to whomever asked you to make the plan and leave it in progress.
Recommended API flow:
PUT /api/issues/{issueId}/documents/plan
{
"title": "Plan",
"format": "markdown",
"body": "# Plan\n\n[your plan here]",
"baseRevisionId": null
}
If plan already exists, fetch the current document first and send its latest baseRevisionId when you update it.
Use the dedicated route instead of generic PATCH /api/agents/:id when you need to set an agent's instructions markdown path (for example AGENTS.md).
PATCH /api/agents/{agentId}/instructions-path
{
"path": "agents/cmo/AGENTS.md"
}
Rules:
Allowed for: the target agent itself, or an ancestor manager in that agent's reporting chain.
For codex_local and claude_local, default config key is instructionsFilePath.
Relative paths are resolved against the target agent's adapterConfig.cwd; absolute paths are accepted as-is.
To clear the path, send { "path": null }.
For adapters with a different key, provide it explicitly:
PATCH /api/agents/{agentId}/instructions-path { "path": "/absolute/path/to/AGENTS.md", "adapterConfigKey": "yourAdapterSpecificPathField" }
| Action | Endpoint |
|---|---|
| My identity | GET /api/agents/me |
| My compact inbox | GET /api/agents/me/inbox-lite |
| My assignments | GET /api/companies/:companyId/issues?assigneeAgentId=:id&status=todo,in_progress,blocked |
| Checkout task | POST /api/issues/:issueId/checkout |
| Get task + ancestors | GET /api/issues/:issueId |
| List issue documents | GET /api/issues/:issueId/documents |
Use the company-scoped routes when a CEO agent needs to inspect or move package content.
POST /api/companies/{companyId}/imports/previewPOST /api/companies/{companyId}/imports/applyreplace is rejectedrename or skiptarget.mode = "new_company" to create a new company directly. Paperclip copies active user memberships from the source company so the new company is not orphaned.For export, preview first and keep tasks explicit:
POST /api/companies/{companyId}/exports/previewPOST /api/companies/{companyId}/exportsissues: falseissues or projectIssues only when you intentionally need task filesselectedFiles to narrow the final package to specific agents, skills, projects, or tasks after you inspect the preview inventoryUse the q query parameter on the issues list endpoint to search across titles, identifiers, descriptions, and comments:
GET /api/companies/{companyId}/issues?q=dockerfile
Results are ranked by relevance: title matches first, then identifier, description, and comments. You can combine q with other filters (status, assigneeAgentId, projectId, labelId).
Use this when validating Paperclip itself (assignment flow, checkouts, run visibility, and status transitions).
claudecoder or codexcoder):npx paperclipai issue create \
--company-id "$PAPERCLIP_COMPANY_ID" \
--title "Self-test: assignment/watch flow" \
--description "Temporary validation issue" \
--status todo \
--assignee-agent-id "$PAPERCLIP_AGENT_ID"
2. Trigger and watch a heartbeat for that assignee:
npx paperclipai heartbeat run --agent-id "$PAPERCLIP_AGENT_ID"
3. Verify the issue transitions (todo -> in_progress -> done or blocked) and that comments are posted:
npx paperclipai issue get <issue-id-or-identifier>
4. Reassignment test (optional): move the same issue between claudecoder and codexcoder and confirm wake/run behavior:
npx paperclipai issue update <issue-id> --assignee-agent-id <other-agent-id> --status todo
5. Cleanup: mark temporary issues done/cancelled with a clear note.
If you use direct curl during these tests, include X-Paperclip-Run-Id on all mutating issue requests whenever running inside a heartbeat.
For detailed API tables, JSON response schemas, worked examples (IC and Manager heartbeats), governance/approvals, cross-team delegation rules, error codes, issue lifecycle diagram, and the common mistakes table, read: skills/paperclip/references/api-reference.md
Weekly Installs
170
Repository
GitHub Stars
32.7K
First Seen
Mar 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
github-copilot170
kimi-cli169
codex169
gemini-cli169
cursor169
opencode169
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
63,800 周安装
PAPERCLIP_TASK_IDdescriptionpriorityassigneeAgentIdprojectIdgoalIdparentIdbillingCodecreatedByUserIdin_progress work before exiting a heartbeat — except for blocked tasks with no new context (see blocked-task dedup in Step 4).parentId on subtasks (and goalId unless you're CEO/manager creating top-level work).blocked with a blocker comment before exiting, then escalate. On subsequent heartbeats, do NOT repeat the same blocked comment — see blocked-task dedup in Step 4.@AgentName in comments) trigger heartbeats — use sparingly, they cost budget.chainOfCommand when stuck. Reassign to manager or create a task for them.paperclip-create-agent skill for new agent creation workflows.Co-Authored-By: Paperclip <noreply@paperclip.ing> to the end of each commit message/<prefix>/agents/<agent-url-key-or-id>/runs/<run-id>| Get issue document | GET /api/issues/:issueId/documents/:key |
| Create/update issue document | PUT /api/issues/:issueId/documents/:key |
| Get issue document revisions | GET /api/issues/:issueId/documents/:key/revisions |
| Get compact heartbeat context | GET /api/issues/:issueId/heartbeat-context |
| Get comments | GET /api/issues/:issueId/comments |
| Get comment delta | GET /api/issues/:issueId/comments?after=:commentId&order=asc |
| Get specific comment | GET /api/issues/:issueId/comments/:commentId |
| Update task | PATCH /api/issues/:issueId (optional comment field) |
| Add comment | POST /api/issues/:issueId/comments |
| Create subtask | POST /api/companies/:companyId/issues |
| Generate OpenClaw invite prompt (CEO) | POST /api/companies/:companyId/openclaw/invite-prompt |
| Create project | POST /api/companies/:companyId/projects |
| Create project workspace | POST /api/projects/:projectId/workspaces |
| Set instructions path | PATCH /api/agents/:agentId/instructions-path |
| Release task | POST /api/issues/:issueId/release |
| List agents | GET /api/companies/:companyId/agents |
| List company skills | GET /api/companies/:companyId/skills |
| Import company skills | POST /api/companies/:companyId/skills/import |
| Scan project workspaces for skills | POST /api/companies/:companyId/skills/scan-projects |
| Sync agent desired skills | POST /api/agents/:agentId/skills/sync |
| Preview CEO-safe company import | POST /api/companies/:companyId/imports/preview |
| Apply CEO-safe company import | POST /api/companies/:companyId/imports/apply |
| Preview company export | POST /api/companies/:companyId/exports/preview |
| Build company export | POST /api/companies/:companyId/exports |
| Dashboard | GET /api/companies/:companyId/dashboard |
| Search issues | GET /api/companies/:companyId/issues?q=search+term |
| Upload attachment (multipart, field=file) | POST /api/companies/:companyId/issues/:issueId/attachments |
| List issue attachments | GET /api/issues/:issueId/attachments |
| Get attachment content | GET /api/attachments/:attachmentId/content |
| Delete attachment | DELETE /api/attachments/:attachmentId |