v2/src/cli/agents/README.md
A comprehensive agent type system with specialized capabilities, neural pattern support, and advanced coordination.
researcher.ts)Specialization: Information gathering and research
coder.ts)Specialization: Software development and code generation
analyst.ts)Specialization: Data analysis and performance optimization
architect.ts)Specialization: System design and architecture
tester.ts)Specialization: Testing and quality assurance
coordinator.ts)Specialization: Task orchestration and project management
capabilities.ts)base-agent.ts)All specialized agents inherit from a robust base class providing:
index.ts)agent-manager.ts)agent-registry.ts)Each agent type includes neural pattern integration:
All agents integrate with the distributed memory system:
Each agent supports comprehensive configuration:
import { AgentFactory, createAgentFactory } from './agents/index.js';
// Create agent factory
const factory = createAgentFactory(logger, eventBus, memory);
// Create specific agent types
const researcher = factory.createAgent('researcher');
const coder = factory.createAgent('coder', {
preferences: { codeStyle: 'functional' },
});
const analyst = factory.createAgent('analyst');
// Create a balanced development team
const devTeam = factory.createBalancedSwarm(6, 'development');
// Result: 2 coders, 2 testers, 1 architect, 1 coordinator
// Create a research-focused team
const researchTeam = factory.createBalancedSwarm(5, 'research');
// Result: 2 researchers, 1 analyst, 1 coordinator, 1 architect
import { AgentCapabilitySystem } from './agents/capabilities.js';
const capabilitySystem = new AgentCapabilitySystem();
// Find best agents for a task
const task = {
type: 'web-scraping',
description: 'Scrape product data from e-commerce sites',
parameters: {
languages: ['python'],
complexity: 'medium',
},
};
const matches = capabilitySystem.findBestAgents(task, availableAgents);
const bestAgent = matches[0].agent; // Highest scoring agent
The agent system is fully integrated with:
base-agent.ts - Base agent class with lifecycle managementresearcher.ts - Research and information gathering specialistcoder.ts - Software development and code generation specialistanalyst.ts - Data analysis and performance optimization specialistarchitect.ts - System design and architecture specialisttester.ts - Testing and quality assurance specialistcoordinator.ts - Task orchestration and project management specialistcapabilities.ts - Agent capability system and matching algorithmsagent-manager.ts - Enhanced agent lifecycle and resource managementagent-registry.ts - Agent registration and persistent storageindex.ts - Agent factory and system exportsThis comprehensive agent system provides the foundation for sophisticated multi-agent workflows in Claude Flow v2.0.0, enabling intelligent task distribution, specialized expertise, and coordinated problem-solving.