Quick Start
Get Invect running in 5 minutes with Express and React.
Installation
Install the core package and your framework adapter:
npm install @invect/core @invect/expressBackend Setup
Create a file and mount the Invect router:
import express from 'express';
import { createInvectRouter } from '@invect/express';
const app = express();
app.use('/invect', createInvectRouter({
baseDatabaseConfig: {
type: 'sqlite',
connectionString: 'file:./dev.db',
id: 'main',
},
}));
app.listen(3000, () => {
console.log('Server running on http://localhost:3000');
});That's it for the backend. The router handles all API endpoints — flows, executions, credentials, agent tools, and more.
import { Module } from '@nestjs/common';
import { InvectModule } from '@invect/nestjs';
@Module({
imports: [
InvectModule.forRoot({
baseDatabaseConfig: {
type: 'sqlite',
connectionString: process.env.DATABASE_URL || 'file:./dev.db',
id: 'main',
},
}),
],
})
export class AppModule {}import { createInvectHandler } from '@invect/nextjs';
const handler = createInvectHandler({
baseDatabaseConfig: {
type: 'sqlite',
connectionString: process.env.DATABASE_URL || 'file:./dev.db',
id: 'main',
},
});
export const GET = handler;
export const POST = handler;
export const PUT = handler;
export const DELETE = handler;Frontend Setup
The React frontend is a single component. Install it in your frontend app:
import { Invect } from '@invect/frontend';
import '@invect/frontend/styles';
export default function App() {
return (
<Invect apiBaseUrl="http://localhost:3000/invect" />
);
}This gives you the complete flow editor, execution viewer, credential manager, and agent tool configuration — all in one component.
Environment Variables
For AI features, you'll need API keys. Store credentials through the Invect UI (Credentials page) or seed them via config:
# Required for encrypted credential storage
INVECT_ENCRYPTION_KEY=<base64-encoded-32-byte-key>Generate an encryption key:
npx invect-cli secret