> For the complete documentation index, see [llms.txt](https://karini-ai.gitbook.io/karini-ai-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karini-ai.gitbook.io/karini-ai-documentation/recipes/workflow-recipe/workflow-recipe-configuration.md).

# Workflow Recipe Configuration

To create a new Workflow recipe, go to the recipe page, click **Add new**, select the appropriate **runtime** option, provide a user-friendly name and detailed description, and choose **Workflow** for the recipe type.

The Recipe Editor features a drag-and-drop graph editor where you can see and modify the agent's workflow. The workflow is composed of interconnected nodes, each representing a step in the agent's processing pipeline.

You will observe the Left Panel, the blank canvas, the right panel and recipe action buttons which contains the following fields.&#x20;

<figure><img src="/files/7bj1WGL5xKQvk4nnh3FN" alt=""><figcaption></figcaption></figure>

## Right Panel (Configuration Panel):

The right panel of the interface provides several key fields that allow users to configure, test, and evaluate their workflow.

### Number of State Updates:

This field specifies the number of state updates that the workflow will track or monitor during execution. A state update typically refers to a change in the workflow’s execution state, such as data transformations, decision points, or changes in the workflow’s logic. The field:

* **Controls monitoring**: Defines how many times the state of the recipe will be tracked, helping users to optimize performance.
* **Regulates execution tracking**: Useful for complex workflows, where tracking multiple state changes helps in debugging or performance tuning.

For example, if the workflow is expected to go through 10 steps, the number of state updates could be set to 10 to track each transition between states.

### Rate limiting

Rate limiting allows you to control how frequently a recipe or individual node within a recipe can be executed over a given time window. By setting execution caps at hourly, daily, weekly, and monthly intervals, you can prevent runaway usage, manage API costs, and enforce fair access across users and teams.

<figure><img src="/files/pFVvuMpeayOnzINXlk14" alt=""><figcaption></figcaption></figure>

Rate limiting can be applied at two levels:

* **Recipe level** : limits the total number of executions for an entire recipe across all its nodes.
* **Node level** : limits executions on a specific node within a recipe, such as a Knowledge Base  node, a Reranker node, or an Agent node.

Both levels can be enabled simultaneously and operate independently.

#### **Recipe-Level Rate Limiting**

Recipe-level rate limiting is configured from the recipe's settings panel.

1. Open the workflow recipe..
2. Click recipe settings right panel.
3. Locate the **Enable rate limiting** toggle.
4. Enable the toggle and configure the desired limits.
5. Save and publish recipe.

When enabled at the recipe level, the specified limits apply to the entire recipe every execution of the recipe, regardless of which node triggers it, counts against these caps.

**Default values (Recipe level):**

| Window  | Default Limit    |
| ------- | ---------------- |
| Hourly  | 20 executions    |
| Daily   | 100 executions   |
| Weekly  | 500 executions   |
| Monthly | 2,000 executions |

#### Node-Level Rate Limiting

Node-level rate limiting is configured from an individual node's settings panel within the recipe.

**Supported node types:**

* [Knowledge Base nodes](/karini-ai-documentation/recipes/workflow-recipe/set-up-workflow-recipe.md#knowledge-base)
* [Reranker nodes](/karini-ai-documentation/recipes/workflow-recipe/set-up-workflow-recipe.md#reranker)
* [Prompt nodes](/karini-ai-documentation/recipes/workflow-recipe/set-up-workflow-recipe.md#prompt)
* [Agent nodes](/karini-ai-documentation/recipes/workflow-recipe/set-up-workflow-recipe.md#agent)
* [Deep Agent nodes](/karini-ai-documentation/recipes/workflow-recipe/set-up-workflow-recipe.md#deep-agent)
* [Router nodes](/karini-ai-documentation/recipes/workflow-recipe/set-up-workflow-recipe.md#router)

**To configure:**

1. Open the workflow recipe.
2. Click the node you want to apply rate limiting to.
3. In the node configuration panel, locate the **Enable rate limiting** toggle.
4. Enable the toggle and set the desired limits.
5. Save and publish recipe.

**Default values (Node level):**

| Window  | Default Limit     |
| ------- | ----------------- |
| Hourly  | 100 executions    |
| Daily   | 500 executions    |
| Weekly  | 2,500 executions  |
| Monthly | 10,000 executions |

You can configure any combination of limits - all four, just one, or any subset. Each limit that is configured is enforced independently.

**Limit Hierarchy Rules**

When multiple time-window limits are configured together, they must follow a strict ascending order to be valid:

```
Hourly < Daily < Weekly < Monthly
```

For example:

* ✅ Valid: Hourly = 50, Daily = 200, Weekly = 800, Monthly = 2,000
* ❌ Invalid: Hourly = 500, Daily = 200 (hourly exceeds daily)
* ❌ Invalid: Daily = 1,000, Weekly = 500 (daily exceeds weekly)

If you attempt to save a configuration where a smaller time window has a higher limit than a larger one, the platform will display a validation error and prevent saving.

**What Happens When a Limit Is Exceeded**

When an execution attempt is made after the configured limit has been reached for a given window, the request is rejected with error message.

The end user receives a message indicating that the rate limit has been exceeded. By default, this message is:

> *"Rate limit exceeded. Please wait a moment and try again."*

This message is displayed in the chat or copilot interface in place of a normal response.

**Customizing the Rate Limit Exceeded Message**

Organization Superusers can configure a custom message that is shown to users when a rate limit is exceeded.

**To configure:**

1. Navigate to **Organization Settings**.
2. Locate the **Configure Limit Exceeded Messages** section.
3. Enter the desired custom message in the **Custom Response when the Rate Limit is exceeded the threshold** field.
4. Save the settings.

The custom message applies across all recipes and copilots within the organization. If the field is left blank, the default message is used.

<figure><img src="/files/PkY3M3U190bEM7NFRvD4" alt=""><figcaption></figcaption></figure>

**Recipe-Level vs. Node-Level Rate Limiting**

Both levels can be active at the same time. They are enforced independently - a request is blocked if either the recipe-level or the node-level limit is reached first.

|                            | Recipe-Level    | Node-Level               |
| -------------------------- | --------------- | ------------------------ |
| **Scope**                  | Entire recipe   | Specific node            |
| **Configured in**          | Recipe settings | Node configuration panel |
| **Default hourly**         | 20              | 100                      |
| **Default daily**          | 100             | 500                      |
| **Default weekly**         | 500             | 2,500                    |
| **Default monthly**        | 2,000           | 10,000                   |
| **Enforced independently** | ✅               | ✅                        |

**Recommendation:**&#x20;

* Use recipe-level limits to control overall recipe execution costs and throughput.&#x20;
* Use node-level limits for nodes that call expensive or rate-sensitive external services.

### Send Alerts:

The **Send Alerts** feature enables users to configure automated notifications for specific events or errors within the system. This is especially useful for real-time monitoring and proactive issue resolution. This feature is primarily useful for:

* **Error Handling**: Notifying the user if the workflow encounters an issue or failure, enabling prompt intervention.
* **Proactive Notifications**: Ensuring users are automatically informed of critical issues without the need for continuous manual monitoring.

The following image illustrates the detailed sections.

<figure><img src="/files/JaKfVQAYTh9ZdJbiyYWB" alt=""><figcaption></figcaption></figure>

**Recipient Emails:**&#x20;

This section allows users to input email addresses that will receive the alert notifications. By pressing **Enter** or **Tab**, users can add **multiple recipient emails**. This enables the distribution of alerts to the necessary stakeholders or support teams.

\
**Subject:** The subject line of the alert email is automatically populated or can be customized based on the event. It provides a quick summary of the alert, such as a specific issue or status update.

**Message:** The message body is structured to include dynamic placeholders such as:

* {metadata.datetime}: This placeholder will be replaced with the current date and time when the alert is generated.
* {metadata.message\_url}: This dynamic link will direct the recipient to the relevant error or message URL for further details about the issue.

The message also provides details on the specific error that occurred, helping recipients quickly understand the context and take appropriate action.

**Message template**:

```
Hello,

Date: {metadata.datetime}

An error occurred in your recipe: {metadata.message_url}.

Error Details:
{errorMessage}

Please review the error message and address the issue at your earliest convenience.

Thank you!
```

### **Save and Test**

This button serves two primary functions:

1. **Save**: It saves the current configuration of the recipe, ensuring that any changes made up to this point are preserved.
2. **Test**: The Test functionality initiates a test execution of the recipe, simulating the workflow’s operation based on the provided inputs and test context. To enable this functionality, a **Chat** node must be included in the recipe. Upon clicking the Test button, the system will populate the chat window, allowing the user to input a question and evaluate the response generated by the workflow.

This feature is significant for:

* **Validating the logic:** Ensuring that the workflow executes as expected.
* **Identifying issues early**: Catching errors or unexpected behaviors before the recipe goes live.
* **Confidence before deployment:** Testing allows users to confirm the recipe’s functionality and troubleshoot before full-scale execution.

This button is integral to refining and testing the workflow in a controlled environment before it is put into production.

### Evaluation:

The Evaluation section allows users to assess the performance of the recipe by uploading a dataset. Users can choose between two evaluation options:

* **Upload Dataset**: This option allows the user to upload real or test data to evaluate how well the recipe performs with different inputs. It is a way to test the recipe with diverse data scenarios.
* **Default Evaluation**: This applies the platform's pre-defined evaluation metrics to automatically assess the recipe’s performance based on general or default criteria.
* **Custom Evaluation**: Allows the user to define specific evaluation criteria tailored to their use case. This flexibility is useful when users have unique performance metrics or requirements for how the recipe should behave.

Evaluation helps ensure that the recipe is optimized, efficient, and performs as expected under various conditions, particularly with real-world data. For further information, please refer to [Evaluation ](/karini-ai-documentation/recipes/workflow-recipe/workflow-recipe-evaluation.md)section.

## Recipe Actions

The recipe top bar provides centralized access to the primary actions required to manage a recipe across its configuration and operational lifecycle. It enables users to save changes, publish versions, initiate deployments, execute or schedule runs, and manage recipe portability and version control from a single interface.

<table><thead><tr><th width="182.7999267578125">Action</th><th>Description</th></tr></thead><tbody><tr><td><strong>Save</strong></td><td>Saves the current recipe configuration and preserves all pending changes made in the editor.</td></tr><tr><td><strong>Publish</strong></td><td>Publishes the current recipe version, making it available for deployment and other downstream operations.</td></tr><tr><td><strong>Deploy</strong></td><td>Deploys the published recipe version as a live agent. </td></tr><tr><td><strong>Run / Schedule</strong></td><td>Runs the recipe immediately or configures it for scheduled execution, based on operational requirements.</td></tr><tr><td><strong>Create Copilot</strong></td><td>Publishes the recipe as an interactive copilot that can be made available to end users.</td></tr><tr><td><strong>Download</strong></td><td>Exports the recipe configuration as a JSON file for backup, transfer, or reuse.</td></tr><tr><td><strong>Import</strong></td><td>Imports a recipe configuration from a JSON file into the editor.</td></tr><tr><td><strong>Ver.</strong></td><td>Displays available recipe versions and allows users to switch between them.</td></tr><tr><td><strong>Cancel</strong></td><td>Discards all unsaved changes from the current editing session.</td></tr></tbody></table>
