Your Modular AI Stack
Loopstack is a TypeScript framework based on NestJS for building AI agents and durable AI workflows - build for professional use.
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.
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 moreIntegrate into your app
Trigger workflows from anywhere in your NestJS app: a controller, a queue consumer, or a scheduled job.
@Cron(CronExpression.EVERY_30_MINUTES)
async sweepStaleTickets() {
const { workflowId } = await this.workflowRunner.run(
TriageTicketWorkflow,
{ status: 'stale' },
);
}
Interact and run
from Terminal
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.
Interact and run
from 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.
Features
Everything built in — pick a card to explore it in depth.
Every step is checkpointed. Kill the process or redeploy mid-run — it resumes right where it left off.
Pause for approvals, forms, or input — then continue the moment a human responds, minutes or days later.
Test whole runs with recorded LLM responses and scripted human answers. Fast, deterministic, CI-ready.
Every transition, tool call, and document recorded — inspect any run from Studio or the terminal.
Compose systems from nested agents and sub-workflows, with tool calling and error recovery built in.
Install ready-made tools, agents, and workflows from the registry — copy, adapt, and own the source.
Ready to Build?
Start a new app or drop Loopstack into your existing NestJS project.
Read loopstack.ai/llms.txt, then help me build a Loopstack project and my first AI workflowWorks in Claude Code, Cursor, or any coding agent.
Supported by:

