Zing 论坛

正文

openclaw-openwebui-moss:在 Open WebUI 中集成 OpenClaw Moss AI 代理

这是一个生产级的 OpenClaw 插件,让 Moss AI 代理能够在 Open WebUI 中运行,提供安全的多代理路由、严格的访问控制和基于频道的工作流,适用于编辑、开发和运维场景。

Open WebUIOpenClawMossAI代理插件OpenAI兼容多代理自托管
发布时间 2026/04/22 23:46最近活动 2026/04/22 23:56预计阅读 5 分钟
openclaw-openwebui-moss:在 Open WebUI 中集成 OpenClaw Moss AI 代理
1

章节 01

openclaw-openwebui-moss: Bridging OpenWebUI and OpenClaw Moss AI Agents

This production-grade OpenClaw plugin integrates Moss AI agents into OpenWebUI, enabling safe multi-agent routing, strict access control, and channel-based workflows. It supports editing, development, and operations scenarios, with OpenAI compatibility and self-hosting capabilities.

2

章节 02

Background: OpenWebUI & OpenClaw Moss Ecosystems

OpenWebUI is a popular self-hosted LLM web interface with ChatGPT-like UX, running on private servers. OpenClaw is an emerging AI agent platform for creating/managing Moss agents (each with unique identities and capabilities). This plugin connects the two, allowing seamless use of Moss agents in OpenWebUI.

3

章节 03

Architecture: OpenAI Compatible Layer & Workflow

The plugin uses an OpenAI-compatible API layer. Workflow:

  1. OpenWebUI sends OpenAI API requests (GET /v1/models or POST /v1/chat/completions)
  2. Plugin loads Moss config from filesystem
  3. Builds prompt (IDENTITY.md + context files + user messages)
  4. Relays request to OpenClaw API
  5. Converts result to OpenAI format.

Model discovery: Dynamic from ~/.openclaw/workspace/moss-models/ — each folder is a model (folder name as model.id, IDENTITY.md required; loads .md/.txt files as context).

4

章节 04

Key Features & Integration Steps

Prompt Construction: Loads model folder → uses IDENTITY.md as system message → adds context files → combines with chat history. Optional Config: config.json in model folders sets agentId (default main) or maxContextBytes. Installation: Local dev (pnpm install/build, env vars like OPENCLAW_API_URL; Docker (compose up -d --build); embed in OpenClaw. OpenWebUI Integration: Add OpenAI connection (API URL to provider port, any API key) → Moss agents appear as models.

5

章节 05

Practical Application Scenarios

  1. Editing Teams: Moss agent for content review/editing with style guides.
  2. Dev Teams: Specialized agents (React, Python, security code review) with relevant docs.
  3. Ops Teams: Agent with runbooks/troubleshooting guides.
  4. Multi-Tenant: Isolate agents via model folders for different teams/projects.
6

章节 06

Security & Access Control

Security mechanisms:

  • File system isolation (per agent folders)
  • Config validation (skip invalid configs, log warnings)
  • Token authentication (OpenClaw Gateway Token)
  • On-request model loading (avoids automatic execution of malicious files).
7

章节 07

Limitations & Future Directions

Limitations: No streaming chat.completions; uses last user message only; simple context file拼接; no RAG/vector search; no tools/attachments. Future: Add streaming support; better long-dialogue context management; vector DB integration; tool calling.

8

章节 08

Conclusion: Value of the Bridge Project

openclaw-openwebui-moss is a well-designed bridge between OpenWebUI and OpenClaw ecosystems. Its file-driven model discovery, OpenAI-compatible layer, and flexible config make it a powerful AI agent management platform for teams using both tools.