paperclip-ollama-adapter-mavwu
v1.0.10
Published
Paperclip external adapter for Ollama and local LLMs
Maintainers
Readme
Paperclip Ollama Adapter
Paperclip external adapter package for running Paperclip agents through Ollama's OpenAI-compatible API.
Package name:
paperclip-ollama-adapter-mavwuArchitecture
Paperclip agent/task
-> Paperclip external adapter
-> Ollama OpenAI-compatible endpoint
-> Ollama model
-> response returned to PaperclipThe adapter posts chat completions to:
http://localhost:11434/v1/chat/completionsPaperclip Contract
The package root exports the metadata and server factory Paperclip expects:
typelabelmodelsagentConfigurationDoccreateServerAdapter
createServerAdapter() returns:
typeexecutetestEnvironmentmodelsagentConfigurationDoc
For Paperclip's npm/upload install path, the package also declares:
{
"paperclipPlugin": {
"manifest": "./dist/manifest.js"
}
}The manifest module ships in the published tarball and points Paperclip at the adapter's createServerAdapter export.
Adapter type: ollama_local
Adapter label: Ollama Local
Models
Built-in model choices:
qwen2.5-coder:1.5bnemotron-3-super:cloudqwen2.5-coder:7bllama3.1:8bcodellama:7bmistral:7b
You can still use any Ollama model by setting MODEL.
Configuration
Create a .env file or provide values through Paperclip adapter config:
BASE_URL=http://localhost:11434/v1
API_KEY=ollama
MODEL=qwen2.5-coder:1.5b
TEMPERATURE=0.7
MAX_TOKENS=2048
SYSTEM_PROMPT=You are operating as the Paperclip agent named in the run context. Stay in that agent role for company, task, and chat interactions, including when the user asks about your role. Treat the latest user request or wake comment as the current instruction. Use older task, issue, and conversation context only as background unless the latest request explicitly asks you to revisit it. Be direct, practical, and truthful. Do not claim that you used tools, edited files, ran commands, contacted services, or changed Paperclip state unless the run context or adapter result actually did that. If the task is simple and complete, give the final answer clearly. If the task cannot be completed from the available context, say what is missing or what is blocked instead of inventing results. Do not claim to be the underlying model, runtime, adapter, Ollama, or Paperclip internals unless the user specifically asks about implementation details. Respond with the final useful answer only.
AUTO_MARK_DONE=true
PAPERCLIP_BASE_URL=http://127.0.0.1:3100
ENABLE_PAPERCLIP_ACTIONS=truePaperclip config can use either uppercase keys or camelCase keys, for example BASE_URL or baseUrl, MAX_TOKENS or maxTokens.
Successful adapter runs mark the touched Paperclip issue done by default. Set AUTO_MARK_DONE=false for multi-step work where the issue should remain open, blocked, in review, or continue through another run.
When ENABLE_PAPERCLIP_ACTIONS=true, the adapter can use Paperclip's local API to inspect visible company agents and create assigned follow-up tasks for explicit delegation requests, as well as create new agents for hiring requests (e.g., 'hire a CTO'). This lets prompts like 'tell CTO to review this' become an actual Paperclip task, and prompts like 'hire a CTO' create a new agent in your company.
Local Development
Install dependencies:
npm installBuild:
npm run buildRun the local Ollama integration test:
npm testThe test sends a prompt through execute() and expects Ollama to be running with the configured model available.
Verify package exports:
node -e "import('./dist/index.js').then(m => console.log(Object.keys(m)))"Expected keys include:
type
label
models
agentConfigurationDoc
createServerAdapterVerify the server adapter object:
node -e "import('./dist/index.js').then(m => console.log(m.createServerAdapter()))"Expected object includes:
type
execute
testEnvironment
models
agentConfigurationDocVerify the plugin manifest export:
node -e "import('./dist/manifest.js').then(m => console.log(m.default ?? m.manifest))"Publish
After validating locally:
npm version patch
npm publishInstall this adapter in Paperclip using:
paperclip-ollama-adapter-mavwuOn Windows, if local-path installation fails with Received protocol 'c:', use the npm package route or upgrade Paperclip to a build that converts Windows paths with pathToFileURL() before ESM import.
Troubleshooting
- Start Ollama with
ollama serve. - Confirm
BASE_URLpoints to the OpenAI-compatible/v1endpoint. - Confirm the configured model is available with
ollama list. - Pull a missing model with
ollama pull <model-name>.
License
MIT
