Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Task Architect: NestJS + FastAPI Workflow Generator

Generate valid n8n workflow JSON from natural language using a scalable microservice architecture.

License: MIT
TypeScript Python NestJS FastAPI OpenAI n8n


✨ Project Overview

The AI Task Architect is a dual-backend AI application that takes natural language prompts like:

"Fetch Tesla stock price every morning and post to Slack."

and generates a valid, executable n8n workflow JSON using the OpenAI API.

🔧 Core Features

  • ✅ FastAPI-powered AI backend with OpenAI function calling
  • ✅ NestJS Gateway with typed DTOs and error handling
  • ✅ Generates clean, importable n8n workflows (name, nodes, connections)
  • ✅ SQLite database integration for workflow history and reuse
  • ✅ JSON structure repair, enrichment, and validation

🧱 Architecture Overview

Layer Tech Stack Role
Frontend HTML/JS or REST client Sends natural prompts
API Gateway NestJS (TypeScript) Receives prompts, validates input, forwards to FastAPI
AI Engine FastAPI (Python) Generates structured workflows using GPT-4o
Database SQLite via SQLAlchemy Stores generated workflows persistently


🚀 Getting Started

1. 🧠 Clone the repo

git clone https://github.com/niravpatidar37/ai-task-architect.git
cd ai-task-architect

cd llm_agent
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

pip install -r requirements.txt
cp .env.example .env      # Add your OpenAI API Key
uvicorn main:app --reload

cd backend
npm install
npm run start:dev

# FastAPI .env
OPENAI_API_KEY=your-openai-api-key-here

POST /generate

{
  "prompt": "Create a workflow that triggers every morning, fetches Tesla's stock price, and posts it to Slack."
}

Response 

{
  "name": "Tesla Stock Summary",
  "nodes": [...],
  "connections": {...}
}

About

Generates structured n8n workflow JSON from text prompts using GPT-4o, orchestrated via a NestJS Gateway and FastAPI AI Engine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages