feat: add Skill Templates for quick agent creation#6440
Closed
stakeswky wants to merge 1 commit intolabring:mainfrom
Closed
feat: add Skill Templates for quick agent creation#6440stakeswky wants to merge 1 commit intolabring:mainfrom
stakeswky wants to merge 1 commit intolabring:mainfrom
Conversation
Introduce Skill Templates - pre-packaged agent capability templates that allow users to quickly create specialized agents with pre-configured system prompts, tools, variables, and optional dataset bindings. - Add AppTypeEnum.skill and AppToolSourceEnum.skill - Add skill type definitions (SkillTemplateSchema, SkillConfigSchema, SkillManifestSchema) - Add 3 built-in skill templates (Coding Assistant, Document Q&A, Customer Service) - Add API endpoints: list, detail, create - Add frontend constants and API client - Add unit tests for types and utils - No database migration required Closes labring#6320
Preview sandbox Image: |
Preview mcp_server Image: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature: Skill Templates
Closes #6320
Summary
This PR introduces Skill Templates - a way to quickly create specialized AI agents with pre-configured system prompts, tools, and variables. Skills provide a middle ground between Simple Apps (too basic) and Workflows (too complex) for common use cases.
What's Changed
Core Types & Constants (
packages/global/)AppTypeEnum.skill- New app type for skill-based agentsAppToolSourceEnum.skill- Tool source identifier for skillspackages/global/core/app/skill/type.tsSkillTemplateSchema- Template metadata (name, description, avatar, etc.)SkillConfigSchema- Runtime config (systemPrompt, tools, variables, datasets)SkillManifestSchema- Complete skill definitionpackages/global/core/app/skill/constants.tsSkillCategoryEnum- Categories: writing, coding, research, customer-service, data-analysispackages/global/core/app/skill/utils.tsskillManifest2AppConfig()- Converts skill manifest to app creation parametersgetSkillRuntimeNodes()- Generates workflow nodes for skill executionAPI Endpoints (
projects/app/src/pages/api/core/app/skill/)GET /api/core/app/skill/list- List all available skill templatesGET /api/core/app/skill/detail?skillId={id}- Get skill template detailsPOST /api/core/app/skill/create- Create app from skill templateFrontend (
projects/app/src/)web/core/app/api/skill.ts- Frontend API clientpageComponents/app/constants.ts- Added skill tocreateAppTypeMappageComponents/dashboard/constant.ts- Added skill toappTypeTagMappages/dashboard/create/index.tsx- AddedAppTypeEnum.skilltoCreateAppTypeOpenAPI Schemas (
packages/global/openapi/core/app/skill/api.ts)ListSkillResponseSchemaDetailSkillQuerySchema&DetailSkillResponseSchemaCreateSkillAppBodySchema&CreateSkillAppResponseSchemaTests (
test/cases/)test/cases/global/core/app/skill/type.test.ts- Type validation teststest/cases/global/core/app/skill/utils.test.ts- Utility function testsUsage Example
Design Decisions
Static Templates: Skills are defined in code (not database) for:
App Type Integration: Skills are a new
AppTypeEnumvalue:chatAgentandworkflowVariable Substitution: System prompts support
{{variable}}syntax:Minimal Invasiveness: Reuses existing:
FlowNodeTypeEnum.agent)Testing
Tests cover:
Checklist
Migration
No database migration required. Skill templates:
skill)Screenshots / Demo
N/A - This PR provides the backend infrastructure. UI will be implemented in a follow-up PR.
Related
Reviewers: Please pay special attention to:
getSkillRuntimeNodes()