mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-22 09:31:58 -05:00
[PR #21275] [CLOSED] feat: add Agent Skills system with semantic activation and script execution #49054
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21275
Author: @dathtd119
Created: 2/9/2026
Status: ❌ Closed
Base:
dev← Head:feat/agent-skills📝 Commits (1)
5b54584feat: add Agent Skills system with semantic activation and script execution📊 Changes
20 files changed (+2981 additions, -101 deletions)
View changed files
📝
backend/open_webui/config.py(+18 -0)➕
backend/open_webui/internal/migrations/019_add_skills.py(+66 -0)📝
backend/open_webui/main.py(+23 -1)➕
backend/open_webui/models/skills.py(+260 -0)➕
backend/open_webui/routers/skills.py(+285 -0)📝
backend/open_webui/utils/middleware.py(+609 -99)➕
backend/open_webui/utils/skills_executor.py(+216 -0)➕
backend/open_webui/utils/skills_external_bridge.py(+357 -0)➕
src/lib/apis/skills/index.ts(+295 -0)📝
src/lib/components/admin/Users/Groups/Permissions.svelte(+32 -0)📝
src/lib/components/chat/Chat.svelte(+5 -0)➕
src/lib/components/workspace/Skills.svelte(+412 -0)➕
src/lib/components/workspace/Skills/SkillEditor.svelte(+288 -0)📝
src/lib/constants/permissions.ts(+4 -1)📝
src/lib/stores/index.ts(+1 -0)📝
src/routes/(app)/workspace/+layout.svelte(+14 -0)📝
src/routes/(app)/workspace/+page.svelte(+2 -0)➕
src/routes/(app)/workspace/skills/+page.svelte(+5 -0)➕
src/routes/(app)/workspace/skills/create/+page.svelte(+26 -0)➕
src/routes/(app)/workspace/skills/edit/+page.svelte(+63 -0)📄 Description
Pull Request Checklist
devfeat:Changelog Entry
Description
Adds a native Agent Skills module to Open WebUI — a first-class workspace module alongside Models, Knowledge, Prompts, and Tools.
Skills are reusable prompt+script bundles that can be mounted from external directories (e.g.
~/.claude/skills) and auto-activate based on user message context. When a skill includes executable scripts (.py/.sh), they run automatically via subprocess and their output is injected into the LLM's system prompt.This enables Open WebUI to act as an agent platform where domain-specific capabilities (DevOps, databases, web search, etc.) are loaded dynamically based on conversation context — without MCP or external tool servers.
Added
models/skills.py):SkillSQLAlchemy model withaccess_control(matching Tools pattern:None=public,{}=private, custom group/user permissions),activationconfig,effects,priority,is_active019_add_skills.py): Peewee migration creatingskilltablerouters/skills.py): Full CRUD + toggle + export + external sync endpoints withhas_access/has_permissionchecks andBYPASS_ADMIN_ACCESS_CONTROLsupportutils/skills_external_bridge.py): Scans mounted directories forSKILL.md/plugin.jsonfiles, extracts metadata, discovers bundled scripts, and upserts into DB on startuputils/skills_executor.py): Runs.py/.shscripts viasubprocess.run()with timeout (30s default), output limit (10KB),stdin=/dev/null, sandboxcwd=/tmputils/middleware.py): Three activation modes —always,auto(keyword/regex rules),semantic(LLM-based intent matching with token-overlap fallback). Skills auto-execute scripts when triggered.config.py):USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS,_IMPORT,_EXPORTpermission keys (defaultFalse— admin-managed, skills still activate for all users via publicaccess_control)Skills.svelte,SkillEditor.svelte), API client (apis/skills/index.ts), workspace layout tab, group permissions togglesChanged
main.py: Register skills router, add startup external skills syncmiddleware.py: Add skill activation pipeline inprocess_chat_payload(between system prompt setup and folder handling)config.py: Add skills permission entries toDEFAULT_USER_PERMISSIONSworkspace.skillspermission)Fixed
Security
has_access()/has_permission()stdin=/dev/null, timeout enforcement, output truncationBreaking Changes
Additional Information
Architecture
Testing performed
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.