Skip to content

[Feature]: Add auto-discovered Ollama inference on nodes #99228

Description

@steipete

Summary

Let agents delegate short, fast inference tasks to chat-capable models installed on a paired OpenClaw node, with local models auto-discovered from Ollama.

Problem to solve

An agent connected to a capable desktop or server node cannot currently discover and use that machine's local models. Existing Ollama provider support assumes the Gateway can reach Ollama directly, while the existing llm-task tool runs a Gateway-configured model. Neither path provides node-owned, loopback-only local inference.

Proposed solution

Extend the bundled Ollama plugin with two safe node-host commands and one agent tool:

  • ollama.models discovers local models from Ollama's loopback API, filters cloud and embedding-only rows, and ranks loaded models first.
  • ollama.chat validates an exact discovered model and runs bounded, non-streaming chat on the node.
  • node_inference lets agents discover capable paired nodes and run a selected model through the existing authenticated Gateway/node connection.

Keep core plugin-agnostic by using the existing plugin node-host command, node invoke policy, and runtime node APIs. Do not add a new protocol or configuration surface.

Alternatives considered

  • Configure Ollama as the Gateway's main model provider. This requires Gateway-to-Ollama network access and changes the agent's primary model rather than delegating a small task.
  • Use node exec to call Ollama. This exposes shell execution, lacks typed discovery and filtering, and makes the agent parse provider-specific output.
  • Build a new core local-inference protocol. Existing plugin and node seams already carry the required command and result shapes.

Related prior request #2838 concerned first-class local providers on the Gateway; this request is specifically node-owned inference over an already-paired node connection.

Impact

  • Affected: users with Ollama models on a desktop or server node.
  • Severity: workflow blocker for keeping fast helper inference local to the node.
  • Frequency: every attempted delegated local-model task.
  • Consequence: today users must expose Ollama to the Gateway network or use shell workarounds.

Evidence/examples

Expected agent workflow:

  1. Discover local models on connected nodes.
  2. Select a loaded or small model.
  3. Run a bounded prompt and receive response, token usage, and timing metadata.

The implementation should prove the real Gateway to paired-node to Ollama path, not only mocked HTTP calls.

Additional information

Ollama's standard node-local endpoint is http://127.0.0.1:11434. Node inference should not reuse remote or cloud Ollama provider configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.maintainerMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions