Files
workflow-builder/src/test-agent-system.ts
T
Nikhil-Doye ee87d8ad0d Add multi-agent intelligence layer architecture and tools
- Introduced a new architecture for the multi-agent intelligence layer, replacing the monolithic `CopilotService` with a modular tool-based system.
- Added core components including `AgentManager`, `WorkflowAgent`, and various tools for intent classification, entity extraction, workflow generation, validation, and suggestions.
- Implemented a comprehensive test script and demo component for interactive testing of the new agent system.
- Updated TypeScript configuration and integrated the new architecture into the existing workflow store, ensuring backward compatibility with the previous API.
- Enhanced documentation to reflect the new architecture and its components, providing a clear overview of the system's capabilities and usage.
2025-10-18 21:39:38 -04:00

53 lines
1.6 KiB
TypeScript

// Test script for the new agent system
import { agentManager } from "./services/agents/AgentManager";
async function testAgentSystem() {
console.log("Testing Agent System...");
try {
// Test 1: Basic workflow generation
console.log("\n=== Test 1: Basic Workflow Generation ===");
const result1 = await agentManager.processWorkflowRequest(
"Create a workflow that scrapes a website and analyzes the content with AI"
);
console.log("Result 1:", {
success: result1.success,
toolsUsed: result1.toolsUsed,
executionTime: result1.executionTime,
confidence: result1.confidence,
});
if (result1.success) {
console.log(
"Generated workflow nodes:",
result1.data.parsedIntent.workflowStructure.nodes.length
);
}
// Test 2: Suggestions generation
console.log("\n=== Test 2: Suggestions Generation ===");
const suggestions = await agentManager.getSuggestions(
"I want to process job applications"
);
console.log("Suggestions:", suggestions);
// Test 3: Tool information
console.log("\n=== Test 3: Available Tools ===");
const tools = agentManager.getAvailableTools();
console.log("Available tools:", tools);
// Test 4: Session info
console.log("\n=== Test 4: Session Info ===");
const sessionInfo = agentManager.getSessionInfo();
console.log("Session info:", sessionInfo);
console.log("\n✅ All tests completed successfully!");
} catch (error) {
console.error("❌ Test failed:", error);
}
}
// Run the test
testAgentSystem();