AI
Logic
Build LLM-powered functions from blocks.
Logic builds functions that combine language models with ontology data and actions, without writing code.
Functions and blocks
A Logic function has inputs, outputs and a graph of blocks:
| Block | Does |
|---|---|
use_llm | Prompts a model, optionally with tools |
apply_action | Applies an ontology action |
execute_function | Calls a published function |
conditional | Branches on a condition |
loop | Runs a block for each item in a list |
collect | Gathers results |
create_variable | Stores a value for later blocks |
ensemble | Asks several models and combines the answers |
return | Returns the output |
A use_llm block can give the model tools to query objects, call functions, apply actions and calculate.
Limits
Every function needs at least one return block. A run is limited to 200 block executions, and a loop to 100 iterations.
Drafts, branches and publishing
You edit a draft, test it, and publish a version that others can run. Branches let you try changes in parallel and merge them back. Running a draft is limited to its owner and people with write access.
| Method | Path | Does |
|---|---|---|
| GET, POST | /ai/v2/logic/functions | List or create functions |
| POST | /ai/v2/logic/functions/{rid}/publish | Publish |
| POST | /ai/v2/logic/functions/{rid}/run | Run with {"inputs": {...}} |
| GET | /ai/v2/logic/functions/{rid}/runs | Run history |