Linea Docs

Getting Started

Set up Linea locally and build your first AI workflow in under 10 minutes.

Getting Started

This guide walks you through running Linea locally and triggering your first workflow execution.

Prerequisites

  • Node.js ≥ 20
  • pnpm ≥ 9 (npm install -g pnpm)
  • Docker (for PostgreSQL + Redis) or existing instances
  • A Clerk account (free) for authentication
  • An Anthropic or OpenAI API key (for agent nodes)

Installation

Clone and install dependencies

git clone https://github.com/your-org/linea.git
cd linea
pnpm install

Start infrastructure

docker compose up -d

This starts PostgreSQL (port 5432) and Redis (port 6379).

Configure environment

Copy and fill in the environment files:

cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env.local

apps/api/.env — required variables:

VariableDescription
DATABASE_URLPostgreSQL connection string
REDIS_URLRedis connection string
CLERK_SECRET_KEYFrom Clerk dashboard → API Keys
CLERK_WEBHOOK_SECRETFrom Clerk → Webhooks (create an endpoint)
ENCRYPTION_KEY32-byte hex string for secrets encryption

apps/web/.env.local — required variables:

VariableDescription
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYFrom Clerk dashboard
NEXT_PUBLIC_API_URLhttp://localhost:3001

Push the database schema

pnpm db:push

This creates all required tables in your PostgreSQL instance.

Start the development servers

pnpm dev

Turborepo starts all apps in parallel:

AppURL
Webhttp://localhost:3000
APIhttp://localhost:3001
Docshttp://localhost:3002

Create your first workspace

Sign in

Open http://localhost:3000 and sign in with Clerk. On first sign-in Linea automatically creates a user record.

Create a workspace

Click the workspace switcher in the top-left sidebar and select Create workspace. Give it a name (e.g. "My Workspace").

Create a pod

Navigate to Pods in the sidebar. A pod is a logical namespace for workflows, executions, schedules, and webhooks. Click Create pod and give it a name (e.g. "Experiments").

Build your first workflow

Open the workflow builder

In the pod page, click New workflow. Give it a name and click Create. The visual builder opens.

Add nodes

Drag nodes from the Library panel on the left:

  1. Start — already on the canvas
  2. Agent — from the AI category
  3. End — from the Core category

Connect them: Start → Agent → End.

Configure the Agent node

Click the Agent node to open its panel on the right:

Model:         claude-sonnet-4-6
System prompt: You are a helpful assistant.
User prompt:   {{input.message}}

The {{input.message}} substitution reads the message field from the execution's trigger input.

Save the workflow

Click Save in the top toolbar. The workflow is now ready to run.

Trigger an execution

  1. Open the Executions page for your pod.
  2. Click New execution.
  3. Select your workflow and provide input JSON:
    { "message": "Summarise the benefits of AI workflow automation in 3 sentences." }
  4. Click Run.
  5. Watch the execution stream live — node statuses update in real time.

View results

Open Executions in the sidebar. Click your execution to see:

  • Status badge (queued → running → completed)
  • Input / Output panels
  • Logs — per-node timeline with timestamps

Next steps