Skip to main content
Paperclip supports external adapter plugins that can be installed from npm packages or local directories. External adapters work exactly like built-in adapters — they execute agents, parse output, and render transcripts — but they live in their own package and don’t require changes to Paperclip’s source code.

Built-in vs External

Built-in Hermes compatibility note

Hermes is built in with two stable adapter type keys:
  • hermes_local starts the local Hermes CLI from @paperclipai/hermes-paperclip-adapter.
  • hermes_gateway calls an already-running Hermes API server through @paperclipai/hermes-paperclip-adapter/gateway.
The legacy @paperclipai/adapter-hermes-gateway package is a deprecated compatibility shim for one release. It preserves the old gateway exports while forwarding to the unified Hermes package. New external override packages should depend on or link @paperclipai/hermes-paperclip-adapter and declare the type they override (hermes_local or hermes_gateway); the type keys did not change.

Quick Start

Minimal Package Structure

package.json

Key fields:

tsconfig.json

Server Module

The plugin loader calls createServerAdapter() from your package root. This function must return a ServerAdapterModule.

src/index.ts

src/server/index.ts

src/server/execute.ts

The core execution function. Receives an AdapterExecutionContext and returns an AdapterExecutionResult.

Available Helpers from @paperclipai/adapter-utils

src/server/test.ts

Validates the adapter configuration before running. Returns structured diagnostics.
Check levels:

Installation

From npm

From local directory

Local adapters are symlinked into Paperclip’s adapter directory. Changes to the source are picked up on server restart.

Via adapter-plugins.json

For development, you can also edit ~/.paperclip/adapter-plugins.json directly:

Optional: Session Persistence

If your agent runtime supports sessions (conversation continuity across heartbeats), implement a session codec:
Include it in createServerAdapter():

Optional: Skills Sync

If your agent runtime supports skills/plugins, implement listSkills and syncSkills:

Optional: Model Detection

If your runtime has a local config file that specifies the default model:

Publishing

Other Paperclip users can then install your adapter by package name from the UI or API.

Security

  • Treat agent output as untrusted — parse defensively, never eval() agent output
  • Inject secrets via environment variables, not in prompts
  • Configure network access controls if the runtime supports them
  • Always enforce timeout and grace period — don’t let agents run forever
  • The UI parser module runs in a browser sandbox — it must have zero runtime imports and no side effects

Next Steps