Logic Blocks, Glyphs and agents belong to your organization and run for every tenant. Each run receives the organization's flags already worked out for the person and tenant it is running for, in the same way it receives tenant settings. There is nothing to call and nothing to configure.

WhereWriteMissing flag
Logic Block step or condition{{params.flags.new-checkout}}empty
Agent instructions{{params.flags.new-checkout}} — filled in when the agent runsempty
JavaScript Glyphctx.params.flags['new-checkout']undefined
Python Glyphctx.params.flags.get('new-checkout', False)your default

A Logic Block

Use the value in any step field, or branch on it with a condition step:

json
{
  "id": "pricing",
  "type": "condition",
  "config": { "field": "{{params.flags.new-pricing}}", "operator": "==", "value": "true" },
  "then": ["use_new_price"],
  "else": ["use_old_price"]
}

Because the block is the same for every tenant, two tenants running it get different results only because their flags differ — exactly what you want.

A Glyph

js
// JavaScript
module.exports.handler = async (request, ctx) => {
  const useNew = ctx.params.flags['new-pricing'] ?? false;
  return { price: useNew ? newPrice(request) : oldPrice(request) };
};
py
# Python
def handler(request, ctx):
    use_new = ctx.params.flags.get('new-pricing', False)
    return {'price': new_price(request) if use_new else old_price(request)}

An agent

Put the token in the agent's instructions and the value is filled in for the run, so you can change how an agent behaves per tenant or per rollout without editing it:

text
You are the support assistant.
Beta features enabled for this customer: {{params.flags.beta-features}}

The value goes to the model

What you write in instructions reaches the AI provider. Flags are plain values and never secrets; keep anything sensitive in Secrets, not in a flag.

Who the run is evaluated as

The run is…Evaluated as
Started by a signed-in user (HTTP, WebSocket, console test)That user — so a percentage rollout is stable per person.
A scheduleThe user the schedule runs as.
An event or background run with nobody behind itThe tenant itself — so a percentage rollout gives the same answer for every such run of that tenant.

Good to know

  • Flags are read when the run starts; a run that is already going is not changed halfway.
  • A scheduled change is in effect for any run that starts after it.
  • If flags cannot be read, the run still works — they are just missing. Give your asset its own default.
  • What the asset does with a value is up to you; flags only hand it over.
  • Settings and secrets work exactly as before.