docs/agents-runtime.md
Status: User-facing guide Last updated: 2026-03-26 Audience: Operators setting up and running agents in Paperclip
Agents in Paperclip do not run continuously.
They run in heartbeats: short execution windows triggered by a wakeup.
Each heartbeat:
An agent can be woken up in four ways:
timer: scheduled interval (for example every 5 minutes)assignment: when work is assigned/checked out to that agenton_demand: manual wakeup (button/API)automation: system-triggered wakeup for future automationsIf an agent is already running, new wakeups are merged (coalesced) instead of launching duplicate runs.
Built-in adapters:
claude_local: runs your local claude CLIcodex_local: runs your local codex CLIopencode_local: runs your local opencode CLIcursor: runs Cursor in background modepi_local: runs an embedded Pi agent locallyhermes_local: runs your local hermes CLI (hermes-paperclip-adapter)openclaw_gateway: connects to an OpenClaw gateway endpointprocess: generic shell command adapterhttp: calls an external HTTP endpointExternal plugin adapters (install via the adapter manager or API):
droid_local: runs your local Factory Droid CLI (@henkey/droid-paperclip-adapter)For local CLI adapters (claude_local, codex_local, opencode_local, hermes_local, droid_local), Paperclip assumes the CLI is already installed and authenticated on the host machine.
In agent runtime settings, configure heartbeat policy:
enabled: allow scheduled heartbeatsintervalSec: timer interval (0 = disabled)wakeOnAssignment: wake when assigned workwakeOnOnDemand: allow ping-style on-demand wakeupswakeOnAutomation: allow system automation wakeupsFor local adapters, set:
cwd (working directory)timeoutSec (max runtime per heartbeat)graceSec (time before force-kill after timeout/cancel)You can set:
promptTemplate: used for every run (first run and resumed sessions)Templates support variables like {{agent.id}}, {{agent.name}}, and run context values.
Note:
bootstrapPromptTemplateis deprecated and should not be used for new agents. Existing configs that use it will continue to work but should be migrated to the managed instructions bundle system.
Paperclip stores session IDs for resumable adapters.
Use session reset when:
For each heartbeat run you get:
queued, running, succeeded, failed, timed_out, cancelled)In local/dev setups, full logs are stored on disk under the configured run-log path.
Paperclip pushes runtime/activity updates to the browser in real time.
You should see live changes for:
If the connection drops, the UI reconnects automatically.
If runs fail repeatedly:
claude/codex/opencode/hermes installed and logged in).cwd exists and is accessible.Typical failure causes:
Claude-specific note:
ANTHROPIC_API_KEY is set in adapter env or host environment, Claude uses API-key auth instead of subscription login. Paperclip surfaces this as a warning in environment tests, not a hard error.Local CLI adapters run unsandboxed on the host machine.
That means:
Start with least privilege where possible, and avoid exposing secrets in broad reusable prompts unless intentionally required.
claude_local, codex_local, opencode_local, hermes_local, cursor, or openclaw_gateway). External plugins like droid_local are also available via the adapter manager.cwd to the target workspace (for local adapters).promptTemplate) or use the managed instructions bundle.