Open Source · MIT Licensed

Drop-in AI workflows
for your NodeNextBunDenoNestNode app

Visual flow editor, AI agent nodes, native batch processing via OpenAI & Anthropic — drop it into your app in minutes.

npm install invect📋

Five lines to workflows

Add Invect to any Express, NestJS, or Next.js app. The framework-agnostic core means your workflows run everywhere.

The React frontend mounts as a single component — drop it in and get a full flow editor, execution viewer, and credential manager.

Read the full guide →
server.ts
import express from 'express';
import { createInvectRouter } from 'invect/express';

const app = express();

app.use('/invect', createInvectRouter({
  databaseUrl: process.env.DATABASE_URL,
}));

app.listen(3000);
App.tsx
import { Invect } from 'invect/frontend';
import 'invect/frontend/styles';

export default () => (
  <Invect apiBaseUrl="http://localhost:3000/invect" />
);

Not another LangChain wrapper

Invect is a real workflow engine — not a chain-of-prompts library with a UI bolted on.

A real execution engine

Nodes run in topological order with full dependency resolution. Each node receives the merged outputs of every upstream node — no rigid "input→output" chains.

  • Unlimited inputs per node — every upstream output is available via Nunjucks templates
  • Conditional branching, loops, and parallel paths are first-class
  • Pause mid-flow for batch API results, then resume automatically
  • AI agents with iterative tool-calling loops, not single-shot prompts
  • Typed, validated params on every node via Zod schemas
Learn about the execution model →
node config
// Every node sees all upstream outputs
// as a single merged object:
{
  "fetch_users":  [{ "id": 1, ... }],
  "get_config":   { "env": "prod" },
  "api_response": { "status": 200 }
}

// Use any upstream value in templates:
"Process {{ fetch_users.length }} users
 in {{ get_config.env }}"

Embed it, don't replace anything

Invect isn't a standalone platform you deploy separately. It's a library you mount into your existing app — your admin panel, your backoffice, your internal tool.

  • Mount the Express router, NestJS module, or Next.js actions into your existing app
  • The React frontend is a single <Invect /> component — drop it into any page
  • Uses your existing database (SQLite, Postgres, MySQL) — no separate infra
  • Or run it standalone with the included example apps
  • Credential storage and OAuth2 flows are built in, scoped to your app
See integration guides →
your-app.ts
// Your existing Express app
import { createInvectRouter } from 'invect/express';

// Mount alongside your existing routes
app.use('/api', yourRouter);
app.use('/workflows', createInvectRouter({
  databaseUrl: process.env.DATABASE_URL,
}));

// That's it. Same server, same database,
// same deployment.

Execute flows directly in code

The visual editor is optional. The core Invect class exposes every operation as a typed method — build flows in the UI, trigger them from your backend code.

  • Call core.startFlowRun(flowId, inputs) from any server-side code
  • Build flows programmatically with createFlow() and createFlowVersion()
  • Read execution results, node traces, and logs via typed APIs
  • Use flows as background jobs — trigger from webhooks, cron, or queue workers
  • Full TypeScript types for inputs, outputs, and flow definitions
See the programmatic API →
worker.ts
import { Invect } from 'invect';

const core = new Invect({ databaseUrl: '...' });
await core.initialize();

// Trigger a flow from a webhook handler
app.post('/webhooks/new-order', async (req, res) => {
  const result = await core.startFlowRun(
    'order-processing-flow',
    { order: req.body }
  );
  res.json({ runId: result.id });
});

Works with your stack

Start building workflows today

Invect is free, open-source, and ready for production. Add it to your project in minutes.