Ai Workflows
FreeNot checkedAgentic Worflow UI using Nextjs 16 along with N8N Workflow engine to API and MCP workflow integration
About
Agentic Worflow UI using Nextjs 16 along with N8N Workflow engine to API and MCP workflow integration
README
A comprehensive AI-powered system that combines N8N's visual workflow builder with PostgreSQL's vector database capabilities and local Ollama models to create intelligent agents and document processing workflows.
🏗️ Architecture Overview
This project demonstrates the integration of three powerful technologies:
- N8N: Visual AI workflow builder for creating sophisticated AI agents and processing pipelines
- PostgreSQL: Vector database for efficient document storage and semantic search
- Ollama: Local LLM runtime for privacy-focused AI processing
🚀 Available Workflows
The flows/ directory contains pre-built N8N workflows for various AI tasks:
1. Document Q&A Workflow
- File:
Document Q&A.json - Purpose: Question-answering system for uploaded documents
- Components: Chat input, prompt templates, Ollama model integration
- Use Case: Interactive document querying with natural language
2. Docling Processing Workflow
- File:
Docling Processing.json - Purpose: Advanced document parsing and processing using Docling
- Components: Document ingestion, text splitting, export functionality
- Use Case: Structured data extraction from various document formats
3. News and Web Search Workflow
- File:
News and Web Search.json - Purpose: AI-powered web content aggregation and analysis
- Components: News search, web scraping, agent-based processing
- Use Case: Real-time information gathering and summarization
🛠️ Technology Stack
N8N Integration
- Visual Workflow Builder: Drag-and-drop interface for creating AI pipelines
- Multi-Agent Support: Orchestrate complex AI interactions
- Component Library: Pre-built components for common AI tasks
- API Deployment: Export workflows as RESTful endpoints
- Code Access: Full Python customization capabilities
PostgreSQL Vector Database
- Vector Extension:
pgvectorfor high-dimensional similarity search - Document Storage: Efficient storage of document embeddings
- Semantic Search: Fast cosine similarity queries
- Scalable Architecture: IVFFlat indexes for production performance
Ollama Integration
- Local Models: Run LLMs locally without API costs
- Privacy First: No data sent to external services
- Model Flexibility: Support for Llama, Mistral, and custom models
- Embedding Generation: Snowflake Arctic Embed for semantic search
📁 Project Structure
ai_workflows/
├── flows/ # N8N workflow definitions
│ ├── Docling Processing.json # Document processing pipeline
│ ├── Document Q&A.json # Question-answering workflow
│ └── News and Web Search.json # Web content aggregation
├── postgres/ # Database schema and setup
└── ollama/ # Ollama Docker Files
🗄️ Database Schema
The PostgreSQL database includes optimized tables for document storage and retrieval:
-- Documents table with vector embeddings
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
filename TEXT NOT NULL,
content TEXT NOT NULL,
metadata JSONB NOT NULL,
embedding vector(1536),
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
-- Document chunks for improved retrieval
CREATE TABLE document_chunks (
id SERIAL PRIMARY KEY,
document_id INTEGER REFERENCES documents(id) ON DELETE CASCADE,
chunk_index INTEGER NOT NULL,
content TEXT NOT NULL,
embedding vector(1536) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
🎯 Key Features
Document Processing
- Multi-format Support: PDF, text, and web content processing
- Intelligent Chunking: Optimal text segmentation for embedding
- Metadata Extraction: Automatic document metadata capture
- Vector Embeddings: High-quality semantic representations
AI Agent Capabilities
- Natural Language Understanding: Advanced query comprehension
- Contextual Responses: Relevant answer generation
- Multi-turn Conversations: Maintained conversation state
- Tool Integration: External API and database access
User Interface
- Intuitive Upload: Drag-and-drop document ingestion
- Real-time Search: Instant semantic query results
- Responsive Design: Mobile-friendly interface
- Progress Tracking: Visual feedback for processing status
🔧 Development Setup
Prerequisites
- PostgreSQL 14+ with pgvector extension
- Python 3.10+ (for N8N)
- Ollama installed locally
- Docker (optional, for containerized deployment)
Installation
Clone the repository
git clone <repository-url> cd ai_workflowsSet up PostgreSQL
# Create database createdb vectordb # Enable vector extension psql vectordb -c "CREATE EXTENSION IF NOT EXISTS vector;"Install Ollama
# Download from https://ollama.ai # Pull required models ollama pull llama3.2 ollama pull snowflake-arctic-embed2Install N8N
- Configure environment variables
DATABASE_URL=postgresql://postgres:postgres@localhost/vectordb OLLAMA_HOST=http://localhost:11434
Running the Application
Start PostgreSQL
# Using Docker docker-compose up -d postgresStart Ollama
ollama serve # Runs at http://localhost:11434Launch N8N
docker compose up -d # Access at http://localhost:5678
API Integration
- Workflows expose RESTful endpoints automatically
- Ollama provides local model inference
- Real-time processing with streaming responses
- Error handling and retry mechanisms
🚀 Deployment
Docker Deployment
# Build and run all services
docker-compose up -d
Production Considerations
- Database Scaling: Connection pooling and read replicas
- Caching Strategy: Redis for session and result caching
- Load Balancing: Nginx for traffic distribution
- Monitoring: Application performance and error tracking
🔮 Future Enhancements
- Multi-modal Processing: Image and audio document support
- Advanced Analytics: Usage metrics and insights
- Workflow Templates: Pre-built industry-specific solutions
- Collaboration Features: Multi-user workflow sharing
- Enhanced Security: Authentication and authorization
📚 Resources
Built with ❤️ using N8N, PostgreSQL, and Ollama
Installing Ai Workflows
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/shawnmcrowley/ai_workflowsFAQ
Is Ai Workflows MCP free?
Yes, Ai Workflows MCP is free — one-click install via Unyly at no cost.
Does Ai Workflows need an API key?
No, Ai Workflows runs without API keys or environment variables.
Is Ai Workflows hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Ai Workflows in Claude Desktop, Claude Code or Cursor?
Open Ai Workflows on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Ai Workflows with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
