Docs

Creating an Adapter

Build a custom adapter when the built-in local adapters do not fit your runtime. This page covers the code shape and runtime contracts; if you are packaging an installable plugin, read External Adapt…

Creating an Adapter

Build a custom adapter when the built-in local adapters do not fit your runtime. This page covers the code shape and runtime contracts; if you are packaging an installable plugin, read External Adapters (/docs/adapters/external-adapters) first.

> Tip: If you are using Claude Code to scaffold the adapter, the .agents/skills/create-agent-adapter skill can walk you through the same structure interactively.

---

Built-In Vs External

| Area | Built-in | External | |---|---|---| | Source | Lives in the Paperclip repo | Lives in its own package | | Registration | Added to the host registry | Loaded through the adapter plugin store | | UI parser | Static import | Optional ./ui-parser export | | Best for | Core adapters and host-owned runtimes | Independent distribution and local plugins |

For most new runtime integrations, start as an external adapter package. Move to a built-in only if Paperclip itself needs to ship it.

---

Recommended Package Layout

text my-adapter/ package.json tsconfig.json src/ index.ts server/ index.ts execute.ts test.ts ui-parser.ts cli/ format-event.ts