Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/n8n skills/Ai-agent-workflows
Reference · n8n skills

Ai-agent-workflows

Part of n8n skills. Install the skill and your agent reads this page when it needs the depth.

AI Agent Workflows in n8n

Purpose

Use this reference when workflows include LLM nodes, AI Agent nodes, tools, MCP Client/Server nodes, vector stores, chat triggers, or autonomous action loops.

AI Workflow Architecture

A production AI workflow should include:

  1. input boundary,
  2. prompt/context assembly,
  3. policy and instruction hierarchy,
  4. model call or agent call,
  5. structured output validation,
  6. tool-call permission boundary,
  7. human approval for irreversible actions,
  8. action execution,
  9. audit log,
  10. fallback path.

Structured Output Contract

Require the model to output JSON with a schema like:

{
  "decision": "approve | reject | needs_human | no_action",
  "confidence": 0.0,
  "reasoning_summary": "brief safe explanation",
  "actions": [
    {
      "type": "create_task",
      "target": "clickup",
      "requires_approval": true,
      "payload": {}
    }
  ],
  "risks": [],
  "missing_context": []
}

Never let free-form model text directly drive write actions.

Human-in-the-Loop Rules

Require approval when an action:

Prompt Injection Controls

MCP Patterns

When using MCP Client or MCP Server nodes:

Reliability Mechanisms

AI workflows need stronger reliability than ordinary automations:

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.