A logic block is an array of steps. Each step has a type and a config. Steps run in order and write named outputs that later steps read.
Entity operations
- get_entity — fetch a single record by key.
- list_entities — query records with filters.
- create_entity — insert a record.
- update_entity — update a record.
- delete_entity — delete a record.
- query_entity — get / list / search from inside the block (enables RAG and memory).
Control flow & data
- condition — branch on a boolean expression.
- loop — iterate over a list, running nested steps per item.
- set_variable — assign a computed value to a named variable.
- formula — compute derived values with built-in functions.
- transform — map and reshape step outputs.
External calls
- webhook — call an external HTTPS endpoint (a domain allowlist is enforced).
- connector — call a platform-defined connector action using the tenant's stored credentials.
AI steps
- ai_call — a single AI provider call: classify, extract, summarize, generate, decide, translate.
- ai_agent — a tool-use loop where the model calls other logic blocks as tools.
- ai_compare — the same prompt to several providers in parallel, returning a ranked array.
- run_crew — delegate to a deployed multi-agent crew.
Example — a decision gate
text
s1: ai_call intent=decide outputFormat=boolean
contextFields=[{label: content, value: {{input.text}}}]
instructions="Does this contain any PII?"
s2: condition field={{s1.decision}} operator=== value=true
then: [s3_redact] else: [s4_pass] Mix freely
Steps compose — a loop can contain a connector call; a condition can gate a create_entity; an ai_agent can call a logic block that itself queries entities. Keep each step doing one thing.