A visual framework for designing AI agents as interconnected graphs using n8n workflow automation.
The 7 Node Blueprint provides a powerful mental model for designing AI agents as interconnected graphs. By breaking down your agent into seven essential node types, you create systems that are more capable, maintainable, transparent, and resilient.
This repository contains:
- A detailed explanation of the 7 Node Blueprint
- An n8n workflow JSON file implementing the blueprint
- Setup instructions for running the example workflow
Purpose: Reasoning, generation, and decision-making
Examples in n8n: OpenAI Chat Model, LLM Chain, Agent
LLM nodes are the "brains" of your AI agent. They process information, generate content, and make decisions based on context.
Key applications:
- Complex reasoning tasks
- Content generation
- Decision making
- Planning multi-step actions
- Understanding natural language
Purpose: Execute external actions and access data
Examples in n8n: Database queries, HTTP requests, API calls, file operations
Tool nodes allow your AI agent to interact with the external world, greatly expanding its capabilities beyond just language processing.
Key applications:
- Retrieving data from external sources
- Manipulating files and databases
- Calling specialized APIs
- Performing web searches
- Executing custom code
Purpose: Handle logic, branching, and deterministic rules
Examples in n8n: Switch, If, Merge, Split, Queue
Control nodes manage how information flows through your agent, implementing business logic and making deterministic decisions.
Key applications:
- Conditional routing
- Business rule implementation
- Workflow orchestration
- Error classification
- State management
Purpose: Store and retrieve information across interactions
Examples in n8n: Database storage, vector stores, conversation history
Memory nodes give your agent the ability to remember past interactions and learn from them over time.
Key applications:
- Conversation history tracking
- Knowledge base management
- User preference storage
- Vector embeddings for semantic search
- Learning from past interactions
Purpose: Validate outputs and enforce constraints
Examples in n8n: Content filters, output validators, fact-checkers
Guardrail nodes ensure that your agent behaves appropriately and produces reliable, safe outputs.
Key applications:
- Content safety filtering
- Output format validation
- Factual accuracy checking
- Brand voice enforcement
- Compliance monitoring
Purpose: Manage failures and provide alternatives
Examples in n8n: Error handlers, retry mechanisms, default responses
Fallback nodes ensure your agent degrades gracefully when things go wrong instead of failing completely.
Key applications:
- Error detection and handling
- Retry mechanisms with backoff
- Default responses when primary paths fail
- Escalation procedures
- Recovery strategies
Purpose: Involve humans for judgment or decisions
Examples in n8n: Approval workflows, clarification requests, expert review
User input nodes strategically bring humans into the loop when their judgment or expertise is needed.
Key applications:
- Content approval workflows
- Ambiguity resolution
- Complex decision validation
- Expert input for specialized domains
- Training and feedback collection
Our example workflow demonstrates all seven node types working together:
- OpenAI Chat Model
- AI Agent nodes
- LLM Chain nodes
- Menu Table (Airtable integration)
- Google Docs nodes
- HTTP Request nodes (for API calls)
- Switch nodes
- If conditionals
- Edit Fields for data transformation
- Postgres Chat Memory
- Get/Save Memories via Google Docs
- Critic Node (checks dish descriptions)
- Structured Output Parser (enforces output format)
- Stop and Error nodes
- Error handlers
- Default responses
- Slack approval workflows
- Approval request nodes
- n8n installed (version 1.0.0 or later)
- OpenAI API key
- Optional: Supabase account for PostgreSQL memory storage
- Optional: Google account for document storage
- Optional: Slack account for notifications and approvals
-
Clone this repository:
git clone https://github.com/MuLIAICHI/7-node-blueprint cd 7-node-blueprint -
Import the workflow into n8n:
- Open your n8n instance
- Go to Workflows > Import From File
- Select the
7-node-blueprint-workflow.jsonfile from this repository
-
Configure credentials:
- Set up OpenAI API credentials in n8n
- Configure Supabase credentials if using PostgreSQL memory
- Set up Google Drive credentials if using document storage
- Configure Slack credentials if using for approvals
-
Activate the workflow and test with the built-in chat interface
The workflow is designed to be modular and adaptable. Here are some ways to customize it:
- Change the LLM: Swap OpenAI for other models like Anthropic's Claude or Google's Gemini
- Add Tools: Connect additional tools like web search, database access, or custom APIs
- Modify Memory: Change the memory implementation to use different storage options
- Adjust Guardrails: Customize the critic agent to reflect your specific content guidelines
- Change Approval Flow: Modify the human approval process to fit your team's workflow
- Full blog post on the 7 Node Blueprint
- n8n Documentation
- OpenAI Documentation
- AI Agentic Workflows Guide
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub: MuLIAICHI
- Hire me: PeoplePerHour

