Skip to content

Latest commit

 

History

History
129 lines (92 loc) · 4.68 KB

File metadata and controls

129 lines (92 loc) · 4.68 KB

Agents

FlowFactory AI uses a multi-agent pipeline where each agent has a specific role. Specialists activate dynamically based on the user's prompt.

Pipeline Agents (6)

These run sequentially on every generation:

# Agent Model (default) Role
1 Prompt Enhancer sonnet-4.6 Rewrites raw input into a clear, concise brief with detected services
2 Requirements Analyst sonnet-4.6 Extracts triggers, systems, steps, branches, error handling
3 Workflow Architect sonnet-4.6 Selects node types, maps connections, plans test cases
4 n8n Builder opus-4.6 Generates the full n8n workflow JSON with specialist knowledge
5 Repair Agent opus-4.6 Fixes validation failures (up to 3 attempts)
6 Designer sonnet-4.6 Adds sticky note documentation to the workflow

Additionally, a Coverage Audit runs after generation to detect missing services and triggers an Extender Agent if needed.

Meta Agents (6) — Always Active

These inject baseline rules into every generation regardless of prompt content:

Agent Purpose
Node Linker 10 mandatory connection rules + self-verification checklist
Configuration Validator Operation-aware required fields for all common node types
Best Practices Naming, reliability, data flow, performance, maintainability
Expression Expert ={{ }} syntax, $json.body, $node["Name"], common patterns
Security Auditor Secrets, SQL injection, SSRF, webhook signatures, error messages
Node Catalog 100+ services mapped to exact n8n node type names

Domain Specialists (100) — Dynamically Selected

Up to 7 activate per generation based on keyword matching (+3 per keyword hit) and node type matching (+5 per match). Sorted by score, top 7 selected.

Core (10)

Webhook, HTTP Request, Database, AI/LLM, Messaging (Slack/Discord/Telegram), Email, Schedule, Logic (IF/Switch), Code Node, Error Handling

Google Workspace (5)

Sheets, Drive, Gmail, Calendar, Docs

Microsoft 365 (4)

Excel, Outlook, Teams, OneDrive

CRM (5)

HubSpot, Salesforce, Pipedrive, Zoho, Airtable

Project Management (5)

Notion, Jira, Trello, Asana, ClickUp

E-commerce (4)

Shopify, Stripe, WooCommerce, PayPal

Social Media (4)

Twitter/X, LinkedIn, YouTube, Facebook

Storage (4)

AWS S3, Dropbox, FTP/SFTP, Binary Files

DevTools (3)

GitHub, GitLab, Bitbucket

Marketing & Comms (5)

Mailchimp, SendGrid, Twilio, WhatsApp, Zoom

Data & Utility (6)

Merge, Split In Batches, Wait, DateTime, Crypto, Set

AI Ecosystem (3)

LangChain AI Agent (with full sub-node connection schema), Vector Store/RAG, Embeddings

SEO (10)

Technical SEO, Keyword Research, On-Page SEO, Pillar & Cluster Strategy, Backlinks, Schema/Structured Data, Local SEO, GEO/AEO (Answer Engine Optimization), E-E-A-T, Programmatic SEO

Research (5)

Market Research, Niche Research, Competitor Analysis, Google Trends, Community Research (Reddit/HN)

LLM Endpoints (9)

OpenAI, Anthropic Claude, Google Gemini, Mistral, Cohere, Groq, OpenRouter, Perplexity, xAI Grok — each with full HTTP request schemas

Extra Social (3)

Pinterest, TikTok, Reddit

Scraping (4)

Apify (community node), Firecrawl, BrightData, ScrapingBee

SaaS (10)

Supabase, Typeform, Calendly, Intercom, Zendesk, Linear, Sentry, Algolia, Klaviyo, Customer.io

Selection Algorithm

for each specialist:
  score = 0
  for each trigger keyword:
    if prompt contains keyword: score += 3
  for each nodeType in plan:
    if specialist owns that nodeType: score += 5

sort by score descending
return meta_agents + top_7_domain_specialists

Adding a Specialist

  1. Create a file in src/server/specialists/ (e.g., my-category.ts)
  2. Export an array of Specialist objects:
    export const MY_SPECIALISTS: Specialist[] = [
      {
        id: "myService",
        name: "My Service Specialist",
        description: "What it does",
        triggers: ["keyword1", "keyword2"],
        nodeTypes: ["n8n-nodes-base.myNode"],
        knowledge: `## MY SERVICE\nConfig pattern: {...}\nRULES: ...`,
      },
    ];
  3. Import and spread into SPECIALISTS in src/server/specialists/index.ts

Model Configuration

Each pipeline agent can use a different Claude model. Defaults are optimized for cost/quality balance. Users can override per-agent in the Studio settings (gear icon).

Available models: auto, claude-sonnet-4, claude-sonnet-4.5, claude-sonnet-4.6, claude-haiku-4.5, claude-opus-4.5, claude-opus-4.6, claude-opus-4.7

Auto-fallback: if a model returns 503, the system automatically retries with lighter models in the chain.