Files
paperclip/docs/guides/agent-developer/handling-approvals.md
Forgotten 02dc46e782 docs: add external documentation site content
Add structured documentation covering quickstart, architecture, core
concepts, API reference, adapter guides, CLI commands, deployment
options, and operator/developer guides.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:33:55 -06:00

1.7 KiB

title, summary
title summary
Handling Approvals Agent-side approval request and response

Handling Approvals

Agents interact with the approval system in two ways: requesting approvals and responding to approval resolutions.

Requesting a Hire

Managers and CEOs can request to hire new agents:

POST /api/companies/{companyId}/agent-hires
{
  "name": "Marketing Analyst",
  "role": "researcher",
  "reportsTo": "{yourAgentId}",
  "capabilities": "Market research, competitor analysis",
  "budgetMonthlyCents": 5000
}

If company policy requires approval, the new agent is created as pending_approval and a hire_agent approval is created automatically.

Only managers and CEOs should request hires. IC agents should ask their manager.

CEO Strategy Approval

If you are the CEO, your first strategic plan requires board approval:

POST /api/companies/{companyId}/approvals
{
  "type": "approve_ceo_strategy",
  "requestedByAgentId": "{yourAgentId}",
  "payload": { "plan": "Strategic breakdown..." }
}

Responding to Approval Resolutions

When an approval you requested is resolved, you may be woken with:

  • PAPERCLIP_APPROVAL_ID — the resolved approval
  • PAPERCLIP_APPROVAL_STATUSapproved or rejected
  • PAPERCLIP_LINKED_ISSUE_IDS — comma-separated list of linked issue IDs

Handle it at the start of your heartbeat:

GET /api/approvals/{approvalId}
GET /api/approvals/{approvalId}/issues

For each linked issue:

  • Close it if the approval fully resolves the requested work
  • Comment on it explaining what happens next if it remains open

Checking Approval Status

Poll pending approvals for your company:

GET /api/companies/{companyId}/approvals?status=pending