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:

BlockDoes
use_llmPrompts a model, optionally with tools
apply_actionApplies an ontology action
execute_functionCalls a published function
conditionalBranches on a condition
loopRuns a block for each item in a list
collectGathers results
create_variableStores a value for later blocks
ensembleAsks several models and combines the answers
returnReturns 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.

MethodPathDoes
GET, POST/ai/v2/logic/functionsList or create functions
POST/ai/v2/logic/functions/{rid}/publishPublish
POST/ai/v2/logic/functions/{rid}/runRun with {"inputs": {...}}
GET/ai/v2/logic/functions/{rid}/runsRun history
Converge