A Glyph's entry point receives ctx as its second argument — handler(request, ctx) in Python, module.exports.handler = (request, ctx) => {} in Node. Every member below is the ONLY way a Glyph reaches anything outside its own sandbox. There is no raw AWS SDK access, in either language — see Security invariants at the bottom.
The complete call-by-call list, with every signature and an example in both languages, is the generated [SDK reference](glyphs/sdk-reference); this page keeps the concepts. Two members are worth knowing about up front: ctx.connector.invoke runs an action of any connector your org has adopted (a payment checkout, a Slack message) through the same code Logic Blocks and the /ipaas route use, and ctx.user is the person the run is for.
Data — ctx.app_db
Goes through the platform's real entity step-runners — the same reach a Logic Block's own entity steps have, including whatever org governance or view/projection rules that entity already has. Never a raw table read.
Every call, with signatures and examples, is in the [SDK reference](glyphs/sdk-reference) under Data.
Files — ctx.content_s3
Every call, with signatures and examples, is in the [SDK reference](glyphs/sdk-reference) under Files.
Outbound HTTP — ctx.http
Every call, with signatures and examples, is in the [SDK reference](glyphs/sdk-reference) under Outbound HTTP.
Same allowlist connectors use
This is the identical SSRF guard connector.invoke calls already enforce — not a second, independently-implemented allowlist. Add a domain in Org Settings → Allowed Domains before a Glyph can reach it.
No domains configured yet? Every ctx.http call fails.
An org with an empty Allowed Domains list blocks ctx.http entirely, not "allow everything." If a Glyph's first ctx.http.get/post fails immediately, check Org Settings → Allowed Domains before assuming a bug in your own code.
Events, async re-invoke, and email
Every call, with signatures and examples, is in the [SDK reference](glyphs/sdk-reference) under Events and async.
Standard-library access — ctx.lib
A platform-curated allowlist of pure, zero-I/O functions — not a general import mechanism. Raw import/require stay completely blocked (see Security invariants below). It spans two tiers: stdlib/builtin modules (json, re, math, uuid, crypto, path, ...) and a small set of vetted third-party utility packages (python-dateutil, a cherry-picked cut of lodash). Full function-by-function reference, with a worked example for every single one: [Standard-library reference →](glyphs/standard-library).
Why not just `import`?
Every ctx.lib entry — both tiers — is a platform-admin-vetted, pure-compute function with zero network, filesystem, or subprocess access, permanently, vetted once and safe everywhere with no per-org opt-in needed. Anything with its own I/O (HTTP clients, filesystem, subprocess, database drivers) is permanently excluded, because it would bypass ctx.http's Allowed Domains allowlist entirely — neither sandbox sits in a network-isolated subnet yet.
Context & logging
| Python | Node | Notes |
|---|---|---|
| ctx.org_code | ctx.orgCode | Read-only, always present. |
| ctx.tenant_code | ctx.tenantCode | None/null for an org-level (no-tenant) invocation. |
| ctx.config | ctx.config | This Glyph's own author-set key/value settings from the Settings tab. They are the same for every tenant — put anything that differs per tenant (each tenant's own keys, ids, URLs) in ctx.params instead. |
| ctx.log(*args) | ctx.log(...args) | Captured and returned as logs in the invoke result (Test tab, or the logs of the run) — the documented, stable way to log (print/console.log are also captured, but ctx.log is preferred). |
| ctx.params.settings / ctx.params.secrets | ctx.params.settings / ctx.params.secrets | The tenant's own settings (Tenant Management → General) and secrets (→ Secrets), read-only, decrypted for the run. Not the same as ctx.config, which holds your own Glyph's settings. |
| ctx.params.flags | ctx.params.flags | The tenant's feature flags for this run, as a read-only map of flag key to value (empty when there are none). They are worked out for the person the run is for (ctx.user); for a scheduled run, that is the schedule's run-as user. Always give your own default when you read one. |
Input only — no declared output shape
Your inputSchema (Schema tab) is validated before your handler runs. What your handler returns is returned as-is — there's no symmetric "response schema" to declare or validate against, closer to a plain Lambda function than a Logic Block step in this respect.
Use a secret to call something, but don't return or log it on purpose. Every secret value is scrubbed — replaced with [redacted] — from your result, logs and errors, wherever it appears. Settings are plain values and are not scrubbed. Keep anything sensitive in Secrets, not General.
Security invariants
These are fixed, not settings you can turn off:
- Every SDK member is scoped to your org(+tenant) automatically — there is no parameter on any of them that lets a Glyph ask for another org's data.
- Real table/bucket names are never exposed to your code, and are redacted from anything your Glyph returns or logs, as defense-in-depth.
- Direct AWS SDK access is blocked at the language level, not just discouraged. Python strips
import/open/eval/exec/compilefrom builtins —import boto3raises an error. Node'svmcontext has norequire/process/Buffer/global—require('aws-sdk')throws. ctx.lib doesn't relax this — it's a short, hand-vetted allowlist added as a new ctx member, not a change to what import/require can do. - The code that runs is exactly the code that was saved — both sandboxes verify a SHA-256 checksum against S3 before executing anything; a stale or tampered object fails closed.
- Outbound HTTP is allowlist-gated (see ctx.http above) — the same model connectors already use.
One known, flagged gap
Neither sandbox sits in a network-isolated subnet yet — that's tracked as a real, open item, not something already handled. The points above are what make legitimate use safe and predictable today; they aren't a complete guarantee against a determined attacker.
SDK reference
Every ctx.* call with its signature and an example, in Python and JavaScript.
Standard-library reference
Every ctx.lib function, both tiers, both languages — with a worked example each.
What a Glyph is
Creating one, the draft/active/history model, where you can invoke one from today.
Connectors
The same allowlist and credential model ctx.http and connector.invoke share.