$20
I want this!

AI Multi-Agent Orchestration Workflow (n8n) — Human-in-the-Loop Review, Postgres Archiving & GitHub Publishing

$20

Build a professional, auditable AI content pipeline in minutes.
This n8n workflow orchestrates multiple AI agents (Summarizer, Synthesizer, Peer Reviewer, Sensemaking, Prompt Engineer, Explainer) to generate and refine content. It then routes the draft to a human reviewer via email links (Approve/Reject), archives approved entries in Postgres, optionally commits Markdown to GitHub, and sends Slack notifications—fully traceable with per-agent contributions and re-draft loops.

Perfect for teams that need quality + speed: technical docs, handbooks, blog posts, changelogs, knowledge entries, on-boarding guides, and more.

What’s Inside

  • Full n8n workflow JSON (plug-and-play)
  • Webhook trigger (/pyragogy/process) to kick off runs
  • Meta-Orchestrator that decides the optimal agent order
  • AI Agents: Summarizer, Synthesizer, Peer Reviewer, Sensemaking Agent, Prompt Engineer, Onboarding/Explainer
  • Redraft Loop with majority voting (needs ≥2 “major issues”)
  • Human-in-the-Loop approval via email links (Approve/Reject)
  • Postgres persistence (handbook_entries, agent_contributions)
  • Optional GitHub publishing (Markdown with front-matter)
  • Optional Slack notification on completion
  • Final JSON response with finalOutput, contributions, and full agentSequence

Why It Sells (Benefits)

  • Production-ready: real approvals, database storage, versioned files.
  • Explainable AI: every agent’s output is logged as a contribution.
  • Governed: human approval gates before anything is published.
  • Portable: runs in your n8n, no vendor lock-in.
  • Flexible: toggle GitHub/Slack via ENV; change agent order via LLM.

How It Works (Flow)

  1. Trigger: POST to /pyragogy/process with { input, title, tags, … }.
  2. Plan: Meta-Orchestrator selects agent order.
  3. Agents Run: Summarize → Synthesize → Review/Analyze → Prompt-tune.
  4. Consensus: If ≥2 agents flag “major issue”, auto re-draft (loop capped).
  5. Human Review: Email links to approve or reject.
  6. Persist & Publish: Approved → insert into Postgres, optional commit to GitHub (Markdown front-matter).
  7. Notify: Optional Slack summary + JSON response to caller.

Perfect For

  • Engineering teams (handbooks, runbooks, ADRs)
  • Product & ops (SOPs, onboarding docs)
  • Content teams (briefs, articles, changelogs)
  • Agencies (reviewable AI pipelines for clients)

Requirements

  • n8n (self-hosted or cloud)
  • OpenAI API key (for agents & planner)
  • PostgreSQL (connection configured in n8n)
  • (Optional) GitHub token + repo owner/name
  • (Optional) Slack webhook URL
  • SMTP credentials for email sends

Environment Variables (examples)

  • GITHUB_ACCESS_TOKEN, GITHUB_REPOSITORY_OWNER, GITHUB_REPOSITORY_NAME
  • SLACK_WEBHOOK_URL

Database Tables (suggested)

  • handbook_entries(title text, content text, version int, created_by text, tags text[], phase text, rhythm text)
  • agent_contributions(entry_id int, agent_name text, contribution_type text, details jsonb)

What You Get (Files)

  • pyragogy-ai-orchestration-n8n.json (the workflow)
  • schema.sql (optional helper for the two tables)
  • README.md (quick start + curl examples)

FAQ

Is the human approval mandatory?
No—keep it for governance or disable that branch for auto-publish.

Can I swap OpenAI for another LLM?
Yes—replace the OpenAI nodes with your provider’s n8n nodes.

Does it support images or code blocks?
Content is Markdown; you can extend agents to handle special formats.

What if I don’t use GitHub?
Skip the GitHub branch—your approved content still lands in Postgres.

License & Use

MIT License. You can use, copy, modify, merge, publish, distribute, sublicense, and sell copies of this workflow.

I want this!

n8n workflow that orchestrates AI agents, adds human approval, saves to Postgres, commits Markdown to GitHub, and notifies via Slack.

Size
39.4 KB
Powered by