> For the complete documentation index, see [llms.txt](https://docs.karini.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.karini.ai/kai-natural-language-agent-builder.md).

# Kai

Kai is Karini AI's natural language agent builder: describe a workflow in plain language and Kai designs, configures, validates, and deploys it.

### Overview

Kai is Karini AI's natural language agent builder. It's integrated directly into the recipe interface and lets you design, configure, and publish workflows through conversation, with no manual node placement or drag-and-drop configuration.

You work with Kai through a dedicated chat panel next to the canvas. As you give instructions, Kai translates them into workflow changes and applies them to the canvas in real time.

Kai handles the full lifecycle of workflow design, from building complex pipelines from scratch to making targeted changes to existing workflows:

* **Design workflows from scratch:** describe the workflow you want in natural language and Kai generates a fully structured canvas, complete with node placement, edge connections, and prompt configuration. Complex pipelines such as RAG, data classification, or content generation can be built entirely through conversation.
* **Modify existing workflows:** Kai makes targeted changes to any deployed workflow, so you can refactor, simplify, optimize, or extend it without rebuilding from scratch. Changes apply only to the components you specify, leaving every other node, edge, and configuration intact.
* **Node management:** Kai can add or remove any supported node type, including Chat, Webhook, Sink, Processing, Router, Agent, Guardrail, and Knowledge Base nodes. New nodes are positioned and connected automatically, preserving the structure and data flow of the graph.

Kai also works in the [Skills Library](https://www.karini.ai/insights/skills-library), where it acts as a skill assistant: give it an SOP or runbook and it drafts a reusable agent skill.

{% hint style="info" %}
Some settings and screens in the product still use the label **NLA** (Natural Language Assistant). These all refer to Kai.
{% endhint %}

### Prerequisites

Before using Kai, make sure the required models are configured in your **organization settings**.

**1. NLA Assistant Model**

The **NLA Assistant Model** is the primary LLM endpoint that powers Kai. Kai doesn't work without it.

**2. NLA Advisor Model**

The **NLA Advisor Model** is optional and assists with natural language processing tasks within advisor workflows.

To configure these, navigate to [**Organization Settings**](/organization.md#natural-language-assistant) **→ Global Default Model Endpoints**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FYAhQxYzCjoPd6uz2M5AB%2Fimage.png?alt=media&amp;token=3567ea1d-2ee4-45a7-aec1-3538bfc0fb5b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If the **NLA Advisor Model** is not configured on the organization settings page, the **NLA Assistant Model** is used as the fallback model.
{% endhint %}

After the model settings are configured, an **Admin** must create the **NLA from Template** on the **Organization** page to enable Kai.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F9ZUhMlyC9MrXMASxPUJg%2Fimage.png?alt=media&amp;token=f7dfe854-002d-450c-a87f-4eedaa25940b" alt=""><figcaption></figcaption></figure>

Once created, the **NLA Builder recipe** becomes available with the configured tools. This recipe is already **published** and **deployed**, so users can start using Kai right away.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FMSTW1cvUCmoeVW90LI6X%2Fimage.png?alt=media&amp;token=50ba487d-e684-446f-904d-16f586e295f8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Click **Create New Version** to create a new version of the current NLA Builder recipe. This lets you make controlled updates while keeping the existing version for traceability, comparison, and rollback.
{% endhint %}

### Start Building with Kai

1. Navigate to the **Recipes** page.
2. Click **Add New**.
3. Select the **Natural Language Recipe Builder** icon.
4. The Kai chat widget opens.
5. Describe your requirement in natural language to start building the workflow.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FzVIlNmLBMMGkAY7ZMGGa%2Fimage.png?alt=media&amp;token=1278370e-ce67-454b-9d34-d5c2dc68985a" alt=""><figcaption></figcaption></figure>

### How Kai Builds a Workflow

Workflow creation follows a structured, multi-phase dialogue.

#### **1. Describe your idea**

This is the entry point. You give a high-level description of what the workflow should accomplish, and Kai extracts the key signals: the workflow's purpose, expected inputs and outputs, and implied logic branches.

Kai doesn't need structured input or special syntax; it resolves ambiguity in the next phase. The more specific your description, the fewer clarifying questions Kai asks.

For example: *"Create a customer support pipeline that routes incoming queries to specialized handlers based on category."*

After you enter your request, the Kai chat widget shows its response.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FZrqHy8qcp8Bv27yIIOjo%2Fimage.png?alt=media&amp;token=7a0d5dcd-c916-4446-b876-3cd66bbe9507" alt=""><figcaption></figcaption></figure>

#### **2. Provide required inputs**

Kai identifies gaps in the specification, such as missing parameters, undefined conditions, or branching logic it can't infer, and asks 1 to 4 targeted questions, prioritized by their impact on the workflow structure.

This phase is intentionally short: Kai avoids exhaustive questioning, makes reasonable assumptions where it can, and flags those assumptions explicitly. The goal is a buildable specification with minimal back-and-forth.

Answer each question and clarify anything missing or ambiguous so Kai can generate the workflow configuration accurately.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Feci9tKRL87oJtflZVLYP%2Fimage.png?alt=media&amp;token=1ebc7c83-f5e8-4c59-a1d3-45d53ca2e0be" alt=""><figcaption></figcaption></figure>

#### **3. Review the recipe layout**

Once it has enough information, Kai builds a structural skeleton of the workflow on the canvas: every node, such as AI nodes, routers, and input and output handlers, and the edges that carry data between them.

At the same time, Kai gives you a plain-language summary listing each node, its role, and how it connects to the others. You can request changes before any prompts or models are configured. This checkpoint catches structural errors early.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F26MkRMhCVXwI1gQjDd3o%2Fimage.png?alt=media&amp;token=10cd58ea-c6f3-4774-9177-4dddf68a3e7d" alt=""><figcaption></figcaption></figure>

The generated workflow appears in the Recipe Builder canvas, where you can review the structure, validate the configured nodes, and make any changes before saving or publishing.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FK3Lj9Kw3SSDTxrBJW9fm%2Fimage.png?alt=media&amp;token=fc87ec92-af55-48b5-9431-183671ea533e" alt=""><figcaption></figcaption></figure>

#### **4. Prompt and model configuration**

With the structure approved, Kai configures each AI node, selecting a default LLM based on the node's function and your stated intent.

Kai then generates or assigns prompts for each node. Before creating a new prompt, it searches your existing prompt library for close matches and proposes reusing them rather than duplicating them. You can accept, override, or edit any prompt at this stage.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FY28gqItxyVrOKXrzvA5s%2Fimage.png?alt=media&amp;token=7f588332-f018-4af1-b53e-7adf0922e4f2" alt=""><figcaption></figcaption></figure>

#### **5. Validation**

Kai runs automated tests on each AI node using representative sample inputs, and checks the outputs against the expected behavior you defined or that it inferred from the workflow's intent.

If a node's output falls outside acceptable bounds, Kai enters a revision loop: it adjusts the prompt, reruns the test, and shows you the result. This continues until the node passes or you override it manually. The loop has a limit, so it can't cycle forever.

After the workflow is **published**, the recipe is updated with the generated **recipe name** and **recipe version**. You can check these in the Recipe Builder to confirm the workflow was saved and versioned.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FHlZxcTp1TOQeyhZGMS84%2Fimage.png?alt=media&amp;token=d002d6d5-de1e-4f48-a36c-b0ee6cca0909" alt=""><figcaption></figcaption></figure>

#### **6. Deployment**

This is the final phase. Once you confirm the workflow is correct, tell Kai to publish it in the chat panel. Kai runs a pre-deployment check for disconnected nodes, missing configurations, and unresolved prompt slots, then packages and deploys the workflow.

After deployment, Kai confirms the **active deployment status** and gives you the published workflow's **endpoint** or **identifier**, depending on your platform configuration.

You can then create a **Copilot** and test the deployed workflow to make sure it works as expected.
