Documentation
Welcome to the CogniFlow technical guide. Learn how to model workflows as typed graphs, ship reliable automations, and iterate quickly with the visual editor and AI-assisted generation.
Overview
Mental model: CogniFlow is an AI-native, type-safe workflow automation platform where a workflow is a directed graph of nodes that process an event from trigger to final action.
Build workflows visually, generate them from natural language, and run them on a background orchestration layer (Inngest). The platform is designed to keep “what runs” and “what you see on the canvas” aligned, with predictable execution behavior.
Use CogniFlow when you want event-driven automations with clear data flow, debuggable runs, and guardrails like type-safe connections and validation.
You might not need CogniFlow when a single script, a one-off webhook handler, or a simple cron job is sufficient and you don’t need a reusable workflow model or execution visibility.
Getting Started
1. Create your account
Sign up for a free Hobby account to start building. Authentication is OAuth-based (GitHub/Google) via Better Auth.
2. Create your first workflow
Head to the dashboard and click "Create Workflow". Name it, add a short description, and you’ll land in the visual editor with a blank canvas.
3. Deploy & Monitor
Deploy the workflow so triggers can start executions. Monitor run status and logs as they stream back to the UI.
First success: Form submission → AI processing → message delivery
Build a simple pipeline end-to-end:
Trigger: Google Forms submission (or a webhook)
Action: AI node summarizes/labels the submission
Action: Send the result to Discord/Slack or email
You'll know you're done when a new submission creates a visible execution run with a successful final message.
Visual Workflow Editor
The canvas is built with React Flow for a smooth drag-and-drop experience. Workflows read left-to-right as: trigger → execution → actions.
Data flow: each node receives an input payload (usually derived from the trigger event and upstream outputs) and produces an output that can be mapped into downstream nodes.
- Nodes: Discrete units of work (Triggers or Actions).
- Edges: Logical connections and data flow between nodes.
- Guardrails: Workflows are executed in a deterministic order (topological sort) and invalid graphs (like cycles) are rejected at execution time.
- Type Safety: The backend API is type-safe (tRPC + Prisma), and the AI planner output is schema-validated before it’s applied to the canvas.
AI Workflow Generator
The generator uses an LLM to convert natural language into a structured workflow graph: nodes (triggers/actions) plus edges (the connections between them). The result is a draft you can inspect and refine on the canvas.
Include the trigger, the key fields you care about, the transformations you want, and the final destination.
Mention constraints like formatting, routing rules, and failure handling (e.g., fallback channel on error).
"When a form is submitted, summarize text with Gemini and send to Discord"Triggers & Actions
Trigger lifecycle: a trigger listens for an event, emits a payload when it fires, and starts an execution run. Executions are orchestrated in the background and their status is reported back to the UI.
Native Triggers
Manual, Google Forms, Razorpay, Stripe — each produces an event payload that starts a run.
AI Nodes
OpenAI, Google Gemini, Anthropic Claude — transform text, classify, extract, summarize, or route.
Messaging
Slack, Discord — deliver outputs to humans or downstream systems.
Utilities
HTTP requests — connect to external APIs and shape payloads between steps.
Core Concepts
- Workflow: A versioned automation graph that starts with a trigger and ends with one or more actions.
- Node: A unit of work on the canvas. Nodes have inputs, configuration, and outputs.
- Trigger: A special node that listens for an event (manual, webhook, or provider event) and starts an execution run.
- Action: A node that performs work (call an API, run AI processing, transform data, send a message).
- Execution run: A single instance of a workflow processing one event. Runs have status, timestamps, and step-level logs.
- Draft vs deployed: The deployed workflow definition is what executes when a trigger fires. Editing a draft changes what will run next time you deploy.
How Execution Works
- Trigger fires and produces an event payload.
- Event is sent to the orchestration layer for a new execution run.
- Nodes execute in graph order, passing typed outputs along connected edges.
- Status streams back so the UI can show progress, logs, and final outcome.
Architecture
Executions run asynchronously to keep the UI responsive and reliable under load. A high-level view of the core layers powering CogniFlow.
- Frontend: Next.js + React Flow
- API: tRPC
- Execution: Inngest
- Database: Prisma + Postgres
- AI: Vercel AI SDK
- Billing: Polar
- Monitoring: Sentry