[GH-ISSUE #15976] Add paperclip to ollama launch integrations #87862

Open
opened 2026-05-10 06:27:55 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @HKTITAN on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15976

Proposal

Add Paperclip (github.com/paperclipai/paperclip) as a first-class integration of ollama launch, alongside the existing Codex / OpenCode / Droid / Claude / VS Code / Copilot / Cline / Hermes / Kimi / Openclaw / Pi / Poolside entries.

Paperclip is a control plane for AI-agent companies (multi-agent orchestration, runs, heartbeats, approvals). It already supports many coding-agent runtimes; with the just-merged PR below it now ships a first-class ollama_local adapter that drives Ollama's /api/chat directly with native tool calling. So ollama launch paperclip is the natural completion of the integration loop.

Companion (already open)

  • Paperclip-side: paperclipai/paperclip#5249 — adds @paperclipai/adapter-ollama-local, with local + Ollama Cloud support (OLLAMA_API_KEY Bearer auth), model install/delete/show helpers via /api/pull etc., and 17/17 existing server-registry tests passing with the new adapter slotted in.

Reference implementation

Modeled directly on cmd/launch/codex.go. Full file content + registry diff + smoke test:

paperclipai/paperclip → docs/integrations/ollama/launch-paperclip.go.md

Sketch:

// cmd/launch/paperclip.go
package launch

import (
    "fmt"
    "os"
    "os/exec"
    "github.com/ollama/ollama/envconfig"
)

type Paperclip struct{}

func (p *Paperclip) String() string { return "Paperclip" }

func (p *Paperclip) Run(model string, args []string) error {
    if _, err := exec.LookPath("paperclipai"); err != nil {
        return fmt.Errorf("paperclip is not installed, install with: npm install -g paperclipai")
    }
    cmd := exec.Command("paperclipai",
        append([]string{"onboard", "--bind", "loopback", "-y", "--run"}, args...)...)
    cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
    env := append(os.Environ(),
        "OLLAMA_HOST="+envconfig.Host().String(),
        "PAPERCLIP_DEFAULT_ADAPTER=ollama_local",
    )
    if model != "" {
        env = append(env, "PAPERCLIP_DEFAULT_MODEL="+model)
    }
    cmd.Env = env
    return cmd.Run()
}

Plus a paperclip entry in integrationSpecs (registry.go) with npm install -g paperclipai as the install command.

Why issue-first

I'm filing as an issue rather than a drive-by PR so maintainers can signal direction first — happy to:

  1. Write the PR exactly to this shape, or
  2. Switch to the Editor-style pattern that Droid / OpenCode use (writing config to ~/.paperclip/...), or
  3. Adjust naming / aliases / install commands per maintainer preference.

Whichever you'd like — just say the word and I'll open the PR.

Tested with

  • Local: qwen2.5-coder:14b, qwen2.5-coder:32b, gpt-oss:20b
  • Cloud: gpt-oss:120b (with OLLAMA_API_KEY)

The Paperclip adapter validates that the chosen model has tools capability via /api/show before running.

cc — happy to iterate. Thanks for ollama launch; the registry pattern made this straightforward to slot into.

Originally created by @HKTITAN on GitHub (May 5, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15976 ### Proposal Add Paperclip ([github.com/paperclipai/paperclip](https://github.com/paperclipai/paperclip)) as a first-class integration of `ollama launch`, alongside the existing Codex / OpenCode / Droid / Claude / VS Code / Copilot / Cline / Hermes / Kimi / Openclaw / Pi / Poolside entries. Paperclip is a control plane for AI-agent companies (multi-agent orchestration, runs, heartbeats, approvals). It already supports many coding-agent runtimes; with the just-merged PR below it now ships a first-class `ollama_local` adapter that drives Ollama's `/api/chat` directly with native tool calling. So `ollama launch paperclip` is the natural completion of the integration loop. ### Companion (already open) - Paperclip-side: [paperclipai/paperclip#5249](https://github.com/paperclipai/paperclip/pull/5249) — adds `@paperclipai/adapter-ollama-local`, with local + Ollama Cloud support (`OLLAMA_API_KEY` Bearer auth), model install/delete/show helpers via `/api/pull` etc., and 17/17 existing server-registry tests passing with the new adapter slotted in. ### Reference implementation Modeled directly on [`cmd/launch/codex.go`](https://github.com/ollama/ollama/blob/main/cmd/launch/codex.go). Full file content + registry diff + smoke test: [paperclipai/paperclip → docs/integrations/ollama/launch-paperclip.go.md](https://github.com/paperclipai/paperclip/blob/feat/ollama-adapter/docs/integrations/ollama/launch-paperclip.go.md) Sketch: ```go // cmd/launch/paperclip.go package launch import ( "fmt" "os" "os/exec" "github.com/ollama/ollama/envconfig" ) type Paperclip struct{} func (p *Paperclip) String() string { return "Paperclip" } func (p *Paperclip) Run(model string, args []string) error { if _, err := exec.LookPath("paperclipai"); err != nil { return fmt.Errorf("paperclip is not installed, install with: npm install -g paperclipai") } cmd := exec.Command("paperclipai", append([]string{"onboard", "--bind", "loopback", "-y", "--run"}, args...)...) cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr env := append(os.Environ(), "OLLAMA_HOST="+envconfig.Host().String(), "PAPERCLIP_DEFAULT_ADAPTER=ollama_local", ) if model != "" { env = append(env, "PAPERCLIP_DEFAULT_MODEL="+model) } cmd.Env = env return cmd.Run() } ``` Plus a `paperclip` entry in `integrationSpecs` (registry.go) with `npm install -g paperclipai` as the install command. ### Why issue-first I'm filing as an issue rather than a drive-by PR so maintainers can signal direction first — happy to: 1. Write the PR exactly to this shape, or 2. Switch to the `Editor`-style pattern that `Droid` / `OpenCode` use (writing config to `~/.paperclip/...`), or 3. Adjust naming / aliases / install commands per maintainer preference. Whichever you'd like — just say the word and I'll open the PR. ### Tested with - Local: `qwen2.5-coder:14b`, `qwen2.5-coder:32b`, `gpt-oss:20b` - Cloud: `gpt-oss:120b` (with `OLLAMA_API_KEY`) The Paperclip adapter validates that the chosen model has `tools` capability via `/api/show` before running. cc — happy to iterate. Thanks for `ollama launch`; the registry pattern made this straightforward to slot into.
Author
Owner

@HKTITAN commented on GitHub (May 5, 2026):

Opened PR with the proposed implementation: ollama/ollama#15977

Includes cmd/launch/paperclip.go, paperclip_test.go, and the registry entry. Patterned on claude.go / codex.go (simple Runner that spawns a Node CLI; reuses the existing ensureNpmInstalled() and ConfirmPrompt() helpers).

Happy to refactor to the Editor-style pattern that Droid / OpenCode / Pi use if maintainers prefer that — just say the word.

<!-- gh-comment-id:4377147901 --> @HKTITAN commented on GitHub (May 5, 2026): Opened PR with the proposed implementation: ollama/ollama#15977 Includes `cmd/launch/paperclip.go`, `paperclip_test.go`, and the registry entry. Patterned on `claude.go` / `codex.go` (simple Runner that spawns a Node CLI; reuses the existing `ensureNpmInstalled()` and `ConfirmPrompt()` helpers). Happy to refactor to the `Editor`-style pattern that Droid / OpenCode / Pi use if maintainers prefer that — just say the word.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#87862