ramidamolis-alt

agentic-workflow

0
0
# Install this skill:
npx skills add ramidamolis-alt/agent-skills-workflows --skill "agentic-workflow"

Install specific skill from multi-skill repository

# Description

Expert in multi-agent orchestration with ALL 11 MCP servers. Designs complex agentic pipelines, parallel execution, and autonomous workflows. Use for complex automation requiring multiple agents.

# SKILL.md


name: agentic-workflow
description: Expert in multi-agent orchestration with ALL 11 MCP servers. Designs complex agentic pipelines, parallel execution, and autonomous workflows. Use for complex automation requiring multiple agents.


πŸ”„ Agentic Workflow Expert (Full MCP Orchestration)

Master of multi-agent workflows using ALL 11 MCP servers.

MCP Orchestration Patterns

Parallel Search Storm

// Fire ALL search MCPs simultaneously
const results = await Promise.all([
  mcp_Memory_search_nodes(query),
  mcp_Context7_query-docs(lib, query),
  mcp_Tavily_search(query),
  mcp_Brave_brave_web_search(query),
  mcp_DuckDuckGo_web-search(query),
  mcp_NotebookLM_search_notebooks(query)
]);

// Merge and rank results
const merged = mergeByRelevance(results);

Deep Research Pipeline

// Phase 1: Quick search
const quickResults = await mcp_Brave_brave_web_search(query);

// Phase 2: Deep if needed
if (quickResults.insufficient) {
  const deep = await mcp_NotebookLM_ask_question(
    detailedQuery, 
    notebook_id
  );
}

// Phase 3: Analyze with UltraThink
const analysis = await mcp_UltraThink_ultrathink({
  thought: `Synthesizing findings...`,
  total_thoughts: 30
});

// Phase 4: Store learnings
await mcp_Memory_create_entities([{
  name: "Research_" + topic,
  entityType: "Learning",
  observations: analysis.insights
}]);

Sequential Processing Chain

// Step-by-step with checkpoints
const steps = [
  async () => mcp_Memory_search_nodes("context"),
  async () => mcp_Context7_query-docs(lib, "pattern"),
  async () => mcp_UltraThink_ultrathink({thought: "plan"}),
  async () => executeCode(),
  async () => mcp_Memory_create_entities([result])
];

for (const [i, step] of steps.entries()) {
  const result = await step();
  await checkpoint(i, result);
  if (result.failed) {
    await rollback(i);
    break;
  }
}

Multi-Agent Patterns

Supervisor Pattern

         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚    Supervisor       β”‚
         β”‚  (UltraThink 100)   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β–Ό              β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Research β”‚   β”‚  Code   β”‚   β”‚  Test   β”‚
β”‚ Agent   β”‚   β”‚  Agent  β”‚   β”‚  Agent  β”‚
β”‚(Brave+  β”‚   β”‚(Context7β”‚   β”‚(MongoDB β”‚
β”‚ Tavily) β”‚   β”‚+Memory) β”‚   β”‚+FS)     β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β–Ό
              Aggregation

Debate Pattern

// Agent A: Propose solution
const proposalA = await mcp_UltraThink_ultrathink({
  thought: "Proposing approach A...",
  total_thoughts: 15
});

// Agent B: Counter-argument
const counterB = await mcp_UltraThink_ultrathink({
  thought: `Challenging approach A:
    - Weakness 1: ...
    - Alternative: ...`,
  total_thoughts: 15,
  branch_from_thought: 10,
  branch_id: "counter"
});

// Judge: Make decision
const decision = await mcp_SequentialThinking_sequentialthinking({
  thought: `Evaluating debate:
    - Proposal A: ${proposalA.conclusion}
    - Counter B: ${counterB.conclusion}
    - Winner: ...`,
  thoughtNumber: 1,
  totalThoughts: 5
});

Pipeline Pattern

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Research β”‚ β†’  β”‚ Planning β”‚ β†’  β”‚  Coding  β”‚ β†’  β”‚  Review  β”‚
β”‚ (Search  β”‚    β”‚(UltraThinkβ”‚   β”‚(Filesystemβ”‚   β”‚(Sequentialβ”‚
β”‚  MCPs)   β”‚    β”‚  +Memory) β”‚   β”‚ +Context7)β”‚   β”‚ Thinking) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                     β”‚
                                                     β–Ό
                                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                              β”‚  Deploy  β”‚
                                              β”‚(Notion + β”‚
                                              β”‚  Memory) β”‚
                                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Error Recovery Framework

Retry with MCP Fallback

const searchWithFallback = async (query) => {
  const strategies = [
    () => mcp_Tavily_search(query),
    () => mcp_Brave_brave_web_search(query),
    () => mcp_DuckDuckGo_web-search(query),
    () => mcp_Context7_query-docs(lib, query),
    () => mcp_NotebookLM_ask_question(query, nb)
  ];

  for (const strategy of strategies) {
    try {
      const result = await strategy();
      if (result.relevant) return result;
    } catch (e) {
      continue; // Try next
    }
  }
  throw new Error("All strategies exhausted");
};

Self-Healing Workflow

const selfHealingExecute = async (task) => {
  try {
    return await execute(task);
  } catch (error) {
    // Search for fix in Memory
    const pastFixes = await mcp_Memory_search_nodes(
      `bug ${error.type}`
    );

    // Analyze error
    const analysis = await mcp_UltraThink_ultrathink({
      thought: `Error: ${error.message}
        Past fixes: ${pastFixes}
        Proposed fix: ...`,
      total_thoughts: 10
    });

    // Apply fix and retry
    await applyFix(analysis.fix);
    return await execute(task);
  }
};

Advanced Orchestration Secrets

1. Adaptive Parallelism

// Start with parallel, sequentialize if conflicts
const parallel = await Promise.allSettled([
  mcp_MongoDB_find(db, col1, {}),
  mcp_MongoDB_find(db, col2, {}),
  mcp_Memory_read_graph()
]);

const failed = parallel.filter(r => r.status === 'rejected');
if (failed.length > 0) {
  // Retry failed ones sequentially
  for (const f of failed) {
    await f.original();
  }
}

2. Context Propagation

// Pass context through workflow
const context = {
  memory: await mcp_Memory_read_graph(),
  project: "current-project",
  timestamp: Date.now()
};

// Each step receives context
await step1(context);
context.step1Result = result1;

await step2(context);
context.step2Result = result2;

// Final aggregation has full context

3. Checkpoint & Resume

// Save state to MongoDB
const saveCheckpoint = async (workflowId, step, data) => {
  await mcp_MongoDB_update-many(
    "workflows", "checkpoints",
    { workflowId },
    { $set: { step, data, timestamp: new Date() } },
    { upsert: true }
  );
};

// Resume from checkpoint
const resume = async (workflowId) => {
  const checkpoint = await mcp_MongoDB_find(
    "workflows", "checkpoints",
    { workflowId }
  );
  return executeFromStep(checkpoint.step, checkpoint.data);
};

4. Workflow Versioning

// Track workflow versions
await mcp_Memory_create_entities([{
  name: `Workflow_${name}_v${version}`,
  entityType: "Workflow",
  observations: [
    `Version: ${version}`,
    `Steps: ${steps.join(' β†’ ')}`,
    `Changes from v${version-1}: ${changes}`
  ]
}]);

5. Performance Monitoring

// Track execution times
const tracked = async (name, fn) => {
  const start = Date.now();
  const result = await fn();
  const duration = Date.now() - start;

  await mcp_Memory_add_observations([{
    entityName: "PerformanceMetrics",
    contents: [`${name}: ${duration}ms @ ${new Date().toISOString()}`]
  }]);

  return result;
};

6. Dynamic Workflow Generation

// Use UltraThink to design workflow
const workflowDesign = await mcp_UltraThink_ultrathink({
  thought: `Given task: ${taskDescription}
    Available MCPs: ${mcpList}
    Design optimal workflow:
    - Step 1: ...
    - Step 2: ...
    - Parallel opportunities: ...
    - Error handling: ...`,
  total_thoughts: 20
});

// Execute designed workflow
await executeWorkflow(workflowDesign.steps);

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.