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

# ABL Overview

Agent Blueprint Language (ABL) is the enterprise control plane for agentic AI — a schema-driven language purpose-built for multi-agent orchestration where deterministic governance meets autonomous reasoning. ABL spans the full control spectrum: delegate autonomously, supervise selectively, or lock down as a deterministic state machine. Agent definitions compile into immutable artifacts, and AI can author blueprints just as humans do.

## File structure

An ABL document is a plain-text file composed of top-level **sections**, each introduced by an uppercase keyword followed by a colon. Sections can appear in any order, but by convention the `AGENT:` declaration comes first.

```yaml theme={null}
AGENT: Customer_Support

GOAL: |
  Help customers resolve billing questions.

PERSONA: |
  Friendly, patient support representative.

TOOLS:
  lookup_account(account_id: string) -> {name: string, balance: number}
    description: "Retrieve account details"
    type: http
    endpoint: "/api/accounts/lookup"
    method: POST

GATHER:
  account_id:
    prompt: "What is your account number?"
    type: string
    required: true
```

### File extensions

| Extension     | Contents                                                                                               |
| ------------- | ------------------------------------------------------------------------------------------------------ |
| `.agent.abl`  | Agent definition (most common)                                                                         |
| `.tools.abl`  | Reusable tool library (see [Tool file imports](/agent-platform/abl-reference/tools#tool-file-imports)) |
| `.agent.yaml` | Agent definition in YAML format                                                                        |

### Required sections

Every agent document must contain:

* `AGENT:` -- the agent name
* `GOAL:` -- the agent's objective

All other sections are optional. If a section is omitted, its value defaults to empty (empty list, empty object, or platform defaults as specified in each section's reference).

### Recognized top-level sections

| Section          | Purpose                         | Reference                                                                                      |
| ---------------- | ------------------------------- | ---------------------------------------------------------------------------------------------- |
| `AGENT:`         | Agent name declaration          | [Agent declaration](/agent-platform/abl-reference/agent-declaration)                           |
| `VERSION:`       | Semantic version                | [Agent declaration](/agent-platform/abl-reference/agent-declaration#version)                   |
| `DESCRIPTION:`   | Human-readable description      | [Agent declaration](/agent-platform/abl-reference/agent-declaration#description)               |
| `LANGUAGE:`      | Agent language code             | [Agent declaration](/agent-platform/abl-reference/agent-declaration#language)                  |
| `GOAL:`          | Agent objective                 | [Agent declaration](/agent-platform/abl-reference/agent-declaration#goal)                      |
| `PERSONA:`       | Agent personality description   | [Agent declaration](/agent-platform/abl-reference/agent-declaration#persona)                   |
| `LIMITATIONS:`   | Explicit boundaries             | [Agent declaration](/agent-platform/abl-reference/agent-declaration#limitations)               |
| `IDENTITY:`      | Combined identity block         | [Agent declaration](/agent-platform/abl-reference/agent-declaration#identity)                  |
| `INSTRUCTIONS:`  | Operational instructions        | [Agent declaration](/agent-platform/abl-reference/agent-declaration#instructions)              |
| `EXECUTION:`     | Model and runtime configuration | [Agent declaration](/agent-platform/abl-reference/agent-declaration#execution-configuration)   |
| `TOOLS:`         | Tool definitions                | [Tools](/agent-platform/abl-reference/tools)                                                   |
| `GATHER:`        | Information collection fields   | [GATHER](/agent-platform/abl-reference/gather)                                                 |
| `FLOW:`          | Structured execution steps      | [FLOW](/agent-platform/abl-reference/flow)                                                     |
| `MEMORY:`        | Session and persistent state    | [Memory & Constraints](/agent-platform/abl-reference/memory-and-constraints)                   |
| `CONSTRAINTS:`   | Business rule enforcement       | [Memory & Constraints](/agent-platform/abl-reference/memory-and-constraints#constraints)       |
| `GUARDRAILS:`    | Input/output safety checks      | [Guardrails](/agent-platform/abl-reference/guardrails)                                         |
| `DELEGATE:`      | Sub-agent delegation            | [Multi-Agent & Supervisor](/agent-platform/abl-reference/multi-agent-and-supervisor#delegate)  |
| `HANDOFF:`       | Agent transfer                  | [Multi-Agent & Supervisor](/agent-platform/abl-reference/multi-agent-and-supervisor#handoff)   |
| `ESCALATE:`      | Human escalation                | [Multi-Agent & Supervisor](/agent-platform/abl-reference/multi-agent-and-supervisor#escalate)  |
| `COMPLETE:`      | Completion conditions           | [Multi-Agent & Supervisor](/agent-platform/abl-reference/multi-agent-and-supervisor#complete)  |
| `ON_ERROR:`      | Error handlers                  | [Lifecycle & Hooks](/agent-platform/abl-reference/lifecycle-and-hooks#on_error-handlers)       |
| `ON_START:`      | Session initialization          | [Lifecycle & Hooks](/agent-platform/abl-reference/lifecycle-and-hooks#on_start-handler)        |
| `MESSAGES:`      | Customizable system messages    | --                                                                                             |
| `TEMPLATES:`     | Reusable response templates     | [Rich Content & Expressions](/agent-platform/abl-reference/rich-content-and-expressions)       |
| `HOOKS:`         | Lifecycle event handlers        | [Lifecycle & Hooks](/agent-platform/abl-reference/lifecycle-and-hooks#hooks)                   |
| `NLU:`           | Natural language understanding  | [NLU](/agent-platform/abl-reference/nlu)                                                       |
| `MULTI_INTENT:`  | Multi-intent configuration      | [NLU](/agent-platform/abl-reference/nlu)                                                       |
| `LOOKUP_TABLES:` | Reference data for validation   | [Data Types & Utilities](/agent-platform/abl-reference/data-types-and-utilities#lookup-tables) |
| `SYSTEM_PROMPT:` | Custom system prompt template   | --                                                                                             |
| `ATTACHMENTS:`   | File/media collection           | [Data Types & Utilities](/agent-platform/abl-reference/data-types-and-utilities#attachments)   |

## Syntax rules

### Indentation

ABL uses indentation to express nesting. Use **spaces** (two or more) for indentation. Tabs are accepted but spaces are preferred for consistency. Content nested under a section keyword must be indented further than the keyword line.

```yaml theme={null}
TOOLS:
  search(query: string) -> {results: string[]}
    description: "Search the catalog"
    type: http
    endpoint: "/api/search"
    method: GET
```

### Keywords

Section keywords are **uppercase** by convention and followed by a colon (`:`). Keywords are case-insensitive at the parser level -- `AGENT:`, `agent:`, and `Agent:` all parse identically. However, uppercase is the canonical style for the ABL format.

In YAML format files (`.agent.yaml`), lowercase keywords are used exclusively.

### Comments

Lines beginning with `#` are comments and are ignored by the parser. Comments can appear anywhere in the file.

```yaml theme={null}
# This is a comment
AGENT: My_Agent

GOAL: "Help with orders"  # Inline comments are NOT supported in ABL format
```

### Strings

Strings can be written in several forms:

| Form       | Syntax                                     | Use case                                 |
| ---------- | ------------------------------------------ | ---------------------------------------- |
| Quoted     | `"value"`                                  | Single-line values                       |
| Unquoted   | `value`                                    | Simple values without special characters |
| Pipe block | <code>\|</code> followed by indented lines | Multi-line text (preserves newlines)     |

```yaml theme={null}
GOAL: "Single line goal"

GOAL: |
  Multi-line goal that preserves
  line breaks within the block.

LANGUAGE: "en"
```

### Lists

Lists use YAML-style `- item` syntax with indentation:

```yaml theme={null}
LIMITATIONS:
  - "Cannot access external systems"
  - "Cannot process payments directly"
```

## Auto-detection

The parser determines the document type from the first meaningful keyword it encounters:

| First keyword                                   | Document type             |
| ----------------------------------------------- | ------------------------- |
| `AGENT:`                                        | Agent document            |
| `SUPERVISOR:`                                   | Supervisor document       |
| `BEHAVIOR_PROFILE:`                             | Behavior profile document |
| `TOOLS:` (at root level in a `.tools.abl` file) | Tool file document        |

Within an agent document, execution mode is **not** declared via a global `MODE:` keyword. Instead, agents operate in reasoning mode by default -- the LLM decides which tools to call and when, guided by the `GOAL:` and `PERSONA:`.

Any agent can optionally include a `FLOW:` section to add structured execution steps. Adding a `FLOW:` section gives the agent a step-by-step execution graph. Each step within the flow declares `REASONING: true` or `REASONING: false` to control whether that individual step uses LLM reasoning or deterministic execution.

> **Note:** The `MODE:` keyword is deprecated and produces a parser error if used. Remove it and use per-step `REASONING:` declarations within `FLOW:` instead.

## YAML format

ABL supports an alternative YAML format for agent definitions. YAML files use `.agent.yaml` as their extension. The parser auto-detects YAML format by checking whether the first non-comment, non-empty lines use lowercase keys matching known ABL sections (`agent`, `goal`, `persona`, `tools`, etc.).

```yaml theme={null}
agent: Customer_Support

goal: |
  Help customers resolve billing questions.

persona: |
  Friendly, patient support representative.

tools:
  - name: lookup_account
    parameters:
      - name: account_id
        type: string
    returns:
      type: object
      fields:
        name: string
        balance: number
    description: Retrieve account details
    type: http
    endpoint: /api/accounts/lookup
    method: POST
```

Both formats produce the same intermediate representation (AST) and compile to identical runtime artifacts.

## Version declaration

The optional `VERSION:` directive specifies the document version in semver format:

```yaml theme={null}
VERSION: "2.0.0"
```

When omitted, the version defaults to `"1.0.0"`. The version is stored in the document metadata and can be used for compatibility tracking.

## Template interpolation

Throughout ABL, string values support template interpolation using double-brace syntax:

```
"Hello, {{customer_name}}. Your balance is {{balance}}."
```

Conditional blocks use Handlebars-style helpers:

```
"{{#if exchange_rate}}Rate: {{exchange_rate}}{{/if}}"
```

Template expressions are resolved at runtime against session variables and tool results.
