Skip to content
Color theme

Your Modular AI Stack

Your Modular
AI Stack

Loopstack is a TypeScript framework based on NestJS for building AI agents and durable AI workflows.

Start building

Open SourceTypeScriptNestJSStudio & CLI

const { workflowId } = await this.workflowRunner.run(
ReviewTicketWorkflow,
{ ticketId },
);

What You Build

Build stateful AI agents and workflows that call your tools, coordinate sub-agents, and pause for human input.

  • Knowledge retrieval
  • Research & summarization
  • Data analysis
  • Fact-checking
  • Coding automation
  • Content & doc pipelines
  • Agent harness

How It Works

Compose complex AI systems from modular building blocks

@Workflow()
export class MyWorkflow extends BaseWorkflow {
// inject any service or tool here
@Transition({ from: 'start', to: 'step1done' })
async handleStep1(state, ctx) {
// any code for step 1
}
@Transition({ from: 'step1done', to: 'end' })
async handleStep2(state, ctx) {
// any code for step 2
}
}

Workflows

Workflows are TypeScript state machines with explicit states and transitions. Inject tools, call LLMs, and create structured documents within transitions. Take different paths depending on the result, run steps in parallel, or pause for a human to respond. A single step can run another workflow or an AI agent. Every step is checkpointed, so failures resume right where they left off.

Learn more

Integrate into your app

Trigger workflows from anywhere in your NestJS app: a controller, a queue consumer, or a scheduled job.

  • Run via Cron, webhooks, queues, or any service
  • Subscribe to streamed output
  • Hand off to browser interface

Learn more about programmatic execution

@Cron(CronExpression.EVERY_30_MINUTES)
async sweepStaleTickets() {
const { workflowId } = await this.workflowRunner.run(
TriageTicketWorkflow,
{ status: 'stale' },
);
}

Two ways to drive a run

Start a workflow, follow it live, and answer its prompts — from the terminal or the browser. Both ship with the framework.

CLI

npm i -g @loopstack/cli — and every workflow is a command. Runs stream live: transitions, LLM tokens, tool calls, and human-in-the-loop prompts answered right in your terminal.

  • CI-ready with JSON output & exit codes
  • Operable by AI agents
  • Attach to any running workflow

Explore the CLI reference

Studio

Run, debug, and organize automations in the built-in frontend. Forms, documents, and live progress render from your workflow's config — no frontend code required.

  • Built-in React frontend
  • Visual: diagrams, documents, live progress
  • Extensible with widgets & custom forms

Learn more about Studio

Ready to Build?

Start a new app or drop Loopstack into your existing NestJS project.

Paste into Claude Code, Cursor, or any coding agent

Read loopstack.ai/llms.txt, then help me build a Loopstack project and my first AI workflow

Supported by:

IFB Innovations StarterAethos — Center of gravity for responsible AI