> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nelkap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Build durable AI agents and long-running tasks that survive crashes, restarts, and outages.

Nelkap runs your workflows and AI agents to completion. Every step is saved as it finishes, so a run that stops picks up right where it left off.

Your code stays in your app. When a run is due, Nelkap calls your app, and the SDK runs the workflow there.

```ts onboardUser.ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
import { Nelkap } from '@nelkap/sdk';

import { createProfile, sendWelcomeEmail } from './activities';

const nelkap = new Nelkap();

export async function onboardUser(userId: string) {
  await nelkap.step.run('profile', () => createProfile(userId));

  await nelkap.step.sleep('1 day');

  await nelkap.step.run('welcome', () => sendWelcomeEmail(userId));
}
```

## Primitives

> **[Run](https://docs.nelkap.com/reference/step-run.md)**
>
> Run any piece of work once, and only once. Then use what it returns as many times as you want, even days later.

> **[Sleep](https://docs.nelkap.com/reference/step-sleep.md)**
>
> Pause for a minute, a week, or a whole year. Walk away, and nothing runs until your workflow wakes up on its own.

> **[Wait](https://docs.nelkap.com/reference/step-wait.md)**
>
> Hold until the event that matters arrives. Then carry on with its details in hand, as if you never left.

> **[Concurrency](https://docs.nelkap.com/concepts/workflows.md#concurrency)**
>
> Set how many runs can go at once. The rest wait their turn in order. Your app is never swamped, and no run is lost.

> **[Scores](https://docs.nelkap.com/reference/step-score.md)**
>
> Score each run right in your code. Watch the scores over time, and catch a drop the day it starts.

## Start here

> **[Quickstart](https://docs.nelkap.com/quickstart.md)**
>
> Run your first workflow in a few minutes.

> **[How it works](https://docs.nelkap.com/concepts/how-it-works.md)**
>
> See how a run gets through crashes, deploys, and long pauses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.