Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (n8n-workflow-ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
n8n Workflow AI Generator
An intelligent n8n workflow generator powered by OpenAI and Pinecone vector search. Transform natural language descriptions into production-ready n8n automation workflows.
Also supports ACP (Agent Client Protocol) for integration with Zed Editor and other compatible clients.
🚀 Features
- Natural Language Processing: Describe workflows in plain English
- LLM-Powered Intent Parsing: Advanced understanding of automation requirements
- Semantic Search: Vector similarity matching against 400+ curated workflow templates
- Multi-Phase Generation: Advanced workflow composition for complex automation
- AI Agent Integration: Support for LangChain agents and AI-powered nodes
- Production Ready: Generated workflows include error handling, authentication, and best practices
- ACP Protocol: Compatible with Zed Editor and other ACP clients
📦 Installation
npm install -g n8n-workflow-aiOr build from source:
npm run build
npm pack
npm i -g ./n8n-acp-agent-0.3.1.tgzRun (stdio JSON-RPC)
n8n-acp-agentSend JSON-RPC requests on stdin; responses are printed to stdout.
Supported methods
- initialize → { protocolVersion, agentCapabilities, authMethods }
- session/new → { sessionId }
- session/prompt → { stopReason }
- session/cancel → notification
- ping → { pong: true }
- create_workflow → { workflow, content, filePath? }
- modify_workflow → { workflow, content, filePath?, originalName }
- explain_workflow → { text, nodes }
- shutdown → { ok: true }
Example
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":false,"writeTextFile":true}}}}' \
'{"jsonrpc":"2.0","id":2,"method":"session/new","params":{"cwd":"$PWD","mcpServers":[]}}' \
'{"jsonrpc":"2.0","id":3,"method":"session/prompt","params":{"sessionId":"REPLACE","prompt":[{"type":"text","text":"Create an n8n workflow that runs hourly, fetches open issues from halfdozen/n8n-agent labeled bug, summarizes titles, and posts to #alerts (GitHubCreds=GitHubProd, SlackCreds=SlackProd)."}]}}' \
| n8n-acp-agentZed Integration
For Users (After npm install)
- Install globally:
npm install -g n8n-acp-agent- Set up your API keys (add to
~/.zshrc,~/.bashrc, or~/.profile):
export OPENAI_API_KEY="your-openai-key-here"
export RAGIE_API_KEY="your-ragie-key-here" # Optional but recommended- Add to Zed settings (
~/.config/zed/settings.json):
{
"agent_servers": {
"n8n_workflow_agent": {
"command": "n8n-acp-agent",
"args": [],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}",
"RAGIE_API_KEY": "${RAGIE_API_KEY}"
}
}
}
}- Restart Zed and start using the n8n workflow agent!
Features in Zed
- 🚀 Enhanced workflows: With API keys configured, get LLM-powered generation
- 📦 Fallback mode: Works without API keys using template-based generation
- 🔧 Full ACP support: Create, modify, and explain n8n workflows directly in Zed
Interactive CLI Usage
For a Claude Code-like terminal experience:
Quick Start
# Install globally
npm install -g n8n-acp-agent
# Run the setup wizard
n8n-setup
# Start generating workflows
n8n-cliSetup Wizard
The setup wizard (n8n-setup) will:
- Guide you through API key configuration
- Test your API keys for validity
- Automatically add environment variables to your shell profile
- Provide manual setup instructions if preferred
Interactive Mode
n8n-cliThis starts an interactive session where you can:
- Type workflow requirements in natural language
- Get instant workflow generation with your API keys
- Save workflows to JSON files
- Preview generated workflows
- Run
setupcommand to reconfigure API keys
One-Shot Mode
n8n-cli "Send daily email reports from Google Sheets to Slack"Generates a workflow from a single command and saves it to a timestamped file.
CLI Commands
setup- Configure/reconfigure API keyshelp- Show available commandsclear- Clear the screenexit- Exit the CLI
Templates and Retrieval
- Ships with a prebuilt template bank at
corpus/templates.jsonfor common nodes (Slack, GitHub, HTTP, Postgres, MySQL, S3, Gmail). - You can enrich locally:
npm run fetch # clone curated repos
npm run ingest # rebuild index/templates from corpus/rawEnhanced Features (LLM + Ragie)
The agent supports enhanced generation with LLM-powered intent parsing and semantic corpus search via Ragie:
Setup Enhanced Mode
- Copy the environment template:
cp .env.example .env- Add your API keys to
.env:
OPENAI_API_KEY=sk-your-openai-api-key-here
RAGIE_API_KEY=your-ragie-api-key-hereEnhanced Capabilities
- LLM Intent Parsing: GPT-4 powered analysis of complex user prompts
- MCP Tool Detection: Automatically selects MCP-compatible tool nodes (e.g.,
gmailToolvsgmail) - AI Agent Architecture: Recognizes and generates LangChain agent patterns
- Semantic Search: Ragie-powered corpus search across 2000+ curated workflows
- Fallback System: Automatically falls back to original generation if enhanced features fail
Generation Methods
- 🚀 Enhanced: LLM + Ragie for complex workflows (MCP, AI Agents, advanced patterns)
- 📦 Fallback: Original template-based generation for reliability
Configuration
- Copy defaults and edit credential names to match your n8n instance:
cp src/config.example.json src/config.jsonCLI generator (optional)
npm start -- "trigger=cron services=github,slack name=GitHub_to_Slack owner=org repository=repo channel=#alerts slackApi=SlackProd githubApi=GitHubProd"License
Apache-2.0