🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
checkpoint: File edit:
rUv7dbfcd43bf5d
diff --git a/v3/mcp/tools/agent-tools.ts b/v3/mcp/tools/agent-tools.tsindex 8f78891e58..875c111316 100644--- a/v3/mcp/tools/agent-tools.ts+++ b/v3/mcp/tools/agent-tools.ts@@ -214,29 +214,36 @@ async function handleTerminateAgent(input: z.infer<typeof terminateAgentSchema>,context?: ToolContext): Promise<TerminateAgentResult> {- // TODO: Integrate with actual agent manager when available- // For now, return stub response-const terminatedAt = new Date().toISOString();- // Stub implementation - will be replaced with actual agent manager integration- const result: TerminateAgentResult = {+ // Try to use swarmCoordinator if available+ if (context?.swarmCoordinator) {+ try {+ const { UnifiedSwarmCoordinator } = await import('@claude-flow/swarm');+ const coordinator = context.swarmCoordinator as InstanceType<typeof UnifiedSwarmCoordinator>;++ // Terminate agent+ await coordinator.terminateAgent(input.agentId);++ return {+ agentId: input.agentId,+ terminated: true,+ terminatedAt,+ reason: input.reason,+ };+ } catch (error) {+ // Fall through to simple implementation if coordinator fails+ console.error('Failed to terminate agent via coordinator:', error);+ }+ }++ // Simple implementation when no coordinator is available+ return {agentId: input.agentId,- terminated: true,+ terminated: false,terminatedAt,reason: input.reason,};-- // TODO: Call actual agent manager- // const agentManager = context?.agentManager as AgentManager;- // if (agentManager) {- // await agentManager.terminateAgent(input.agentId, {- // graceful: input.graceful,- // reason: input.reason,- // });- // }-- return result;}/**