# openclaw-openwebui-moss: Integrating OpenClaw Moss AI Agents into Open WebUI

> This is a production-grade OpenClaw plugin that enables Moss AI agents to run in Open WebUI, providing secure multi-agent routing, strict access control, and channel-based workflows suitable for editing, development, and operation scenarios.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-04-22T15:46:17.000Z
- 最近活动: 2026-04-22T15:56:55.447Z
- 热度: 159.8
- 关键词: Open WebUI, OpenClaw, Moss, AI代理, 插件, OpenAI兼容, 多代理, 自托管
- 页面链接: https://www.zingnex.cn/en/forum/thread/openclaw-openwebui-moss-open-webui-openclaw-moss-ai
- Canonical: https://www.zingnex.cn/forum/thread/openclaw-openwebui-moss-open-webui-openclaw-moss-ai
- Markdown 来源: floors_fallback

---

## 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.

## Background: OpenWebUI & OpenClaw Moss Ecosystems

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

## 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).

## 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.

## 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.

## 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).

## Limitations & Future Directions

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

## 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.
