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.

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.
  • create_variable — declare a named variable with a type (see Variable types).
  • end — stop the whole block now, optionally with a chosen output.
  • break — leave the nearest loop.
  • continue — skip to the next item of the loop.

External calls

  • webhook — call an external HTTPS endpoint (the host must be on your org's Outbound Allowed Domains in Org Settings). Tenant secrets go in as {{secret:NAME}} in a header, the body or a query parameter.
  • connector — call an adopted connector's action (including a payment connector's checkout) using the tenant's stored credentials.
  • glyph — run one of your own Glyphs (custom Python or JavaScript) with an optional input, and use its return value as the step's output. Runs the Glyph's Active version unless you choose draft. See Glyphs.
  • document_extract — read the text out of one or more uploaded files (PDF), with no AI involved. Give it file references (an S3 key from a file field, or a presigned URL for your app's storage); it returns each file's text and page count, plus a combinedText value that joins every file so you can pass it straight into an ai_call. A file that can't be read gets an error entry and the others still extract. It only reads files uploaded in the same workspace — a reference to any other file fails the step.

AI steps

  • ai_call — a single AI provider call: classify, extract, summarize, generate, decide, translate — including comparing across options.
  • 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; a run_crew step can hand off to a crew that itself triggers other logic blocks. Keep each step doing one thing.