Logic blocks and agent crews cover the large majority of real backend logic without writing infrastructure code. A Glyph is what's left over — the rare case where the logic genuinely needs a real programming language: recursion, a specific parsing algorithm, a third-party library's own implementation of something. It's still a stored, versioned, org-owned unit of code — not a one-off script you paste somewhere and forget.

Not a default alternative

Reach for a Glyph only when a logic block or an agent tool genuinely can't express what you need. Both of those give you a visual, auditable trace for free; a Glyph trades that away for a real language, so it should be the exception, not the first thing you try.

Where you can call one from

FromHowWhich version runs
Glyph Studio's Test tabRun against a real request payload and see real results and logs.Draft or Active — your choice.
A Logic BlockAdd a glyph step with the Glyph's id and an optional input. Its return value becomes the step's output.Active by default; you can choose Draft while iterating.
An agent crewGive an agent the glyph.invoke tool, pointed at your Glyph. The model's tool arguments become the Glyph's request.Active by default. Not available in Studio's crew test runs — try it from a real trigger.
Your own app (HTTP)POST /app/{orgcode}/glyphs/{glyphId}/invoke with body { "input": {...} }, signed in as a tenant user. The response is { "result": ... }.Always Active, never Draft.
A scheduleMake a Glyph the target of a schedule (target type glyph). It runs in the background, so a large Glyph is allowed. The schedule's run-as user becomes ctx.user, and feature flags are evaluated for that user.Always Active, never Draft.

The HTTP endpoint is off until you set an endpoint slug

A Glyph is only reachable over HTTP once you set its Endpoint slug in the Settings tab and publish. Until then the endpoint answers 404 — the same response as for an Id that doesn't exist, so it never confirms a Glyph is there. Logic Block steps, agent tools, and the Test tab don't need a slug.

Not from an event destination yet

An Event can't invoke a Glyph directly today. To run a Glyph from an event, point the Event at a Logic Block that contains a Glyph step (event type custom_api) — the event runs that block's active version. The reverse also works: a Glyph can publish an event itself (ctx.eventbridge), which can trigger an Automation.

Creating one

1In API Studio, open Glyph Studio and create a new Glyph — give it a name and pick a runtime: Python 3.12 or JavaScript (Node 22). Each Glyph is pinned to one runtime, one version, chosen at creation.
2Write your code in the Code tab. The entry point must exist at module scope — handler in Python's globals, module.exports.handler in Node — the sandbox raises a clear error if it doesn't.
3Optionally define an input schema in the Schema tab — required fields are validated before your code ever runs.
4Save your draft, then use the Test tab to run it against a real request payload and see real results/logs.
5Click Publish/Activate when you're ready to make this version the Glyph's live Active version.
python
# Python Glyph — handler(request, ctx)
def handler(request, ctx):
    customer = ctx.app_db.get_entity("Customer", request["customerId"])
    ctx.log("looked up", customer["email"])
    return {"greeting": f"Hi {customer['name']}!"}
javascript
// JavaScript Glyph — module.exports.handler = (request, ctx) => {}
module.exports.handler = async (request, ctx) => {
  const customer = await ctx.app_db.getEntity("Customer", request.customerId);
  ctx.log("looked up", customer.email);
  return { greeting: `Hi ${customer.name}!` };
};

Sizes and limits

Every Glyph has a size, chosen in its Settings tab under Runtime size (or with size through MCP) and published with the rest of the version. Sizes your plan does not include appear greyed out with the plan that includes them and an Upgrade button; describe_glyph shows the same choices to an AI assistant. Glyphs saved before sizes existed are small.

SizeMemoryTime limitHow it runsPlans
Small (default)512 MB30 secondsWhile the caller waits, or in the backgroundAll
Large2 GB14 minutesIn the background only: you get a job id and poll for the resultPro

A large Glyph is never run while a caller waits. Over HTTP, POST /app/{orgcode}/glyphs/{glyphId}/invoke answers 202 { jobId } and you poll GET /app/{orgcode}/jobs/{jobId} until it is completed or failed (the result is under result). A Logic Block can call one from a glyph step only when the block has Run in the background on. The Test tab, the MCP invoke_glyph tool and the crew glyph.invoke tool cannot wait for a large Glyph and answer glyph_background_only.

Each plan also limits how much you can run:

FreeStarterPro
Runs per day10200500
Runs per month2505,00010,000
Large runs per day / month——10 / 100
Large runs at the same time——1
Compute per month (GB-seconds)10,000100,000480,000

Compute is the memory in GB times the seconds a run takes, counted for failed runs too: a 2 GB Glyph that runs for 60 seconds uses 120 GB-seconds. Days and months are UTC. A run over a limit is refused with a 429 and an errorCode that names the limit (for example glyph_runs_per_day_limit_reached or glyph_compute_limit_reached); choosing a size your plan does not include is refused with glyph_size_not_in_plan (402). There is no overage billing. The MCP get_usage tool shows what you have used against these limits.

Why large is background only

An HTTP request can wait about 29 seconds, so a Glyph that may run for minutes cannot be answered in the same request. Starting it returns right away and the work happens in the queue, the same way a background Logic Block does.

Draft, Active, and history

A Glyph is exactly two live records — draft (your working copy) and active (what actually runs) — not three things you manage yourself. Saving code only ever touches draft; Active never changes until you explicitly publish. Publishing copies draft's content into a new Active version and appends it to an unlimited, append-only history — nothing is ever deleted.

  • The Versions tab's History section lists every past Active version, plus every draft save that actually changed the code (a no-op autosave is never logged, so the timeline stays meaningful).
  • View, Compare, and Restore work on any past entry.
  • Restoring is itself just another Activate — it creates a new version rather than rewriting history, so a restore can always be undone by restoring again. It also brings Draft back in sync with what you restored (the console warns first if you have unsaved draft changes, since those get overwritten).

Publishing twice with nothing new is a no-op

Clicking Publish again with no real change since the last one doesn't create a duplicate version or a duplicate history row — the platform compares every field a publish would actually copy first.

Forking a system-owned Glyph

Some Glyphs are system-owned (shipped by the platform, not authored by your org). You can't edit one directly — fork it into your own org first, then edit and publish your own copy.