Skip to content
/

MateClaw

mateclaw · matevip/mateclaw · ★ 512 · last commit 2026-05-26

Enterprise multi-agent server platform: always-on, multi-vendor failover, RBAC, approval gates, audit trail, and 8 IM channel adapters in a single Spring Boot JAR.

Best whenAI agents should be organization infrastructure with RBAC, audit trails, and multi-vendor failover — not a developer laptop tool that fails when the primary …
Skip ifSingle-vendor AI dependency, Single-user agent deployments for team use
vs seeds
claude-flowin scope (multi-agent, MCP, memory/knowledge system) but operates as a background-daemon server (Spring Boot + MySQL) ra…
Primitive shape 8 total
Skills 8
00

Summary

MateClaw — Summary

MateClaw is a Spring Boot 3.5 / Java 21 multi-agent harness platform designed for organizational deployment — not single-user hacking. Built by the matevip team, it ships as a single JAR with an embedded Vue 3 admin SPA, Electron desktop binaries with bundled JRE 21, an embeddable webchat widget, and eight IM channel adapters (DingTalk, Feishu, WeChat Work, WeChat, Telegram, Discord, QQ, Slack). The architecture centers on Digital Employees (ReAct + Plan-and-Execute agents backed by a Spring AI Alibaba StateGraph runtime) with RBAC per agent, per model, and per tool; an approval gate for sensitive tool calls; a full audit trail; and a runtime console for live visibility into all running agents. MateClaw's multi-vendor failover (chain with health tracker and cooldown window) is explicitly designed to handle API outages: when the primary provider returns 401, the next healthy provider picks up mid-sentence. Business orchestration in 1.3.0+ adds Workflows (7-step-mode linear DSL), Triggers (6 pattern types: cron/webhook/channel_message/agent_lifecycle/content_match/workflow_completion), and a LLM Wiki with citation-linked pages and a Transformations engine.

differs_from_seeds: MateClaw is closest to claude-flow in scope (MCP integration, multi-agent, rich memory/knowledge systems) but runs on the JVM with enterprise-grade access control absent from all seeds. Unlike claude-flow's file-based tasks.json or BMAD's persona-md files, MateClaw defines agents as Spring Boot service beans with role/goal/backstory and manages them via a web admin console. The Workflow DSL, 8-channel IM adapters, RBAC, per-agent model binding, and "always-on" philosophy (one JAR deployed as a server, not a CLI run on demand) distinguish it from every seed in the corpus.

01

Overview

MateClaw — Overview

Origin

MateClaw is developed by matevip (GitHub: matevip/mateclaw). The README explicitly contrasts it with single-user tools:

"Other personal AI agents are built for one person. MateClaw is the one your IT department can actually sign off on."

The project emerged as the enterprise-ready counterpart to OpenClaw, targeting organizations (Spring Boot shops) that need RBAC, approval flows, audit trails, and multi-instance deployment.

Philosophy

Three core differentiation claims (from README):

1. Multi-vendor failover:

"Primary key expired. Vendor returns 401. Network blip. Quota drained. Other tools hand you a red error card. MateClaw routes to the next healthy provider — DashScope, OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Ollama, LM Studio, MLX, 14+ in total — and the user sees the reply finish."

2. Knowledge that links itself:

"MateClaw's LLM Wiki digests [raw materials] into structured pages, builds [[links]] between them, and remembers where every sentence came from. Click a citation, see the exact source chunk."

3. One product, five surfaces:

"Web Console, Desktop (Electron), Webchat Widget, IM Channels, Plugin SDK. Same brain. Same memory. Same tools. Different doors."

The "Always-On" Position

MateClaw is a server — always running, deployed as infrastructure. This is the central "always-on" boundary in this batch: MateClaw doesn't start when you run a command; it runs continuously and handles incoming IM messages, webhook triggers, cron jobs, and workflow events regardless of whether a user is at their keyboard.

The AI-as-Infrastructure Framing

"On March 2, 2026, Claude went dark for 4 hours across API, web, and mobile. Three weeks later, another 5 hours. Every company that bet their AI strategy on a single vendor spent those outages staring at red error cards... MateClaw is that layer — built the Spring Boot way."

Five Career Templates

Digital Employee career templates shipped:

  1. Product Researcher
  2. Customer Support
  3. Knowledge Curator
  4. Data Analyst
  5. Executive Assistant
02

Architecture

MateClaw — Architecture

Distribution

  • Type: Spring Boot JAR + Electron desktop binary
  • License: Apache-2.0
  • Backend runtime: Java 21+
  • Frontend: Vue 3 + TypeScript (built into server JAR)
  • Database: MySQL (production), H2 (dev — auto-selected)
  • Schema management: Flyway (auto-heals on upgrade)

Install Options

# Maven (backend)
cd mateclaw-server && mvn spring-boot:run  # http://localhost:18088

# Frontend (dev)
cd mateclaw-ui && pnpm install && pnpm dev  # http://localhost:5173

# Docker
cp .env.example .env && docker compose up -d  # http://localhost:18080

# Desktop
# Download Electron binary with bundled JRE 21 from GitHub Releases

Project Structure

mateclaw/
├── mateclaw-server/        # Spring Boot 3.5 backend
│   └── src/main/java/vip/mate/
│       ├── agent/          # AgentService, AgentState, BaseAgent, StateGraph
│       ├── skill/          # Skill installer, manifest, lessons, runtime
│       ├── workflow/       # Workflow DSL (7 step modes)
│       ├── trigger/        # 6 trigger pattern types
│       ├── channel/        # 8 IM channel adapters
│       ├── wiki/           # LLM Wiki with citations + Transformations
│       ├── memory/         # Memory lifecycle (extraction, consolidation, dreaming)
│       ├── tool/           # Tool registry with RBAC + approval
│       ├── audit/          # Full audit trail
│       └── mcp/            # MCP client (stdio, SSE, Streamable HTTP)
├── mateclaw-ui/            # Vue 3 admin SPA
├── mateclaw-webchat/       # Embeddable widget (UMD/ES)
├── mateclaw-plugin-api/    # Java SDK for third-party plugins
└── mateclaw-plugin-sample/ # Reference plugin

Tech Stack

Layer Technology
Backend Spring Boot 3.5, Spring AI Alibaba, StateGraph runtime
Agent reasoning ReAct + Plan-and-Execute
Frontend Vue 3, TypeScript
Desktop Electron + bundled JRE 21
Database MySQL / H2
Schema Flyway
Auth JWT + RBAC + Personal Access Tokens
Observability Spring Boot Actuator

Provider Failover

Health tracker monitors 14+ LLM providers. Bad providers enter a cooldown window. Routing order configurable via drag-and-drop in Settings → Models.

03

Components

MateClaw — Components

Digital Employees (Agents)

Each "Digital Employee" has:

  • Role — job title/function
  • Goal — what they optimize for
  • Backstory — personality and context
  • Avatar — pixel-art image + color
  • Career template — one of 5 built-in types

Reasoning modes: ReAct (iterative tool-calling) or Plan-and-Execute (decompose → execute steps).

Skills System

  • Format: SKILL.md manifest + prompt + tool list + LESSONS.md
  • LESSONS.md: Grows smarter with use — records learnings from each skill invocation
  • 8 starter templates included
  • 5-step creation wizard in the UI
  • Pre-flight checks: validation before install (missing deps flagged)
  • Per-employee binding (1.3.0+): tool installed for one employee doesn't bleed to others

MCP Integration

  • Protocols: stdio, SSE, Streamable HTTP
  • Per-employee MCP binding (1.3.0+)

ACP (Agent Communication Protocol)

  • Brings Claude Code, Codex, etc. as "employees" via ACP adapter
  • Auto-bridged to skill cards with wrapper tools

IM Channel Adapters (8)

DingTalk, Feishu, WeChat Work, WeChat, Telegram, Discord, QQ, Slack

Workflow DSL (7 step modes)

Mode Description
sequential Ordered execution
fan_out Parallel dispatch to multiple employees
collect Aggregate results from fan_out
conditional Branch on condition
await_approval Pause for human approval
dispatch_channel Send result to IM channel
write_memory Write directly to employee's MEMORY.md

JSON-first authoring with Monaco + schema validation, or natural-language → draft generation.

Triggers (6 types)

cron / webhook / channel_message / agent_lifecycle / content_match / workflow_completion

Default-on governance: dedup, per-trigger rate limit, bot-self filter, recursion guard, fail-closed unknown patterns.

LLM Wiki + Transformations

  • Raw materials (PDFs, markdown, scraped pages) digested into linked wiki pages with citations
  • Hot cache auto-injects relevant pages into system prompts
  • Transformations engine (1.3.0+): user-authored templates run against wiki content; cross-material map-reduce; JSON output mode; per-template model picker

Memory Lifecycle

  • Post-conversation extraction
  • Scheduled consolidation
  • Dreaming workflows
  • write_memory workflow step
  • Memory files: AGENTS.md, SOUL.md, PROFILE.md, MEMORY.md, daily notes

Admin Runtime Console

Real-time visibility: who's running, what step, token counts, force-recycle in one click.

Document Generation Tools

DocxRenderTool, XlsxRenderTool, PptxRenderTool, PdfRenderTool — render Markdown to Office files inside the JVM (no subprocess, no Office install).

Tool Guard

RBAC + approval flow + path protection. Per-employee tool binding.

Multimodal

Text-to-speech, speech-to-text, image, music, video, 3D. Sidecar routing: text-only main model + image attachment → vision sidecar describes → main model answers.

05

Prompts

MateClaw — Prompts

Prompt Architecture

MateClaw's agent prompts are assembled from:

  1. Employee Role + Goal + Backstory (configured in admin UI)
  2. Skills (SKILL.md content + LESSONS.md learnings)
  3. LLM Wiki hot cache (relevant pages auto-injected)
  4. Workspace memory files (SOUL.md, PROFILE.md, MEMORY.md)
  5. Tool descriptions (auto-generated from Tool Guard registry)

Verbatim Excerpt 1 — Digital Employee Model (from README)

Each one has a Role, a Goal, a Backstory, a pixel-art avatar, and a color of their 
own — five career templates ship ready:
- Product Researcher
- Customer Support  
- Knowledge Curator
- Data Analyst
- Executive Assistant

ReAct drives iterative reasoning, Plan-and-Execute decomposes complex multi-step 
work, employees can delegate to one another in parallel.

Technique: Role-Goal-Backstory is a classic crew-AI persona pattern. The career templates pre-fill the most common Role+Goal+Backstory combinations — analogous to BMAD's persona pattern but configured via admin UI rather than persona-md files.

Verbatim Excerpt 2 — LESSONS.md Skill Evolution (from README)

SKILL.md packages — manifest + prompt + tool list + LESSONS.md (gets smarter the 
more you use it). Eight starter templates plus a five-step creation wizard, with 
Pre-flight checks that tell you what's missing before install.

Technique: The LESSONS.md file attached to each skill is a living prompt update mechanism. Each successful skill invocation can append a new lesson to LESSONS.md, which is included in future skill prompts. This is adaptive prompt evolution — the skill's effective instructions grow richer with use without requiring a human to edit them.

Verbatim Excerpt 3 — Tool Guard (approval prompt)

The Tool Guard generates an approval notification to admins when a sensitive tool is called. The approval prompt includes: tool name, calling employee, parameters, risk level, and context. This is a structured gate prompt rather than a free-text clarification.

LLM Wiki as Context Injection

The hot cache injects wiki pages relevant to the current conversation into the employee's system prompt automatically. This is passive-retrieval context injection: no user command needed; the system decides what knowledge is relevant.

09

Uniqueness

MateClaw — Uniqueness

differs_from_seeds

MateClaw is closest to claude-flow in scope (multi-agent, MCP, rich memory) but operates on a completely different stack and boundary. claude-flow is a developer tool (npm package, SQLite, file-based) used from the terminal; MateClaw is an organizational server (Spring Boot JAR, MySQL, Flyway) that runs continuously and handles incoming events from IM channels. The "always-on" execution mode (background-daemon waiting for IM messages, webhooks, and cron jobs) is architecturally absent from all 11 seeds — every seed is a tool you invoke, whereas MateClaw is infrastructure you deploy. The 14-provider failover chain with health tracker and cooldown is the most production-hardened availability story in this batch. The RBAC+approval-gate+audit-trail combination, the 8 IM channel adapters, the Workflow DSL with await_approval steps, and the Java/Spring Boot runtime make MateClaw the most enterprise-aligned framework in the entire corpus. The LESSONS.md adaptive skill evolution is also not present in any seed.

Positioning

MateClaw positions itself as the AI platform for "the IT department" — the answer to "we need RBAC, approval workflows, multi-user isolation, a full audit trail, and the ability to survive a provider outage" in the same conversation.

Observable Failure Modes

  • Setup complexity: Java 21 + Spring Boot + MySQL + optionally Docker — more infrastructure than any seed
  • Small community: 512 stars vs OpenClaw's larger community (explicitly acknowledged in README)
  • Chinese-first origin: README, architecture docs, and issue tracker may be Chinese-language primary
  • Enterprise features require deployment: This is not a laptop tool — you need a server, a database, and network access for full functionality
  • No CLI dev workflow: Engineers accustomed to claude or codex commands will find the admin UI + IM-channel-based workflow unfamiliar
  • SKILL.md licenses: Proprietary licenses on document skills (inherited from similar projects)
04

Workflow

MateClaw — Workflow

Deployment Workflow (once)

Step Description Artifact
1. Deploy docker compose up -d or mvn spring-boot:run Running service
2. Login admin / admin123 JWT session
3. Configure models Settings → Models: add providers, drag priority order Provider chain
4. Create Digital Employees Name, role, goal, backstory, career template Agent configs
5. Bind tools Assign skills, MCP servers, ACP agents per employee Tool registry
6. Connect IM channels Configure DingTalk/Feishu/Slack/etc. Channel adapters
7. Create Workflows Monaco DSL or natural-language generation Workflow definitions
8. Configure Triggers Cron, webhook, content_match, etc. Trigger configs

Per-Conversation Workflow

Step Description
1. Incoming message Via IM channel, webchat widget, or API
2. Trigger evaluation Matches trigger pattern → routes to employee or workflow
3. Tool Guard Sensitive tool calls paused for approval
4. ReAct loop Agent thinks → calls tools → observes → repeats
5. Memory extraction Post-conversation facts extracted and stored
6. Streaming reply Staged output (thinking / tool / answer) via SSE

Approval Gates

  • Tool Guard: Configurable per-tool — blocks execution, notifies admin, waits for approval
  • Workflow await_approval step: Pauses workflow execution for human review
  • Admin Runtime Console: Force-recycle stuck agents

Cron + Scheduled Workflows

Triggers of type cron fire on schedule. Distributed cron lock prevents double-firing in multi-instance deployments.

Phase-to-Artifact Map

Phase Artifact
Workflow execution Structured results per step
Memory consolidation Updated MEMORY.md
Wiki Transformation New wiki pages with citations
Audit Immutable audit log entries
06

Memory Context

MateClaw — Memory & Context

Multi-Tier Memory Architecture

Tier Storage Description
Conversation context In-memory (Spring AI Alibaba StateGraph) Live conversation state
Workspace memory AGENTS.md, SOUL.md, PROFILE.md, MEMORY.md Per-employee markdown files
Daily notes memory/YYYY-MM-DD.md Auto-generated daily summaries
LLM Wiki Database + vector/citation index Structured knowledge with linked pages + citations
Audit log Database (MySQL) Immutable operational record

Memory Lifecycle

  1. Post-conversation extraction: After each conversation, facts are extracted and stored in the employee's memory files
  2. Scheduled consolidation: Periodic job consolidates daily notes into MEMORY.md
  3. Dreaming workflows: Workflow steps that mine recent conversations for insights
  4. write_memory step: Workflows can directly write to MEMORY.md via a dedicated step mode

LLM Wiki

  • Raw material ingestion: PDFs, markdown, scraped pages
  • Digest into wiki pages with [[links]] between them
  • Per-sentence source citations
  • Hot cache: relevant pages auto-injected into system prompt
  • Transformations engine (1.3.0+): templates run against wiki content; cross-material map-reduce; JSON output

Context Management

  • Dynamic context pruning: Stale content pruned from long conversations
  • Smart truncation: Oldest, least-relevant content dropped first
  • Sidecar routing: Text-only main model + image attachment → vision sidecar describes the image → main model answers

Persistence

All memory files are stored in the database (MySQL/H2) — not in the filesystem like the seed frameworks. This enables multi-user access, RBAC, and multi-instance deployment where all replicas share the same memory store.

Context Compaction

The README mentions "Dynamic context pruning, smart truncation, stale-stream cleanup." No explicit compaction step visible in the public API.

07

Orchestration

MateClaw — Orchestration

Multi-Agent: Digital Employee Delegation

Employees can delegate to one another in parallel. The Workflow DSL's fan_out step dispatches to multiple employees simultaneously; collect aggregates their results.

No formal orchestrator role — the Workflow itself is the orchestrator.

Orchestration Pattern

parallel-fan-out via Workflow DSL (fan_out + collect), plus sequential and conditional step modes.

StateGraph Runtime

Spring AI Alibaba's StateGraph provides the underlying execution engine. Agent state (ReAct loop step, tool calls, results) is tracked in the StateGraph.

Execution Mode

Background daemon — MateClaw is always running as a Spring Boot service. Tasks arrive via:

  • Incoming IM messages (Feishu, Slack, WeChat, DingTalk, Discord, QQ, Telegram)
  • Webhook triggers
  • Cron triggers
  • Workflow completion triggers
  • Content match triggers
  • Agent lifecycle events

This is the "always-on" boundary: MateClaw never stops; it waits for events.

Multi-Model

Yes — 14+ providers with chain failover:

  • Primary providers: Anthropic Claude, OpenAI, Gemini, DeepSeek, Kimi
  • Failover chain: DashScope (Qwen), Ollama, LM Studio, MLX
  • Health tracker: bad providers enter cooldown window
  • Per-employee model binding (different employees can use different models)
  • Per-template model picker in Wiki Transformations

Multi-Agent Isolation

No git-worktree isolation. Each employee's tool binding is isolated (per-employee binding 1.3.0+). Tool Guard provides approval-gate isolation for sensitive operations.

Approval Gate

Tool Guard: configurable per tool, per employee. Sensitive calls pause execution, notify admin, wait for approval. This is the production-grade safety mechanism: not just "ask the user" but a formal approval workflow tracked in the audit log.

Consensus Mechanism

None formally. Multi-agent coordination is via Workflow DSL + shared memory (LLM Wiki).

Scheduling

Distributed cron lock prevents double-firing in multi-instance deployments (important for production HA setups).

08

Ui Cli Surface

MateClaw — UI / CLI Surface

Web Console

Full admin panel at http://localhost:18088 (dev) or http://localhost:18080 (Docker):

  • Digital employee management (create/configure/monitor)
  • Model provider configuration + health dashboard
  • Skills management (install/create/LESSONS.md editing)
  • MCP server configuration
  • Workflow authoring (Monaco DSL editor + natural-language generation)
  • Trigger configuration
  • Admin Runtime Console: live view of all running employees, force-recycle
  • Settings: System, Models, Security, channels

Desktop App (Electron)

  • Windows + macOS Electron binary with bundled JRE 21
  • No Java installation required
  • Same full admin UI served from local Electron process

Webchat Widget

One <script> tag embed — drop it on any website.

IM Channels (8)

DingTalk, Feishu, WeChat Work, WeChat, Telegram, Discord, QQ, Slack — employees respond to messages in these channels.

CLI

No dedicated CLI binary. The admin UI and the IM channels are the primary interfaces.

API

Spring Boot REST API for programmatic access. Personal Access Tokens (PATs) for headless scripts and CI.

Observability

  • Spring Boot Actuator health monitoring
  • Admin Runtime Console: real-time agent status, token counts, step tracking
  • Full audit trail (HMAC-SHA-256 outbound webhook signing, database-stored)
  • Distributed cron lock prevents double-fire

Port

Default: 18088 (dev backend), 5173 (dev frontend), 18080 (Docker production)

Related frameworks

same archetype · same primary tool · same memory type

claude-mem (thedotmack) ★ 78k

Background worker service captures every tool call as an observation, AI-compresses sessions, and auto-injects relevant past…

pi (badlogic/earendil) ★ 55k

A minimal, hackable, multi-provider terminal coding agent that adapts to your workflows via npm-installable TypeScript Extensions…

Agent Skills (Addy Osmani) ★ 46k

Encodes senior-engineer software development lifecycle as 23 auto-routed skills and 7 slash commands for any AI coding agent.

wshobson/agents Plugin Marketplace ★ 36k

Single Markdown source for 83 domain-specialized plugins that auto-generates idiomatic artifacts for five AI coding harnesses.

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…

Compound Engineering ★ 17k

Make each unit of engineering work compound into easier future work via brainstorm→plan→execute→review→learn cycles.