mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Restructure the AI workflow from a single-agent model to a specialized multi-agent system with distinct roles: - Add AgentType enum (Main, Orchestration, Planning, Execution) to define agent specializations - Replace AIControllerService and AIFunctionService with modular agent classes in Services/AIServices/: - MainAgent: Handles user interaction and delegates to orchestration - OrchestrationAgent: Coordinates plan execution and step-by-step workflow - PlanningAgent: Creates and revises execution plans - ExecutionAgent: Executes individual plan steps - AIController: Base class providing common agent loop functionality - Create specialized prompts (OrchestrationPrompt, ExecutionPrompt) for agent-specific behavior - Add OrchestrationResult type to communicate workflow control decisions (continue, abort, replan) - Introduce agent-specific function scoping: - ExecuteWorkflow for main agent - CompleteTask for execution agent - CompleteStep/Replan/CancelPlan for orchestration agent - SubmitPlan/AskUserQuestionPlanning for planning agent - Update BaseAIClass to use agentType property instead of isPlanningAgent boolean for model selection - Simplify ExecutionPlan and ExecutionStep types by removing execution state tracking (moved to agent coordination) - Remove PlanningEnabledAppendix and ExecutionStatus enum (superseded by agent architecture) - Add comprehensive integration tests for agent workflows This architecture provides better separation of concerns, clearer agent responsibilities, and more robust plan execution with explicit orchestration control flow.
29 lines
No EOL
1.3 KiB
TypeScript
29 lines
No EOL
1.3 KiB
TypeScript
import { AIFunction } from "Enums/AIFunction";
|
|
import type { IAIFunctionDefinition } from "../IAIFunctionDefinition";
|
|
|
|
export const CompleteTask: IAIFunctionDefinition = {
|
|
name: AIFunction.CompleteTask,
|
|
description: `Signals that you have finished executing all of your assigned instructions. This function MUST be called exactly once, only after you have fully completed or can no longer make progress on everything you were asked to do.
|
|
|
|
Do NOT call this function:
|
|
- After completing individual actions or sub-tasks
|
|
- While you still have remaining work from your instructions
|
|
|
|
Call this function only when:
|
|
- You have completed everything you were instructed to do (success: true)
|
|
- You have encountered a blocker that prevents further progress on your instructions (success: false)`,
|
|
parameters: {
|
|
type: "object",
|
|
properties: {
|
|
success: {
|
|
type: "boolean",
|
|
description: "Whether you successfully completed all of your assigned instructions. Set to true only if everything was accomplished, false if anything remains incomplete or failed."
|
|
},
|
|
description: {
|
|
type: "string",
|
|
description: "A summary of what was accomplished, any outputs produced, or what prevented completion."
|
|
}
|
|
},
|
|
required: ["success", "description"]
|
|
}
|
|
}; |