A comprehensive guide for building AI workflows with NodeTool
Version: 1.0 Target Audience: AI Agents, Developers, and Workflow Designers Purpose: Learn workflow patterns, understand streaming architecture, and build production-ready AI workflows
Table of Contents
Detailed Workflow Examples
For step-by-step guides with detailed explanations and Mermaid diagrams, browse our Workflow Examples Gallery.
Highlighted Examples:
- Image Enhance - Basic image enhancement workflow
- Transcribe Audio - Speech-to-text with Whisper
- Chat with Docs - RAG-based document Q&A
- Creative Story Ideas - Beginner tutorial workflow
- Movie Posters - Multi-stage AI generation
- Data Visualization Pipeline - Data fetching and visualization
View all 19+ workflow examples →
Core Concepts
What is a NodeTool Workflow?
A NodeTool workflow is a Directed Acyclic Graph (DAG) where:
- Nodes represent operations (processing, generation, transformation)
- Edges represent data flow between nodes
- Execution follows dependency order automatically
Input → Process → Transform → Output
Key Principles
- Data Flows Through Edges: Nodes connect via typed edges (image → image, text → text, etc.)
- Asynchronous Execution: Nodes execute when dependencies are satisfied
- Streaming by Default: Many nodes support real-time streaming output
- Type Safety: Connections enforce type compatibility
Node Types
| Type | Purpose | Examples |
|---|---|---|
| Input Nodes | Accept parameters | StringInput, ImageInput, AudioInput |
| Processing Nodes | Transform data | Resize, Filter, ExtractText |
| Agent Nodes | LLM-powered logic | Agent, Summarizer, ListGenerator |
| Output Nodes | Return results | ImageOutput, StringOutput, Preview |
| Control Nodes | Flow control | Collect, FormatText |
| Storage Nodes | Persistence | CreateTable, Insert, Query |
Streaming Architecture
Why Streaming?
NodeTool workflows support streaming execution for:
- Real-time feedback: See results as they’re generated
- Lower latency: Start processing before all data arrives
- Better UX: Progress indicators and incremental results
- Efficient memory: Process large data in chunks
Streaming Nodes
Nodes that support streaming output:
Agent: Streams LLM responses token by tokenListGenerator: Streams list items as they’re generatedRealtimeAgent: Streams audio + text responsesRealtimeWhisper: Streams transcription as audio arrivesRealtimeAudioInput: Streams audio from an input source
Data Flow Patterns
Pattern 1: Sequential Pipeline
Input → Process → Transform → Output
Each node waits for previous node to complete.
Pattern 2: Parallel Branches
→ ProcessA → OutputA
Input →
→ ProcessB → OutputB
Multiple branches execute in parallel.
Pattern 3: Streaming Pipeline
Input → StreamingAgent → Collect → Output
(yields chunks)
Data flows in chunks, enabling real-time updates.
Pattern 4: Fan-In Pattern
SourceA →
→ Combine → Process → Output
SourceB →
Multiple inputs combine before processing.
Workflow Patterns
To build any example: – press Space to add nodes – drag connections – press Ctrl/⌘+Enter to run – add Preview nodes to inspect intermediate results
Pattern 1: Simple Pipeline
Use Case: Transform input → process → output
Example: Image Enhancement
When to Use:
- Simple data transformations
- Single input, single output
- No conditional logic needed
Pattern 2: Agent-Driven Generation
Use Case: LLM generates content based on input
Example: Image to Story
When to Use:
- Creative generation tasks
- Multimodal transformations (image→text→audio)
- Need semantic understanding
Key Nodes:
Agent: General-purpose LLM agent with streamingSummarizer: Specialized for text summarizationListGenerator: Streams list of items
Pattern 3: Streaming with Multiple Previews
Use Case: Show intermediate results during generation
Example: Movie Poster Generator
When to Use:
- Complex multi-stage generation
- User needs to see progress
- Agent planning + execution workflow
Key Concepts:
- Strategy Phase: Agent plans approach
- Preview Nodes: Show intermediate results
- ListGenerator: Streams generated prompts
- Image Generation: Final output
Pattern 4: RAG (Retrieval-Augmented Generation)
Use Case: Answer questions using documents as context
Example: Chat with Docs
When to Use:
- Question-answering over documents
- Need factual accuracy from specific sources
- Reduce LLM hallucinations
Key Components:
- Search: Query vector database for relevant documents
- Format: Inject retrieved context into prompt
- Generate: Stream LLM response with context
Related Workflow: Index PDFs
Pattern 5: Database Persistence
Use Case: Store generated data for later retrieval
Example: AI Flashcard Generator with SQLite
When to Use:
- Need persistent storage
- Building apps with memory
- Agent workflows that need to recall past interactions
Key Nodes:
CreateTable: Initialize database schemaInsert: Add recordsQuery: Retrieve recordsUpdate: Modify recordsDelete: Remove records
Database Flow:
- Create table structure
- Generate data with agent
- Insert into database
- Query and display results
Pattern 6: Email & Web Integration
Use Case: Process emails or web content
Example: Summarize Newsletters
When to Use:
- Automate email processing
- Monitor RSS feeds
- Extract web content
Key Nodes:
GmailSearch: Search Gmail with queriesEmailFields: Extract email metadataFetchRSSFeed: Get RSS feed entriesGetRequest: Fetch web content
Pattern 7: Realtime Processing
Use Case: Process streaming audio/video in real-time
Example: Realtime Agent
When to Use:
- Voice interfaces
- Live transcription
- Interactive audio applications
Key Nodes:
RealtimeAudioInput: Streaming audio inputRealtimeAgent: OpenAI Realtime API with streamingRealtimeWhisper: Live transcriptionRealtimeTranscription: OpenAI transcription streaming
Pattern 8: Multi-Modal Workflows
Use Case: Convert between different media types
Example: Audio to Image
When to Use:
- Converting between media types
- Creating rich multimedia experiences
- Accessibility applications
Common Chains:
- Audio → Text → Image
- Image → Text → Audio
- Video → Audio → Text → Summary
Pattern 9: Advanced Image Processing
Use Case: AI-powered image transformations
Example: Style Transfer
When to Use:
- Style transfer between images
- Controlled image generation
- Preserving structure while changing style
Key Techniques:
- ControlNet: Preserve structure with edge detection
- Image-to-Text: Generate descriptions
- Img2Img: Transform while maintaining composition
Pattern 10: Data Processing Pipeline
Use Case: Fetch, transform, and visualize data
Example: Data Visualization Pipeline
When to Use:
- Fetch external data sources
- Transform and filter datasets
- Auto-generate visualizations
Key Nodes:
GetRequest: Fetch web resourcesImportCSV: Parse CSV dataFilter: Transform dataChartGenerator: AI-generated charts with Plotly
Quick Reference: Choose Your Pattern
I want to
Generate creative content: → Use Pattern 2 (Agent-Driven Generation) → Nodes: Agent, ListGenerator, image/audio
generators
Answer questions about documents: → Use Pattern 4 (RAG) → First: Index documents with IndexTextChunks → Then:
Query with HybridSearch + Agent
Process emails automatically: → Use Pattern 6 (Email Integration) → Nodes: GmailSearch, EmailFields,
Classifier/Summarizer
Build a voice interface: → Use Pattern 7 (Realtime Processing) → Nodes: RealtimeAudioInput, RealtimeAgent
Store data persistently: → Use Pattern 5 (Database Persistence) → Nodes: CreateTable, Insert, Query
Transform images with AI: → Use Pattern 9 (Advanced Image Processing) → Nodes: StableDiffusionControlNet, Canny,
ImageToText
Process audio/video: → Check Audio/Video examples → Nodes: Whisper, AddSubtitles, RemoveSilence
Fetch and visualize data: → Use Pattern 10 (Data Processing Pipeline) → Nodes: GetRequest, ImportCSV,
ChartGenerator
Conclusion
This cookbook provides patterns and examples for building production-ready NodeTool workflows. Key takeaways:
- Start Simple: Begin with basic pipelines, add complexity as needed
- Use Streaming: Leverage streaming for better UX and performance
- Preview Often: Add Preview nodes to debug and validate
- Combine Patterns: Mix patterns to create sophisticated workflows
- Test Incrementally: Build workflows step by step, testing each addition
Next Steps
- Explore Examples: Try running the example workflows in this cookbook
- Build Your Own: Start with a simple pattern and customize it
- Share Workflows: Export and share your workflows with the community
- Extend NodeTool: Create custom nodes for specific use cases
Resources
- MCP Server: Use
export_workflow_digraphto visualize workflows - Node Search: Use
search_nodesto discover available nodes - Documentation: Check node descriptions with
get_node_info
Version: 1.0 Last Updated: 2025-10-12 Generated with: NodeTool MCP Server + Claude Code