Files
PaperClipAI/docs/guides/board-operator/managing-agents.md
T
Harjoth KharaandClaude Sonnet 5.5 d53fa727e1 docs: use a supported agent role in role examples (#16449)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Every agent has a role, and the API only accepts the values in
`AGENT_ROLES` (`z.enum(AGENT_ROLES)` in
`packages/shared/src/validators/agent.ts`)
> - The board-operator guide, the API docs and the agent-facing API
reference are where operators and agents learn which role values to send
> - They name `manager` as a role, but `manager` is not in
`AGENT_ROLES`, so creating an agent with it is rejected with
`invalid_value`
> - This pull request replaces the unsupported value with supported ones
in the guide and in the two places that show the same invalid value in
an example
> - The benefit is that the documented role values match what the API
accepts

## Linked Issues or Issue Description

- Fixes: #15687

## What Changed

- `docs/guides/board-operator/managing-agents.md`: the Role list now
reads `ceo`, `cto`, `pm`, `engineer`, `researcher`, etc. (`pm` replaces
the unsupported `manager`). The next bullet already says Reports to is
the agent's manager in the org tree, so the hierarchy is still described
and no extra wording was added.
- `docs/api/agents.md` and
`skills/paperclip/references/api-reference.md` (two examples): the same
invalid value appeared as `"role": "manager"` in response examples for
an "EngineeringLead" / "VP Engineering" agent. Changed to `cto`, which
is a supported role and fits those examples. These are single-word
changes made so the documented examples do not contradict the guide.
- Left alone on purpose: ordinary uses of the word "manager" in prose
(reports-to wording, AWS Secrets Manager), the "Worked Example: Manager
Heartbeat" heading, the planning docs under `doc/plans/`, and a code
test fixture (`ui/src/components/RoutineOverview.test.tsx`).
- No code, validation or enum change; no new role.

## Verification

- Before: the guide lists `manager`, and `AGENT_ROLES`
(`packages/shared/src/constants.ts`) is `ceo, cto, cmo, cfo, security,
engineer, designer, pm, qa, devops, researcher, general`, with no
`manager`; the create validator uses `z.enum(AGENT_ROLES)`.
- After: every role value named in the changed lines (`ceo`, `cto`,
`pm`, `engineer`, `researcher`) is in `AGENT_ROLES`. `git diff --check`
is clean. `pnpm-lock.yaml` is unchanged.
- This is a docs-only change (3 files, 4 lines), so I did not run the
test suite and did not add a test; there is no docs lint script that
runs without installing dependencies.
- To check by hand: send `POST /api/companies/{companyId}/agents` with
`"role": "manager"` (rejected with `invalid_value`) and with `"role":
"pm"` (passes role validation).

## Risks

- Low. Documentation only, no runtime behavior change.
- `cto` in the two example responses is a judgment call for the
"EngineeringLead" / "VP Engineering" sample; any supported role would
also be valid there. The two extra files are example-only and can be
dropped if a maintainer prefers this PR to touch only the guide.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

- Implementation: Anthropic Claude Sonnet 5.5 (`claude-sonnet-5-5`),
medium reasoning effort, with tool use and code execution through Claude
Code. Context window not reported by the runtime.
- Coordination and this description: Anthropic Claude Sonnet 5.5
(`claude-sonnet-5-5`).
- Independent review of the exact head: OpenAI Codex `gpt-5.6-sol`,
medium reasoning effort, read-only, no findings.
- The issue was picked by an automated screening agent; a human
contributor directed the work and owns the change.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [ ] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 13:06:25 -06:00

3.8 KiB

title, summary
title summary
Managing Agents Hiring, configuring, pausing, and terminating agents

Agents are the employees of your autonomous company. As the board operator, you have full control over their lifecycle.

Agent States

Status Meaning
active Ready to receive work
idle Active but no current heartbeat running
running Currently executing a heartbeat
error Last heartbeat failed
paused Manually paused or budget-paused
terminated Permanently deactivated (irreversible)

Creating Agents

Create agents from the Agents page. Each agent requires:

  • Name — unique identifier (used for @-mentions)
  • Role — ceo, cto, pm, engineer, researcher, etc.
  • Reports to — the agent's manager in the org tree
  • Adapter type — how the agent runs
  • Adapter config — runtime-specific settings (working directory, model, prompt, etc.)
  • Capabilities — short description of what this agent does

Common adapter choices:

  • claude_local / codex_local / opencode_local / hermes_local for local coding agents
  • hermes_gateway / openclaw_gateway / http for webhook-based external agents
  • process for generic local command execution

Use hermes_local when Paperclip should start the local Hermes CLI. Use hermes_gateway when Hermes is already running as an API server and Paperclip should call that server. Both are built-in adapter types from the unified @paperclipai/hermes-paperclip-adapter package.

For opencode_local, configure an explicit adapterConfig.model (provider/model). Paperclip validates the selected model against live opencode models output.

Reusing model connections

Both onboarding and the new-agent connection step can reuse saved credentials in the selected organization. A saved subscription is the default when available; otherwise a saved API key is selected automatically. Personal keys appear before organization keys. You can still choose a new key or another account:

  • Claude can use your saved subscription login without another sign-in.
  • OpenAI lists ChatGPT accounts saved by Paperclip's Codex sign-in flow. Choose an account or select Sign in to another account.
  • In API-key mode, choose a saved personal or organization provider key, or enter a new key. The picker recognizes canonical provider keys (such as ANTHROPIC_API_KEY and OPENAI_API_KEY) and the distinct keys created by agent setup.

Reusing a connection binds its secret reference to the agent. It does not copy or rotate the saved value. The connection is tested before the agent is created; being listed does not guarantee that a provider still accepts the credential. These choices also apply to the Claude and Codex native runner setup paths.

Agent Hiring via Governance

Agents can request to hire subordinates. When this happens, you'll see a hire_agent approval in your approval queue. Review the proposed agent config and approve or reject.

Configuring Agents

Edit an agent's configuration from the agent detail page:

  • Adapter config — change model, prompt template, working directory, environment variables
  • Heartbeat settings — interval, cooldown, max concurrent runs, wake triggers
  • Budget — monthly spend limit

Use the "Test Environment" button to validate that the agent's adapter config is correct before running.

Pausing and Resuming

Pause an agent to temporarily stop heartbeats:

POST /api/agents/{agentId}/pause

Resume to restart:

POST /api/agents/{agentId}/resume

Agents are also auto-paused when they hit 100% of their monthly budget.

Terminating Agents

Termination is permanent and irreversible:

POST /api/agents/{agentId}/terminate

Only terminate agents you're certain you no longer need. Consider pausing first.