feat(ai): replace agent search with skills system (#16513)
## Summary - Replace the agent search mechanism with a new skills-based system - Add a `skills` module with predefined skill definitions that the AI can load on demand - Remove specialized agents (workflow-builder, data-manipulator, dashboard-builder, metadata-builder, researcher), keeping only the helper agent - Add `recordReferences` to workflow creation tool for chip linking in the UI ## Changes ### New Skills Module - `skill-definitions.ts` - Contains 5 skill definitions with detailed instructions - `skills.service.ts` - Service to get skills by name - `load-skill.tool.ts` - Tool for AI to load skills explicitly ### Removed - `agent-search.tool.ts` - Replaced by skill loading - Specialized agent definitions (converted to skills) ### Updated - Chat execution now shows skill catalog in system prompt - Workflow creation returns `recordReferences` for UI linking ## Test plan - [ ] Verify AI can load skills using `load_skill` tool - [ ] Verify skill content is returned correctly - [ ] Verify workflow creation shows clickable chip in chat - [ ] Verify helper agent still works
This commit is contained in:
+7
@@ -177,6 +177,13 @@ This is the most efficient way for AI to create workflows as it handles all the
|
||||
trigger: parameters.trigger,
|
||||
steps: parameters.steps,
|
||||
},
|
||||
recordReferences: [
|
||||
{
|
||||
objectNameSingular: 'workflow',
|
||||
recordId: workflowId,
|
||||
displayName: parameters.name,
|
||||
},
|
||||
],
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
|
||||
+13
-3
@@ -1,7 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
|
||||
import { RecordPositionModule } from 'src/engine/core-modules/record-position/record-position.module';
|
||||
import { ToolGeneratorModule } from 'src/engine/core-modules/tool-generator/tool-generator.module';
|
||||
import { WORKFLOW_TOOL_SERVICE_TOKEN } from 'src/engine/core-modules/tool-provider/constants/workflow-tool-service.token';
|
||||
import { WorkflowSchemaModule } from 'src/modules/workflow/workflow-builder/workflow-schema/workflow-schema.module';
|
||||
import { WorkflowVersionEdgeModule } from 'src/modules/workflow/workflow-builder/workflow-version-edge/workflow-version-edge.module';
|
||||
import { WorkflowVersionStepModule } from 'src/modules/workflow/workflow-builder/workflow-version-step/workflow-version-step.module';
|
||||
@@ -10,6 +11,9 @@ import { WorkflowTriggerModule } from 'src/modules/workflow/workflow-trigger/wor
|
||||
|
||||
import { WorkflowToolWorkspaceService } from './services/workflow-tool.workspace-service';
|
||||
|
||||
// Global module to make WORKFLOW_TOOL_SERVICE_TOKEN available to ToolProviderModule
|
||||
// without creating a circular dependency (ToolProviderModule cannot import this module directly)
|
||||
@Global()
|
||||
@Module({
|
||||
imports: [
|
||||
WorkflowVersionStepModule,
|
||||
@@ -20,7 +24,13 @@ import { WorkflowToolWorkspaceService } from './services/workflow-tool.workspace
|
||||
RecordPositionModule,
|
||||
ToolGeneratorModule,
|
||||
],
|
||||
providers: [WorkflowToolWorkspaceService],
|
||||
exports: [WorkflowToolWorkspaceService],
|
||||
providers: [
|
||||
WorkflowToolWorkspaceService,
|
||||
{
|
||||
provide: WORKFLOW_TOOL_SERVICE_TOKEN,
|
||||
useExisting: WorkflowToolWorkspaceService,
|
||||
},
|
||||
],
|
||||
exports: [WorkflowToolWorkspaceService, WORKFLOW_TOOL_SERVICE_TOKEN],
|
||||
})
|
||||
export class WorkflowToolsModule {}
|
||||
|
||||
Reference in New Issue
Block a user