Skip to content

Add OpenClaw to local apps#2185

Open
osolmaz wants to merge 9 commits into
huggingface:mainfrom
osolmaz:add-openclaw-local-app
Open

Add OpenClaw to local apps#2185
osolmaz wants to merge 9 commits into
huggingface:mainfrom
osolmaz:add-openclaw-local-app

Conversation

@osolmaz

@osolmaz osolmaz commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Add OpenClaw as a local app for tool-calling GGUF/MLX conversational models
  • Reuse the existing local OpenAI-compatible server step shared by Pi and Hermes
  • Configure OpenClaw via models.providers and set the selected local model as the default

Test plan

  • pnpm --filter @huggingface/tasks test -- local-apps
  • pnpm --filter @huggingface/tasks format:check
  • pnpm --filter @huggingface/tasks check

Note: assumes the OpenClaw local-app logo asset is already available for the openclaw app key.


Note

Low Risk
Additive snippet registry and tests only; no runtime or security-sensitive logic changes.

Overview
Adds OpenClaw as a local app option on model pages for tool-calling GGUF and MLX conversational models (same visibility rule as Pi and Hermes).

Generated snippets walk users through starting the shared local OpenAI-compatible server (llama-server or mlx_lm.server), running openclaw onboard with custom provider settings pointed at http://127.0.0.1:8080/v1, and a sample openclaw agent command. Provider id switches between llama-cpp and mlx-lm based on model type.

Vitest coverage asserts the GGUF and MLX snippet shapes, including that onboarding uses --auth-choice custom-api-key without emitting a --custom-api-key flag.

Reviewed by Cursor Bugbot for commit faa3f61. Bugbot is set up for automated code reviews on this repo. Configure here.

@pcuenca pcuenca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested the commands, but conceptually looks good.

@osolmaz

osolmaz commented May 28, 2026

Copy link
Copy Markdown
Member Author

I am now going through this extensively and asking Peter about the long-term stability of CLI args, thank you for bearing with me. I will ping again once I am 100% confident the snippets fit the long term shape

@osolmaz osolmaz marked this pull request as draft May 28, 2026 14:41
@osolmaz osolmaz force-pushed the add-openclaw-local-app branch 3 times, most recently from 1f3fda1 to 69682a5 Compare May 28, 2026 15:43
@osolmaz osolmaz force-pushed the add-openclaw-local-app branch from 082dded to 463d781 Compare May 28, 2026 15:54
@osolmaz osolmaz marked this pull request as ready for review May 29, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccd307c317

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/tasks/src/local-apps.ts Outdated
@osolmaz

osolmaz commented May 29, 2026

Copy link
Copy Markdown
Member Author

Current output of the snippets:

GGUF / llama.cpp:

# Install llama.cpp:
brew install llama.cpp

# Start a local OpenAI-compatible server:
llama-server -hf ggml-org/gemma-4-E4B-it-GGUF:Q4_K_M

# Install OpenClaw:
npm install -g openclaw@latest

# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
  --auth-choice custom-api-key \
  --custom-base-url http://127.0.0.1:8080/v1 \
  --custom-model-id "ggml-org/gemma-4-E4B-it-GGUF:Q4_K_M" \
  --custom-provider-id llama-cpp \
  --custom-compatibility openai \
  --custom-text-input \
  --accept-risk \
  --skip-health

openclaw agent --local --agent main --message "Hello from Hugging Face"

MLX:

# Install MLX LM:
uv tool install mlx-lm

# Start a local OpenAI-compatible server:
mlx_lm.server --model "mlx-community/Qwen3-0.6B-4bit"

# Install OpenClaw:
npm install -g openclaw@latest

# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
  --auth-choice custom-api-key \
  --custom-base-url http://127.0.0.1:8080/v1 \
  --custom-model-id "mlx-community/Qwen3-0.6B-4bit" \
  --custom-provider-id mlx-lm \
  --custom-compatibility openai \
  --custom-text-input \
  --accept-risk \
  --skip-health

openclaw agent --local --agent main --message "Hello from Hugging Face"

@osolmaz

osolmaz commented May 29, 2026

Copy link
Copy Markdown
Member Author

AFAIU test failures are unrelated to the changes proposed in this PR

@pcuenca pcuenca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The llama.app website was released after this was first reviewed. I would now favor using the one-liner installer (instead of brew) and llama serve (instead of llama-server), but I suggest we merge this now and then update for both OpenClaw and Hermes in a new PR.

What do you think @gary149?

@osolmaz

osolmaz commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Sounds good to me either way. The reason I wasn't pushing earlier was to make sure openclaw logo and other assets are in the hub repo

I don't know what would happen if we merge this before assets, enum values, etc. are added there. It wouldn't get added to the list of applications right away, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants