Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apps/docs/docs/language/syntax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,24 @@ variables:
- `2025-09-04`, `2025-09-04T12:01Z` -- Datetime literals in ISO 8601 format. Supported formats include date only (`YYYY-MM-DD`), date with time (`YYYY-MM-DDThh:mm`), and date with seconds and timezone (`YYYY-MM-DDThh:mm:ssZ`).
- `empty` -- Explicitly marks a block as having no content (e.g., `connection slack: empty`)

## Conditionals

Inside a procedure, `if`, `elif`, and `else` control which statements execute based on runtime values:

```agentscript
instructions: ->
if @variables.loyalty_tier == "Premium":
| You are eligible for a free return.
elif @variables.return_eligible == True:
| Processing your return request.
else:
| Please contact support for assistance.
```

- `elif` and `else` are optional.
- Multiple `elif` branches are supported.
- The body of each branch is indented one level and can contain any procedure statements — template lines, `set`, `run`, or `transition`.

## Line Continuation

Use `\` at the end of a line to continue a statement on the next line:
Expand Down