First-party app
Ollama Ollama

Ollama

Run prompts, chats and embeddings against your own Ollama server and manage its models.

stable AI & Machine LearningDeveloper Tools

About

Ollama ships in the w6w first-party pack. It declares 11 actions, 3 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.ollama
Version
0.1.2
Author
w6w
Licence
MIT
Categories
AI & Machine Learning · Developer Tools

Overview

Ollama runs open large language models on hardware you control, and this app talks to your own server: you give it the host, port and scheme when you connect, and it calls Ollama’s REST API directly. A workflow can generate text from a prompt, continue a chat conversation, produce embeddings, and ask for structured JSON that matches a schema, with images for vision models and sampling options such as temperature, seed and context size. It can also look after the server itself: list the installed and the currently loaded models, inspect one’s capabilities and context length, pull a new model, copy or delete one, and unload a model to free memory.

Because the server is yours, reachability is the part to get right. A LAN or localhost address works only when workflows run on the same network, through a self-hosted runner; hosted runs need a tunnel or a reverse proxy with a public hostname. Ollama listens on 127.0.0.1 unless started with OLLAMA_HOST=0.0.0.0, and has no authentication of its own, so the API key is optional and only sent when a proxy in front of the server needs one. Every call is non-streaming.

Build with Ollama

Three routes to the same 11 actions. The Workflow tab is generated from Ollama's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Chat with a model

chat

Send a conversation (a messages array) to a model on your Ollama server and get the assistant's reply as one result (non-streaming). Supports images, tools, JSON or JSON-Schema structured output, and sampling options. Ollama keeps no history: send all of it every time.

Create embeddings

embed

Turn text into embedding vectors with an embedding model on your Ollama server. Takes one string or a JSON array of strings and always returns a list of vectors.

Generate a completion

generate

Send a prompt to a model on your Ollama server and get the full response back as one result (non-streaming). Supports a system prompt, images for vision models, JSON or JSON-Schema structured output, and sampling options.

Copy a model

model-copy

Create a new name for an installed model on your Ollama server. The copy shares the original's data on disk, so it is nearly free. An existing destination name is overwritten.

Delete a model

model-delete

Permanently remove a model from your Ollama server's disk. Getting it back means pulling it again. A model that is not installed is an error, not a silent success.

List installed models

model-list

The models installed on your Ollama server (what is on disk, not what is loaded in memory), with size, digest, family, parameter size, quantization and capabilities.

Pull a model

model-pull

Download a model from the Ollama registry onto your server (non-streaming). The call does not return until the download finishes, which can take many minutes for a large model — a timeout does not necessarily stop the pull; check the model list before retrying.

List running models

model-running

The models currently loaded in memory on your Ollama server, with how much of each is in GPU memory and when it will be unloaded. Empty is normal when nothing was used recently.

Show a model

model-show

Details of an installed model: its Modelfile, parameters, prompt template, family, quantization, capabilities (completion, tools, vision, embedding, thinking) and architecture info such as the maximum context length.

Unload a model from memory

model-unload

Free a loaded model's memory on your Ollama server immediately instead of waiting for its keep-alive to expire. The model stays installed. Works for text-generation models.

Get server version

version

The version of the Ollama server this connection points at.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Ollama's real ids.

{
  "manifestVersion": "2",
  "name": "ollama-example",
  "steps": [
    {
      "id": "chat",
      "uses": {
        "app": "io.w6w.ollama",
        "action": "chat",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "model": "<model>",
        "messages": "<messages>"
      }
    }
  ]
}

Here are some of the things you can do

  • Chat with a model

    perform
    chat
  • Create embeddings

    perform
    embed
  • Generate a completion

    perform
    generate
  • Copy a model

    perform
    model-copy
  • List installed models

    read
    model-list

+6 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Ollama, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Ollama. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "chat",
  payload: {
    model: "<value>",
    messages: "<value>",
    // format: "<value>",
    // tools: "<value>",
    // think: "<value>",
    // temperature: "<value>",
    // seed: "<value>",
    // numPredict: "<value>",
    // numCtx: "<value>",
    // options: "<value>",
    // keepAlive: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action chat --payload '{"model":"<value>","messages":"<value>"}'

Give an AI agent Ollama — without giving it Ollama's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.ollama#chat",
    "input": {
      "model": "<model>",
      "messages": "<messages>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Ollama connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Ollama's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Ollama itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Ollama declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Ollama platform status

dependency

Ollama server reachable

Whether this connection's Ollama server answers GET /api/version. A free call: no model is loaded to answer it.

quota

Request headroom