← Back to Plugins
Integration

Paperclip Bridge

NazmulGit By NazmulGit 👁 24 views ▲ 0 votes

OpenClaw plugin: adds a paperclip.* tool family so OC agents can comment, close, and create Paperclip issues without raw fetch boilerplate. Pairs with paperclip-openclaw-adapter.

GitHub

Install

npm install
pnpm

README

# openclaw-paperclip-bridge

An OpenClaw plugin that gives agents a `paperclip` tool — comment on issues, change status, open follow-ups in Paperclip without raw fetch boilerplate.

> **Renamed in v0.2.0.** Was `paperclip_adapter_for_opencalw` (typo + ambiguous "adapter" word) through v0.1.0. Same code, clearer name.

Pairs with the Paperclip-side bridge: [paperclip-openclaw-bridge](https://github.com/NazmulGit/paperclip-openclaw-bridge).

## Status

**v0.2.0 — Scaffold (renamed).** Manifest, entry point, tool stub, and skill docs are in place. Not yet installed or tested against a running OpenClaw instance. Treat this as the V2 foundation for OC-initiated PC operations.

If you only want the Paperclip ↔ OpenClaw bridge to work end-to-end (issue assignment → OC agent → reply + status), you do **not** need this plugin — the Paperclip-side bridge already handles it by inlining per-agent API keys into wake messages. This plugin is for when you want OC agents to use a typed tool instead of raw fetch.

## What it adds

A `paperclip` tool with four operations:

| op | description |
|---|---|
| `ping` | Probe Paperclip reachability (`GET /api/agents/me`) |
| `commentIssue` | Post a comment on an issue |
| `setIssueStatus` | Change status; optionally include a comment |
| `createIssue` | Open a new issue in a company |

Plus a skill (`skills/paperclip/SKILL.md`) that tells OC agents when and how to call it.

## Configuration

Set in OpenClaw's plugin config (`openclaw plugins inspect paperclip-bridge --runtime`):

| field | required | notes |
|---|---|---|
| `baseUrl` | yes | Paperclip API base. Default `http://127.0.0.1:3100` |
| `apiKey` | recommended | Bearer token. Get one from the Paperclip-side bridge's "Bootstrap PC credentials" button — that mints per-agent keys. Paste the value for the agent this OpenClaw instance represents. |
| `defaultCompanyId` | optional | Used by `createIssue` when no `companyId` is passed |
| `defaultAgentId` | optional | Used by `createIssue` when no `assigneeAgentId` is passed |

## Build

```bash
pnpm install
pnpm build      # tsc -> dist/index.js
```

## Install (once OC accepts loose plugins via CLI)

```bash
openclaw plugins install ./
openclaw plugins enable paperclip-bridge
openclaw plugins inspect paperclip-bridge --runtime    # verify config
```

## Why this exists vs. the existing bridge

The Paperclip-side plugin already makes the round-trip work: PC creates an issue → bridged OC agent processes it → posts a comment + closes via PC API. That works because the bridge inlines each agent's API key into the wake message, and the agent uses raw fetch.

This OC-side plugin is the cleaner alternative: instead of every agent knowing the raw `/api/issues/.../comments` URL, it gets a typed `paperclip` tool the agent calls by name. Useful for:

- OpenClaw sessions that *aren't* PC-driven but still want to report into PC
- Agent code that's more maintainable than fetch boilerplate
- Future channel-plugin work (PC issues as OC channels)

## Files

```
.
├── openclaw.plugin.json    # manifest: id, configSchema, contracts.tools
├── package.json
├── tsconfig.json
├── src/
│   ├── index.ts            # entry: re-exports register()
│   └── plugin.ts           # tool implementation
└── skills/
    └── paperclip/
        ├── SKILL.md        # agent-facing usage docs
        └── manifest.json
```

## V2 roadmap

- Real install + test against a local OpenClaw instance
- Channel-plugin variant: surface PC issues as OC chat channels (`/paperclip <issueId>` to join)
- OC→PC push: hook session lifecycle to auto-create PC issues for long-running OC work

## Related

- **Paperclip side:** https://github.com/NazmulGit/paperclip-openclaw-bridge
- **OpenClaw upstream:** https://github.com/openclaw/openclaw
- **Paperclip upstream:** https://github.com/paperclipai/paperclip

## License

MIT — see [LICENSE](./LICENSE).
integration

Comments

Sign in to leave a comment

Loading comments...