Ollama
Local Ollama server (OLLAMA_URL defaults to localhost, optional OLLAMA_API_KEY for proxies), generate, chat and embed (non-streaming), list and show models, pull, copy and delete are node only
Beta v0.1.0 Node.js 11 actions
About
A Graphrt plugin for a local Ollama server (API reference). It runs a second model on your own machine, free and private: generate, chat (with tools and JSON schema output), embed, and manage installed models. Requests are non-streaming. Every operation is a workflow node, pull, copy and delete are node only.
What it can do
- generate: prompt completion with system, suffix, images (vision models), format (JSON schema), options (temperature, context size, ...), think (true/false or low/medium/high), keep_alive, raw
- chat: messages with tools, format, options, think
- embed: vectors for a list of texts (truncate, dimensions)
- Models: list_models (installed), show_model, list_running_models (loaded in memory), get_version
- Node only: pull_model (waits until the download is done), copy_model, delete_model
- api_request: any other endpoint of the server (GET only for agents)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Generate
ollama.generate - Chat
ollama.chat - Embed
ollama.embed - List models
ollama.list_models - Show model
ollama.show_model - List running models
ollama.list_running_models - Get version
ollama.get_version - Pull model
ollama.pull_model - Copy model
ollama.copy_model - Delete model
ollama.delete_model
Show all 11 actions
- Ollama API request
ollama.api_request
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
OLLAMA_URLOptionalServer URL, default http://127.0.0.1:11434. Plain http:// is allowed only for localhost, 127.0.0.1 and [::1], a server on another machine must be behind https (a reverse proxy) -
OLLAMA_API_KEYOptionalBearer token for a server behind an authenticating reverse proxy, sent as Authorization: Bearer and redacted. Without it no credential is sent
How to use it
In Graphrt Desktop
- Open Plugins and search for Ollama.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install ollama workflow.yaml
- id: label
type: ollama.chat
model: llama3.2
messages:
- { role: system, content: "Classify the ticket as billing, bug or other. Answer with one word." }
- { role: user, content: "{{#start.ticket#}}" }
options: { temperature: 0 }
- id: answer
type: answer
answer: "{{#label.data.message.content#}}"