Templates / Pyragogy AI-driven handbook generator with multi-agent orchestration

Pyragogy AI-driven handbook generator with multi-agent orchestration

Needs changes

by Fabrizio Terzi · 2,998 views · created 2025-06-12 · Content Creation, Multimodal AI

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: OpenAI (legacy), Function (legacy). 2 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
OpenAI (legacy)
Meta-Orchestrator, Summarizer Agent, Synthesizer Agent, Peer Reviewer Agent, Sensemaking Agent, Prompt Engineer Agent, Onboarding/Explainer Agent
OpenAI node (AI section)
Function (legacy)
Parse Orchestration Plan, Prepare Agent Input, Add Handbook Metadata, Generate Content for Review, Generate Review ID, Prepare Approved Contribution Data, Generate GitHub File Path, Log Human Rejection, Evaluate Board Consensus, Handle Redraft, Process Agent Output
Code node, mode 'Run Once for All Items'

Nodes used (13)

PostgresGitHubSlack

What it does

AI-Driven Handbook Generator with Multi-Agent Orchestration (Pyragogy AI Village) This n8n workflow is a modular, multi-agent AI orchestration system designed for the collaborative generation of Markdown-based handbooks. Inspired by peer learning and open publishing workflows, it simulates a content pipeline where specialized AI agents act in defined roles, enabling true AI–human co-creation and iterative refinement. This project is a core component of Pyragogy, an open framework dedicated to ethical cognitive co-creation, peer AI–human learning, and human-in-the-loop automation for open knowledge systems. It implements the master orchestration architecture for the Pyragogy AI Village, managing a complex sequence of AI agents to process input, perform review, synthesis, and archiving, with a crucial human oversight step for final approval. How It Works: A Deep Dive into the Workflow's Architecture The workflow orchestrates a sophisticated content generation and review process, ideal for creating AI-driven knowledge bases or handbooks with human oversight. Webhook Trigger & Input: The process begins when the workflow receives a JSON input via a Webhook (specifically at /webhook/pyragogy/process). This input typically includes details like the handbook's title, initial text, and relevant tags. Database Verification: It first verifies the connection to a PostgreSQL database to ensure data persistence. Meta-Orchestrator: A powerful Meta-Orchestrator (powered by gpt-4o from OpenAI) analyzes the initial request. Its role is to dynamically determine and activate the optimal sequence of specialized AI agents required to fulfill the input, ensuring tasks are dynamically routed and assigned based on each agent’s responsibility. Agent Execution & Iteration: Each activated agent executes its step using OpenAI or custom endpoints. This involves: Content Generation: Agents like the Summarizer and the Synthesizer generate new content or refine existing text. Peer Review Board: A crucial aspect is the Peer Review Board, comprised of AI agents like the Peer Reviewer, the Sensemaking Agent, and the Prompt Engineer. This board evaluates the output for quality, coherence, and accuracy. Reprocessing & Redrafting: If the review agents flag a majorissue, they trigger redrafting loops by generating specific feedback for the Synthesizer. This mechanism ensures iterative refinement until the content meets the required standards. Human-in-the-Loop (HITL) Review: For final approval, particularly for the Archivist agent's output, a human review process is initiated. An email is sent to a human reviewer, prompting them to approve, reject, or comment via a "Wait for Webhook" node. This ensures human oversight and quality control. Content Persistence & Versioning: If the content is approved by the human reviewer: It's saved to a PostgreSQL database (specifically to the handbookentries and agentcontributions tables). Optionally, the content can be committed to a GitHub repository for version control, provided the necessary environment variables are configured. Notifications: The final output and the sequence of executed agents can be sent as a notification to Slack, if configured. Observe the dynamic loop: orchestrate → assign → generate → review (AI/human) → store Included AI Agents This workflow leverages a suite of specialized AI agents, each with a distinct role in the content pipeline: Meta-Orchestrator: Determines the optimal sequence of agents to execute based on the input. Summarizer Agent: Summarizes text into key points (e.g., 3 key points). Synthesizer Agent: Synthesizes new text and effectively incorporates reprocessing feedback from review agents. Peer Reviewer Agent: Reviews generated text, highlighting strengths, weaknesses, and suggestions, and indicates majorissue flags. Sensemaking Agent: Analyzes input within existing context, identifying patterns, gaps, and areas for improvement. Prompt Engineer Agent: Refines or generates prompts for subs

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.