Steps communicate through a scoped variable namespace. A step writes named outputs; later steps reference them in their config with {{varName}} templates, which are resolved at execution time.

Available variables

  • input.*** — fields from the request body.
  • input._query.*** — query-string parameters.
  • `input._path.apiname` / `input._path.pathid` — the URL path parameters.
  • steps.<stepName>.*** — the output of a named earlier step.
  • `context.userId` — the authenticated user id from the JWT.
  • `context.orgCode` / `context.tenantCode` — org and workspace from the request.
  • `context.now` — the current ISO timestamp.

Example — RAG over a policy entity

text
s1: query_entity  mode=search  entity=policy  search={{input.question}}  limit=3
s2: ai_call  intent=generate
             contextFields=[
               { label: question,  value: {{input.question}} },
               { label: documents, value: {{s1.items}} }
             ]
             instructions="Answer only using the provided documents. If not found, say so."
             outputFormat=text

Templates work everywhere

You can use {{...}} in step config values — filter values, URL templates, AI context fields, field mappings. The engine resolves them against the current variable scope before the step runs.

Example — conversation memory

text
s1: list_entities  entity=conversation_turn
                   filters=[{ field: session_id, op: eq, value: {{input.session_id}} }]
                   sort=created_at  sortDir=asc  limit=20
s2: ai_call        contextFields=[{ label: history, value: {{s1.items}} },
                                   { label: message, value: {{input.message}} }]
s3: create_entity  entity=conversation_turn
                   fields=[{ session_id: {{input.session_id}} }, { role: user },      { content: {{input.message}} }]
s4: create_entity  entity=conversation_turn
                   fields=[{ session_id: {{input.session_id}} }, { role: assistant }, { content: {{s2.response}} }]