To get support by the Visual Studio Code extension, create a file with the name *.agent.yml or *.agent.yaml.
version: "0.1"
structure:
id: "my-agent"
action: ...
constants: { ... }
slots: [...]
Root Structure
The root configuration object for an LLM Agent.
| Property | Type | Required | Description |
|---|
version | string | Yes | Fixed to "0.1". |
structure | Agent Structure | Yes | The agent structure definition. |
Agent Structure
The agent structure configuration object.
| Property | Type | Required | Description |
|---|
id | string | Yes | Unique identifier for the LLM agent (structure). |
action | Step | Yes | The root step (often a chain). |
constants | object | No | Constants available to all steps. |
slots | array | No | Preloads for slots before execution. List of LoadToSlot. |
LoadToSlot
Pre-loads data into slots when the agent starts.
| Property | Type | Required | Description |
|---|
name | string | Yes | The name of the slot to populate. |
source | ValueSource | Yes | The source of the value. |
Example
version: "0.1"
structure:
id: simple-chat
constants:
greeting: "Hello there!"
action:
id: main
message:
message: "{{greeting}}"
Steps
A Step defines a unit of work. Every step must have an id and may optionally have conditions.
In addition to the common properties, a Step MUST define exactly one of the specific action properties (e.g., message, llm, chain, combined, etc.).
Common Properties
| Property | Type | Required | Description |
|---|
id | string | Yes | Unique identifier for the step. |
conditions | array | No | List of Condition. |
If any condition fails, the step is skipped.
Message Step
Sends a message to the user.
| Property | Type | Required | Description |
|---|
message | MessageBody | Yes | Configuration for the message. |
MessageBody
| Property | Type | Required | Description |
|---|
message | string | Yes | The text content. Supports templates. |
hold | boolean | No | Hold the conversation after this message. Default: false. |
LLM Step
Invokes a Large Language Model and streams the response.
| Property | Type | Required | Description |
|---|
llm | LlmBody | Yes | Configuration for the LLM call. |
LlmBody
| Property | Type | Required | Description |
|---|
prompts | array | Yes | List of Prompt. |
model | string | No | Overrides the default model. |
temperature | number | No | Sampling temperature. |
memory | array | No | List of Selection to include in context. |
memory-limit | integer | No | Max tokens/messages from memory? |
store | SaveTarget | No | Where to save the LLM response (optional). |
hold | boolean | No | Hold the conversation after this message. Default: false. |
skip-prefix | boolean | No | Deprecated. |
Chain Step
Executes a sequence of steps.
| Property | Type | Required | Description |
|---|
chain | array<Step> | Yes | A list of Steps to execute in order. |
Combined Step
Executes multiple steps in parallel. Use with care due to potential interference.
| Property | Type | Required | Description |
|---|
combined | array<Step> | Yes | Steps to execute concurrently (in parallel). |
Flow Step
Controls the execution flow (goto or result).
| Property | Type | Required | Description |
|---|
flow | FlowBody | Yes | Flow control definition. |
FlowBody
| Property | Type | Required | Description |
|---|
goto | string | No | The ID of the step to jump to. |
action | string | No | "continue" or "repeat". |
Note: One of goto or action is required. IDs of chain steps are not allowed in goto. Use the ID of the first step within the chain instead.
SetSlot Step
Sets values in slots.
| Property | Type | Required | Description |
|---|
set-slot | SetSlotBody | Yes | Configuration for setting slots. |
SetSlotBody
| Property | Type | Required | Description |
|---|
values | array | Yes | List of SlotValuePair. |
APICall Step
Performs an HTTP API call.
| Property | Type | Required | Description |
|---|
api-call | ApiBody | Yes | Configuration for the API call. |
ApiBody
| Property | Type | Required | Description |
|---|
url | string | Yes | Target URL. |
method | string | Yes | HTTP Method (GET, POST, PUT, DELETE). |
headers | array | No | List of headers. |
Header format:
| Property | Type | Required | Description |
|---|
key | string | Yes | Header name. |
value | Template | Yes | Header value (templated). |
body | string | No | Request body (template supported). |
response-path | string | No | Path to extract from JSON response. |
target | SaveTarget | Yes | Where to save the result. |
success | Flow | Yes | Flow to execute on success. |
fail | Flow | Yes | Flow to execute on failure. |
SSECall Step
Connects to a Server-Sent Events stream.
| Property | Type | Required | Description |
|---|
sse-call | SseBody | Yes | SSE configuration. |
SseBody
| Property | Type | Required | Description |
|---|
url | string | Yes | Target URL. |
method | string | Yes | HTTP Method (GET, POST, PUT, DELETE). |
headers | array | No | List of headers. |
body | Template | No | Request body (template supported). |
response-path | string | No | Path to extract from SSE messages. |
store | SaveTarget | No | Where to save incoming SSE data (optional). |
Validator Step
Validates the conversation or state against goals.
| Property | Type | Required | Description |
|---|
validator | ValidatorBody | Yes | Validation configuration. |
ValidatorBody
| Property | Type | Required | Description |
|---|
goals | array | Yes | List of ConversationGoal. |
type | string | No | "all" or "any". |
success | Flow | Yes | Flow if validation passes. |
fail | Flow | Yes | Flow if validation fails. |
Extracts structured data using an LLM.
| Property | Type | Required | Description |
|---|
extractor | ExtractorBody | Yes | Extraction configuration. |
ExtractorBody
| Property | Type | Required | Description |
|---|
description | Template | Yes | Description of the value to extract. |
type | string | No | Type (string by default). |
enum | array<string> | No | Allowed values (optional). |
examples | array<Template> | No | Few-shot examples. |
items | ExtractionSchema | No | Item schema if type is an array. |
properties | object<string, ExtractionSchema> | No | Object schema if type is object. |
target | SaveTarget | Yes | Where to save the extracted value. |
| Property | Type | Required | Description |
|---|
description | Template | Yes | Description of the value to extract. |
type | string | No | Type (string by default). |
enum | array<string> | No | Allowed values (optional). |
examples | array<Template> | No | Few-shot examples. |
items | ExtractionSchema | No | Item schema if type is an array. |
properties | object<string, ExtractionSchema> | No | Object schema if type is object. |
success | Flow | Yes | Flow on success. |
fail | Flow | Yes | Flow on failure. |
Retriever Step
Retrieves documents from the collection.
| Property | Type | Required | Description |
|---|
retriever | RetrieverBody | Yes | Retrieval configuration. |
RetrieverBody
| Property | Type | Required | Description |
|---|
query | SlotPath | Yes | Slot containing the query. |
target | SaveTarget | Yes | Where to save results. |
limit | integer | No | Max results. Default: 4. |
secondary | boolean | No | Whether to use secondary document stores. Default: true. |
CounterStep
Increments a counter.
| Property | Type | Required | Description |
|---|
counter | CounterBody | Yes | Counter configuration. |
CounterBody
| Property | Type | Required | Description |
|---|
slot | SlotPath | Yes | The slot to increment. |
Common Types
Condition
| Property | Type | Required | Description |
|---|
name | string | Yes | Name of the condition/slot to check. |
condition | ConditionOperation | Yes | The check to perform. |
destination | string | No | Destination of the slot. Default: "conversation". |
global | `boolean | No | Deprecated: use destination instead. |
ConditionOperation
One of:
{ "equals": value }
{ "not-equals": value }
{ "exists": boolean }
{ "greater-than": number }
{ "less-than": number }
{ "greater-than-or-equal": number }
{ "less-than-or-equal": number }
Prompt
Defines a message in the LLM context. One of:
system: Template (System prompt)
user: Template (User prompt)
a-i: Template (AI response)
constant: string (Include a named constant)
Selection
Selects context/memory. One of:
{ "selector": "current" | "all" }
{ "from": "string" } (Selects from a specific source/ID)
SaveTarget
| Property | Type | Required | Description |
|---|
slot | SlotPath | Yes | The slot to write to. |
SlotPath
| Property | Type | Required | Description |
|---|
name | string | Yes | Slot name. |
destination | string | No | Destination of the slot: "conversation" (default), "global", "session", "module". |
global | `boolean | No | Deprecated: use destination instead. |
SlotValuePair
| Property | Type | Required | Description |
|---|
path | SlotPath | Yes | The slot to set. |
value | Template | Yes | The value to set (supports templates). |
ValueSource
One of:
SessionPath
| Property | Type | Required | Description |
|---|
session | Selection | No | Session selector. Default: Current session. |
module | Selection | No | Module selector. Default: Current module. |
path | string | Yes | Path to the value. |
ModulePath
| Property | Type | Required | Description |
|---|
module | Selection | No | Module selector. Default: Current module. |
path | string | Yes | Path to the value. |
UserPath
| Property | Type | Required | Description |
|---|
path | string | Yes | Path to the value. |
Flow
Used for success/fail handlers. One of:
{ "goto": "step-id" }
{ "action": "continue" | "repeat" }
Note: IDs of chain steps are not allowed in goto. Use the ID of the first step within the chain instead.
Template
Templates can contain placeholders for slot injection. Syntax: {{destination.slot_name}}.
Destinations can be global, module, session, conversation. If no destination is provided, conversation is used by default.
SummarizerStep
Summarizes the current conversation and stores it into a slot (commonly summary).
| Property | Type | Required | Description |
|---|
summarizer | SummarizerBody | Yes | Summarization configuration. |
SummarizerBody
| Property | Type | Required | Description |
|---|
prompts | array<Prompt> | No | List of prompts guiding the summary. |
model | string | No | Overrides the default model. |
temperature | number | No | Sampling temperature. |
memory | array<Selection> | No | Memory selection to include. |
memory-limit | integer | No | Limit of memory entries to consider. |
skip-prefix | boolean | No | Whether to skip prefixing. |
type | append/replace | No | Update type when writing the summary to the slot. |