> For the complete documentation index, see [llms.txt](https://docs.nlx.ai/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/async-worker.md).

# Async Worker

## What's an *Async Worker* app?

An *Async Worker* is a type of agentic application that runs tasks using assigned tools, such as web search, email delivery, and image/text/PDF generation, asynchronously (in the background) from a single prompt or trigger. You can also assign custom flows as tools for advanced services or structured processes for your worker to follow.

Worker use cases:

* Search the web for information and compile the findings into a PDF
* Discover trending topics and generate a blog post with a promotional image
* Send results via email or pass them to downstream systems via custom workflows

This application type is ideal when you want automation that gathers, creates, and delivers outputs without building step-by-step conversation flows.

<div align="left"><figure><img src="/files/zMQaoJiFhbXNeWJyUIUM" alt=""><figcaption></figcaption></figure></div>

## Step 1: Add app

{% hint style="success" %}
Import the [Research Agent template](https://platform.nlx.ai/onboarding) into your workspace to see a sample use case you can follow as a guide.
{% endhint %}

{% @arcade/embed flowId="rQiNJanNGTLMMYzKfQHs" url="<https://app.arcade.software/share/rQiNJanNGTLMMYzKfQHs>" %}

1. Select *Applications* in your workspace menu&#x20;
2. Click *New application*
3. Choose *Blank application* from the available options and select *Async Worker*
4. Enter a name for your application and click *Create*

Your new app will open on the *Configuration* tab.

## Step 2: Configure

The *Configuration* tab allows you to provide the necessary instructions, tools, and communication method for your worker to operate.

{% stepper %}
{% step %}

#### AI Engine

1. Choose the generative AI intelligence powering your application. You may choose the built-in NLX model or select a managed LLM provider you [previously integrated](/platform/nlx-platform-guide/integrations/types/llm-services.md) into your workspace
   * \[Optional] For managed LLM providers, you can specify the particular model you want to power your worker's intelligence
2. Provide a complete set of instructions in the prompt field that details the purpose and context of the worker's role, its core capabilities, any guidelines you want it to adhere to while executing with given tools and requests, formatting rules or quality standards, and any other rules or notes that are pertinent to its task&#x20;
   {% endstep %}

{% step %}

#### Delivery

Set up the details for how to communicate with your worker

3. Choose *+ Add channel* to define the delivery service that your worker will use to correspond with users
4. Enter a user name for your agent that will be visible through its delivery channel
   * *Email*: Taken from the *User name* entered with the NLX suffix `[user name]@dev.nlxa.gent`
5. From the *Allow list*, *e*nter all user emails who are permitted to trigger the Worker through email correspondence and receive its executed output
6. Specify the language the worker should use
   {% endstep %}

{% step %}

#### Functionality

7. Select one or more of the following to imbue your worker with different tools for completing its task:
   * *Custom: Flow*: Choose one or more [MCP-enabled flows](/platform/nlx-platform-guide/flows-and-building-blocks/overview/setup.md#model-context-protocol-mcp) created in your workspace that the agent can follow. This allows you to provide access to your business systems or other integration services using [*Data request* nodes](/platform/nlx-platform-guide/flows-and-building-blocks/overview/nodes.md#data-request)
   * *Generate image*: Creates a custom image
   * *Generate PDF*: Assembles content into a downloadable PDF document
   * *Generate text*: Writes short or long-form content like summaries, posts, or instructions
   * *Search web*: Looks up real-time information from the internet to answer questions or gather content
   * *Send email*: Sends a message or file to an email address with any of the outputs created
8. Click *Save*
   {% endstep %}
   {% endstepper %}

## Step 3: Deploy

The deployment process for a worker application allows you to construct a build that contains a package of the worker's tools, prompt, and delivery details in the state they exist at the time the build is created. You may then deploy a successful build to make it live or roll back to a previous deployment.&#x20;

{% @arcade/embed flowId="xWEZITHYr3SQGsxqQTdI" url="<https://app.arcade.software/share/xWEZITHYr3SQGsxqQTdI>" %}

{% stepper %}
{% step %}

#### Build

1. Click deployment status in upper right and choose *Build and deploy*
2. Review the *Validation check* for critical errors or detected UX issues in custom flows. Before each new build initiates, a validation check is run to provide a preview of potential errors that may cause failed builds. Detected issues are listed with descriptions and potential solutions
3. \[Optional] Provide a *Description* of notable build edits as a changelog
4. Click *Create build*

{% hint style="warning" %}
Experiencing a *Failed* build? Select the *All builds* option in the deployment status and click the failed build to view details on what caused an error.
{% endhint %}
{% endstep %}

{% step %}

#### Deploy build

Channel(s) provide the frontend interface (how users experience your worker app). Deploying a build pushes your updates through any delivery channels setup on the app, effectively making your app live outside of your NLX workspace.

5. Click deployment status in upper right and select *All builds*
6. Choose *Deploy* on a successful build
   * \[Optional] *Deployment languages*: Select the languages to include in the deployment, if multiple are available
   * \[Optional] *Hosting*: Host your application as a Touchpoint app via the *conversational.app* domain. Ideal for previewing its final look during development and sharing your app externally with collaborators. Enable the *Hosting* option to configure the URL (e.g., `mybusiness.conversational.app`)
7. Click *Create deployment*

{% hint style="info" %}
Enable *One-click deploy* to auto-deploy every new build. From the deployment status, open *Deployment settings* and turn on *One-click deploy* on. All future builds will deploy automatically.
{% endhint %}

Once a build is made, flows added as tools can be further edited without affecting a deployed worker application. Only deploying a new build will impact live applications. Only one build can be deployed at a time and deploying any build deactivates the previous one. You can freely alternate between newer and older builds using *Rollback* or *Deploy.*
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Want to take your worker offline? Click deployment status in upper right of application > Choose all builds and select latest deployed build > From the *Deployment* tab in modal, click *Delete* *deployment*. The app stays offline until you redeploy.
{% endhint %}

Your async worker runs tasks asynchronously to achieve its goal, and you can interact with your worker after a successful deployment in two ways:

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Email delivery channel</strong></td><td><p>Open your email client and send a request to the worker’s email (found in the <em>Configuration</em> tab of your app). Make sure:</p><ul><li>The sender's email is on the worker’s <em>Allow list</em></li><li>The sender confirmed a subscription to the worker from the email notification sent</li></ul></td></tr><tr><td><strong>NLX hosted</strong></td><td>Use the hosting URL found in the deployment link details to open a chat interface and talk to your worker. The hosting option must be enabled when deploying your build</td></tr></tbody></table>

## Executions

Your app's *Executions* tab reveals all tasks that have been triggered with your agent and detailed information on the time to process and ultimate status of the task:

<figure><img src="/files/DN1LksxAXGJG9CE0k80M" alt=""><figcaption><p>Executions tab of Async Worker app</p></figcaption></figure>

* *Goal*: Lists the request message a user gave to the agent
* *Status*: Lists the current progress state as it performs a request
  * *Completed*: Finished the defined goal request
  * *Waiting for user*: Awaiting additional information from the user to complete a request
  * *Running*: Currently performing the request
  * *Failed*: An error occurred during execution and the task request could not be completed
* *Runtime*: The length of time it takes the agent to complete a request
* *Timestamp*: The date and time when a request came in and an execution plan was created

## App settings

Select your app's *Settings* tab to access the following:

<details>

<summary>Custom timeout</summary>

Set a timeout (in seconds) for connecting to the AI provider service. You may also specify the number of successive attempts you permit connection attempts before the request is marked as a failure

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nlx.ai/platform/nlx-platform-guide/ai-applications/types/async-worker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
