agentic-flow 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,30 +19,79 @@ console.error('🚀 Starting Agentic-Flow MCP Server (stdio)...');
19
19
  console.error('📦 Local agentic-flow tools available');
20
20
  const server = new FastMCP({
21
21
  name: 'agentic-flow',
22
- version: '1.0.6'
22
+ version: '1.0.7'
23
23
  });
24
24
  // Tool: Run agentic-flow agent
25
25
  server.addTool({
26
26
  name: 'agentic_flow_agent',
27
- description: 'Execute an agentic-flow agent with a specific task',
27
+ description: 'Execute an agentic-flow agent with a specific task. Supports multiple providers (Anthropic, OpenRouter, ONNX) and comprehensive configuration options.',
28
28
  parameters: z.object({
29
- agent: z.string().describe('Agent type (coder, researcher, etc.)'),
30
- task: z.string().describe('Task description for the agent'),
31
- stream: z.boolean().optional().default(false).describe('Enable streaming output')
29
+ agent: z.string().describe('Agent type (coder, researcher, analyst, etc.) - Use agentic_flow_list_agents to see all 66+ available agents'),
30
+ task: z.string().describe('Task description for the agent to execute'),
31
+ // Provider Configuration
32
+ model: z.string().optional().describe('Model to use (e.g., "claude-sonnet-4-5-20250929" for Anthropic, "meta-llama/llama-3.1-8b-instruct" for OpenRouter, or "Xenova/gpt2" for ONNX local models)'),
33
+ provider: z.enum(['anthropic', 'openrouter', 'onnx']).optional().describe('LLM provider: "anthropic" (default, highest quality, requires ANTHROPIC_API_KEY), "openrouter" (99% cost savings, requires OPENROUTER_API_KEY), "onnx" (free local inference, no API key needed)'),
34
+ // API Configuration
35
+ anthropicApiKey: z.string().optional().describe('Anthropic API key (sk-ant-...) - overrides ANTHROPIC_API_KEY environment variable'),
36
+ openrouterApiKey: z.string().optional().describe('OpenRouter API key (sk-or-...) - overrides OPENROUTER_API_KEY environment variable'),
37
+ // Agent Behavior
38
+ stream: z.boolean().optional().default(false).describe('Enable streaming output (real-time response chunks)'),
39
+ temperature: z.number().min(0).max(1).optional().describe('Sampling temperature (0.0-1.0): lower = more focused/deterministic, higher = more creative/random. Default varies by agent.'),
40
+ maxTokens: z.number().positive().optional().describe('Maximum tokens in response (default: 4096). Controls output length.'),
41
+ // Directory Configuration
42
+ agentsDir: z.string().optional().describe('Custom agents directory path (default: .claude/agents) - for using custom agent definitions'),
43
+ // Output Options
44
+ outputFormat: z.enum(['text', 'json', 'markdown']).optional().describe('Output format: "text" (default, human-readable), "json" (structured data), "markdown" (formatted docs)'),
45
+ verbose: z.boolean().optional().default(false).describe('Enable verbose logging for debugging'),
46
+ // Execution Control
47
+ timeout: z.number().positive().optional().describe('Execution timeout in milliseconds (default: 300000 = 5 minutes)'),
48
+ retryOnError: z.boolean().optional().default(false).describe('Automatically retry on transient errors (rate limits, network issues)')
32
49
  }),
33
- execute: async ({ agent, task, stream }) => {
50
+ execute: async ({ agent, task, model, provider, anthropicApiKey, openrouterApiKey, stream, temperature, maxTokens, agentsDir, outputFormat, verbose, timeout, retryOnError }) => {
34
51
  try {
35
- // Use npx to run agentic-flow from npm registry
36
- const cmd = `npx --yes agentic-flow --agent "${agent}" --task "${task}"${stream ? ' --stream' : ''}`;
52
+ // Build command with all parameters
53
+ let cmd = `npx --yes agentic-flow --agent "${agent}" --task "${task}"`;
54
+ // Provider & Model
55
+ if (model)
56
+ cmd += ` --model "${model}"`;
57
+ if (provider)
58
+ cmd += ` --provider ${provider}`;
59
+ // API Keys (set as env vars)
60
+ const env = { ...process.env };
61
+ if (anthropicApiKey)
62
+ env.ANTHROPIC_API_KEY = anthropicApiKey;
63
+ if (openrouterApiKey)
64
+ env.OPENROUTER_API_KEY = openrouterApiKey;
65
+ // Agent Behavior
66
+ if (stream)
67
+ cmd += ' --stream';
68
+ if (temperature !== undefined)
69
+ cmd += ` --temperature ${temperature}`;
70
+ if (maxTokens)
71
+ cmd += ` --max-tokens ${maxTokens}`;
72
+ // Directories
73
+ if (agentsDir)
74
+ cmd += ` --agents-dir "${agentsDir}"`;
75
+ // Output
76
+ if (outputFormat)
77
+ cmd += ` --output ${outputFormat}`;
78
+ if (verbose)
79
+ cmd += ' --verbose';
80
+ // Execution
81
+ if (retryOnError)
82
+ cmd += ' --retry';
37
83
  const result = execSync(cmd, {
38
84
  encoding: 'utf-8',
39
85
  maxBuffer: 10 * 1024 * 1024,
40
- timeout: 300000 // 5 minute timeout
86
+ timeout: timeout || 300000,
87
+ env
41
88
  });
42
89
  return JSON.stringify({
43
90
  success: true,
44
91
  agent,
45
- task,
92
+ task: task.substring(0, 100) + (task.length > 100 ? '...' : ''),
93
+ model: model || 'default',
94
+ provider: provider || 'anthropic',
46
95
  output: result.trim()
47
96
  }, null, 2);
48
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-flow",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Production-ready AI agent orchestration platform with 66 specialized agents, 111 MCP tools, and autonomous multi-agent swarms. Built by @ruvnet with Claude Agent SDK, neural networks, memory persistence, GitHub integration, and distributed consensus protocols.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",