A Spring Boot auto-configuration library that injects RAG knowledge base, MCP tool calling, and Skill library into Spring AI applications with an out-of-the-box chat UI.
🧰 Built-in Tools — Time / file / skill / sub-task / schedule / end-to-end deploy (on by default), git / maven (opt-in); see TOOLS.md
⚙️ Batteries-included Engineering — Spring Boot auto-config, every bean replaceable via @ConditionalOnMissingBean, Flyway migrations, broad chat / embedding / vector-store support
Built-in Tools
All tools follow the interface + default implementation pattern. Every component is registered with @ConditionalOnMissingBean, allowing consumers to replace any piece with a custom implementation.
For full @Tool method signatures, parameter details, and configuration reference, see TOOLS.md.
Compile & Deploy Tool
Admin Console
Standalone MCP Servers
File, Git, Maven, and Compile each have a standalone MCP server module — the core layer has no Spring dependency and can be deployed via jbang to any MCP-compatible agent (Claude Desktop, Cursor, etc.):
| MCP Server | Description | README |
|------------|-------------|--------|
| loom-file-mcp | File system operations — read, write, edit, search, directory browsing, delete (14 tools) | EN · 中文 |
| loom-git-mcp | Git operations via JGit — clone, commit, push, merge, rebase, and more (14 tools) | EN · 中文 |
| loom-maven-mcp | Maven build operations — execute, build, package, test, dependency tree, validate (6 tools) | EN · 中文 |
| loom-compile-mcp | End-to-end deploy pipeline — git clone → build → docker build → docker run → health check (1 tool) | EN · 中文 |
Note: For document-based Q&A, ensure the model supports multimodal input (e.g., multi_model: true). Document content is injected via System Prompt.
3. Start the Project
Visit http://localhost:8080/spring/ai/loom
Document Upload & Conversation
Click the + button next to the input field to upload images or documents. After uploading, type your question and send it.
Supported Document Formats
PDF, DOCX, XLSX, PPTX, MD, TXT, HTML, CSV, RTF, and more.
How It Works
Images: Passed as Media type directly to the multimodal model (requires model support, e.g., DashScope Qwen series)
Documents: Text content extracted via Apache Tika, injected as System Prompt into the conversation context
Mixed scenarios: Images and documents can be uploaded together; the model synthesizes visual information and document text
File Download, Preview, and Deletion
Uploaded and generated files can get download links via MCP tool downloadFileUrl, or preview links via MCP tool viewFileUrl. Files and directories can be removed via MCP tool deleteFileOrDirectory (requires explicit I_CONFIRM_DELETE confirmation — token configurable via spring.ai.loom.agent.file.deleteConfirmToken, supports recursive directory removal, and cleans up temporary file_info records).
The "File" entry provides unified browsing, previewing, downloading, and deleting for all non-knowledge-base files (including tool uploads and git repositories).
Replace the Default RAG Implementation
The following example uses Qdrant as the vector store. Add the dependency:
The MCP button opens a panel showing available services:
Add Chinese labels and descriptions for tools via configuration:
spring:
ai:
loom:
agent:
mcps:
- name: spring-ai-mcp-client - time
title: Time
description:
A Model Context Protocol service that provides time and timezone conversion functionality. This service enables
large language models to obtain current time information and perform timezone conversions using IANA timezone names,
with automatic system timezone detection.
tools:
- name: get_current_time
description: Get the current time in a specified timezone
- name: convert_time
description: Convert time between different time zones
Skill Market
Skills are prompt templates that the LLM uses for recurring workflows. The data is fully managed in the database (no more yml skills[] block) and lives in three tables:
| Table | Purpose |
|----------------|-----------------------------------------------------------------------------------------------|
| market_skill | Public Skill Market — every entry has only (author, name) unique constraint ( removed version); admin edits / pulls (cannot create) — |
| user_skill | A user's local copy of a skill (source = USER_CREATED / MARKET_PULLED / ROLE_GRANTED); remove blocked when market_skill_id is set; pull rejects overwriting same-name USER_CREATED |
| role_skill | Role → market_skill authorization (which skills a role unlocks for its users); setRoleKnowledges auto-syncs user_knowledge for all assigned users |
6 seeded system skills
On first launch, the init migration seeds 6 system skills (stored directly in each user's user_skill with source=USER_CREATED, default_loaded=true) so every fresh install already has useful ones — including Monthly Event Report, HTTP Test, Deploy Project, Auto E2E, etc. Admins can edit / delete any of them at any time from the Skill Market admin page (no creation from admin).
Skill lifecycle for a normal user
Create — In the chat UI's Skill Library → 我的 tab → + 新增, or PUT /spring/ai/loom/skill. The skill is stored in user_skill with source=USER_CREATED. Fully editable (name / desc / content / default-loaded).
Submit to market — Library → 共享 tab. Click your skill, the form shows market metadata (无版本号)。 Submitted with status=APPROVED directly (no approval flow). Same (author, name) re-submits UPSERT (overwrites content + status).
Pull from market — Library → 市场 tab. Click item → right panel shows full details + 「添加到我的知识库」 button. Creates / refreshes a user_skill row with source=MARKET_PULLED. Re-pull of same name UPSERTs (no error).
****: If you already have a same-name USER_CREATED skill, pull is rejected (403) — use 「复制为我的技能」 first to copy as a new USER_CREATED.
Receive via role authorization — If admin granted a role → market_skill, the skill is auto-injected into your user_skill on every login with source=ROLE_GRANTED, locked=true. setRoleKnowledges auto-syncs new role grants. You cannot edit or delete it (it's pinned by the role).
What admins can do that normal users cannot
Edit / 下架 (delete) any market_skill (admin no longer creates new skills — author is the one who publishes from chat UI)
Authorize any APPROVED market skill to any role via role_skill (auto-syncs to all assigned users)
下架 cascades to all user_skill (pullers) and role_skill (role grants) — no orphans
我的 — your local user_skill (plus admin's union view). Click a skill to see details, then 应用 (overwrite the textarea and auto-send to the model) or 复制 (overwrite the textarea, no send).
市场 — browse all APPROVED market skills and 拉取 them into your user_skill (rejects if you already have a same-name USER_CREATED).
共享 — submit a USER_CREATED skill to the market. status is direct APPROVED, no approval. no version number. two-stage click list item → right panel form.
我的发布 — track your market submissions (all APPROVED after de-approval). Click list item → right panel with 「撤回共享(下架)」 button. Withdraw cascades to all user_skill and role_skill.
Inside content you can reference MCP tools by @tool_name — the available tools come from the role-based mcps authorization, not from yml.
Market workflow: submit → PENDING → admin approve → APPROVED → other users can subscribe. Role-based authorization can also auto-grant knowledge bases to users (similar to skills).