A guided tour

Inside a living program.

Every artifact on this page was produced during the site build: compiled from real source, executed with scripted answers, and replay-verified before publication. What you inspect here is evidence, not a mockup. Diagrams are interactive — drag to pan, ⌘-scroll to zoom, click a cell for its contract, replay the recorded run.

One executable meaning

Read it. Run it.
Ask what happened.

A diagram comes from the program. An execution overlay comes from its receipt. The views stay connected to the artifact they explain.

  1. 01

    Write a program

    Immutable values, explicit model effects, exhaustive choices, and declared budgets.

    .algal source
  2. 02

    Compile its structure

    A deterministic compiler produces a typed manifest and a source-map sidecar. Diagrams come from that manifest.

    .algal.json + diagram
  3. 03

    Keep the evidence

    Receipts record execution. Replay checks the orchestration against recorded external answers.

    receipt + verification

Replay checks execution consistency. It does not establish that a model answer is true or attest that a provider performed an operation.

Follow one execution

Only the chosen
branch runs.

Choose a recorded decision. Support and sales each draft a reply with the declared email context. Human review returns a fixed message. Inactive branches stay visible—and skipped.

Scripted execution; no live model callroute.algal
Recorded choice · help

Support

Actual returned value

I can help with that. What happens when you try to sign in?

Executor attempts
2of 2 allowed
Inactive draft branches skipped
1
CommittedSkippedExpand all cells
Source-derived routing graph for the recorded help decision. 2 executor attempts completed; 1 inactive draft branch was skipped. All exact cells remain visible.
Receipt sha256:d22379d7548983bf072c1f13e698d5748da73e609f1e5580cf9b182cd682579eDownload receipt Scripted answers
Recorded choice · sales

Sales

Actual returned value

Tell me about your team and I can suggest a plan that fits.

Executor attempts
2of 2 allowed
Inactive draft branches skipped
1
CommittedSkippedExpand all cells
Source-derived routing graph for the recorded sales decision. 2 executor attempts completed; 1 inactive draft branch was skipped. All exact cells remain visible.
Receipt sha256:b43387ba0265fbe4193b3a347b58f73a1621f1d7fe1dca94c2ebacf31d651a9cDownload receipt Scripted answers
Recorded choice · other

Human review

Actual returned value

Needs a human review.

Executor attempts
1of 2 allowed
Inactive draft branches skipped
2
CommittedSkippedExpand all cells
Source-derived routing graph for the recorded other decision. 1 executor attempts completed; 2 inactive draft branches were skipped. All exact cells remain visible.
Receipt sha256:32d0c11cc6e14825724316a91c2f39fc0ddc65fb88ba25253b79f45de5da5245Download receipt Scripted answers
Read the program behind all three runs
program route(email: text) -> text {
  budget { max_agent_calls: 2 }

  let intent = decide "What does this email need?" using email
    as choice {
      help: "Help with a problem",
      sales: "Information before buying",
      other: "Anything else"
    }

  return match intent.value {
    help => generate "Draft a helpful support reply." using email,
    sales => generate "Draft a concise sales reply." using email,
    other => "Needs a human review."
  }
}

Compiled manifest · Source map · Shared input

Each view comes from an actual runtime receipt generated and replay-checked during the site build. The selector changes which receipt you inspect; it does not run a model in your browser.

A useful program becomes a building block

Write it once.
Use it across an inbox.

Import a local helper, call it for one preview, then apply it to a bounded list. The same compiled child handles every email with the tone you pass explicitly.

The caller · inbox.algal

import draft from "./draft.algal"

program inbox(sample: text, emails: json) -> json {
  budget { max_agent_calls: 4 }

  let preview = call draft using {
    email: sample, tone: "helpful"
  }
  let replies = each draft over email in emails
    using { tone: "helpful" } max_items 3

  return { preview: preview, replies: replies }
}

The reusable helper · draft.algal

program draft(email: text, tone: text) -> text {
  budget { max_agent_calls: 1 }
  return generate "Draft a reply using the requested tone."
    using { email: email, tone: tone }
}
The limit composes1 preview + 3 emails × 1 child call

4 executor attempts maximum. Replies keep input order; items execute sequentially.

check reports 2 source files · 1 child level required. Structural bounds, not a cost forecast.

Actual program / call + eachExpand
Generated inbox graph with one named child call for a preview and a bounded each cell for up to 3 emails. Both use the same digest-addressed draft program.
Each child boundary pins the helper's compiled digest. The downloadable bundle includes the caller and its full child closure.
Inspect the recorded results 3 replies · 4 attempts · replay checked

Scripted executions; no live model calls

  1. I can help you sign in. What happens when you enter your email?
  2. I can help update your delivery address. Has the order shipped?
  3. Your invoice is available under Billing in your account.
Empty inbox? No child applications.

The empty-list run returns [] for replies and uses 1 executor attempt for the separate preview. Empty-list receipt

Open one child call Original receipt · exact invocation

Scripted executions; no live model calls

Follow a call into its helper. Each view shows only that email’s recorded cell states, with the root receipt and invocation path retained.

Email 1 · one recorded invocation

I can help you sign in. What happens when you enter your email?

b2-replies-each/i0 · draft.algal

Exact draft helper graph and recorded cell states for email 1, bound to the original inbox receipt.
Expand child graph

Email 2 · one recorded invocation

I can help update your delivery address. Has the order shipped?

b2-replies-each/i1 · draft.algal

Exact draft helper graph and recorded cell states for email 2, bound to the original inbox receipt.
Expand child graph

Email 3 · one recorded invocation

Your invoice is available under Billing in your account.

b2-replies-each/i2 · draft.algal

Exact draft helper graph and recorded cell states for email 3, bound to the original inbox receipt.
Expand child graph
Catch a mistake before a run Imported helper · unknown binding

A helper refers to emial when its input is named email. The compiler points to the expression and the import that led there.

Actual compiler output · no program execution

PARSE_FAILED: unknown name emial
At helpers/draft.algal:5:11
Imported from main.algal:1:1 -> ./helpers/draft.algal
5 |     using emial
  |           ^^^^^

Change emial to email and this example compiles. Use --diagnostic-format text to read errors in the terminal, or json for tools.

Find the source of a failure Second item · exact file and line

A pure batch calculation divides by zero in its second item. The report points to the expression in ratio.algal and its caller. The first item completed; the third never started. No model calls.

Algal failed · digest-bound (not replay verification)
Receipt: sha256:73d89664e04152e4b72a5c16c3d83ea2f82572b0c3c60bf8d5e0149a5b2ef8b3
Manifest: sha256:5ec7e848d41521355bd6a01554ca3976edabff289cd9901471365ab1a2be56e0
Source: sha256:b9064efdd18d4115f9675279636cdf94f1ef3151f1eb3839338128297f2e75de

failure · EXPR_FAILED · result-each/i1/b1-fraction
Recorded message: expr {"code":"EXPR_DIV_ZERO","op":"div"}
At ratio.algal:4:18 (fraction) [expression]
  let fraction = sample.numerator / sample.denominator
Called from ratios.algal:6:10 (return) [each index 1]
Focused graph for the failed second ratio calculation, highlighting the division expression and retaining its root receipt binding.

The same core, more ambitious programs

Start small.
Grow deliberately.

Refine a draft. Suspend for approval. Apply a child program to a collection. Propose a new program. Every effect and boundary has a place in the graph.

Bounded refinement

Improve it.
Check it.
Know when to stop.

An editor rewrites a draft. A critic returns ship or revise. A repeat cell carries the draft into the next round, up to 4 rounds.

The final verdict still matters. Reaching the round limit returns the last outputs; it does not turn revise into success. The graph sends that result to hold.

The boundary is part of the program4 rounds maximum

Each round contains an editor and a critic. The parent's attempt budget also bounds nested execution.

Inspect the manifest
Actual program / repeat + guarded branchesExpand
Generated refinement graph. Draft enters a repeat cell bounded to 4 rounds. Its final verdict selects ship or hold through explicit guards.
The loop is a bounded child operation. The outer dataflow graph stays acyclic.
Durable approval

Pause the work.
Keep the progress.

A model reviews evidence and proposes a recommendation. The process can suspend while a child program waits for a host-supplied approval message.

On resume, a pure check requires both an approve decision and a matching release identifier before the publication effect becomes eligible.

Authority remains with the hostRecommend → wait → authorize

This example publishes a report to a local mailbox. The model does not approve or deploy a release.

Run the durable process demonstration
Actual program / tools + durable childExpand
Generated release review graph: evidence feeds recommendation, a proposal is recorded, the child waits for approval, and an authorization expression guards publication to a local mailbox.
Data dependencies retain the order. Mailbox capabilities are admitted by the host.
Bounded composition

One useful program.
A collection of questions.

The each cell applies a pinned child program to each question, up to 8 items. A pure function joins the answers.

The child's interface makes it reusable. Its content digest fixes which program is being called. The parent bounds how much work the collection can create.

Fan-out is explicit structure8 items maximum

Independent work is visible in the graph. This does not promise concurrent execution or a wall-clock speedup.

Inspect the manifest
Actual program / each + collectionExpand
Generated question swarm graph: a list of questions enters an each cell with maxItems 8, then answers flow to the pure join.v1 function.
A reusable child is an artifact with a declared interface, not an invisible prompt template.
Programs as values

A program can
propose its successor.

A designer produces a child manifest as data. A bounded spawn operation admits and runs it, and its digest is appended to a persistent population slot.

That is the starting point for a habitat. Foundry and civilization workflows evaluate candidates on declared cases; host selection decides what to retain or promote.

Proposal is not promotionInspect → evaluate → select

The graph shown records a proposed child's digest. It does not itself prove improvement or promote a winner.

Explore measured populations and lineage
Actual program / spawn + persistent slotExpand
Generated habitat graph: a goal reaches a designer agent that proposes a child manifest; spawn runs the admitted child, then its digest joins population history and is written to a slot.
Execution explains what a program did. Evaluation and lineage explain why a version was retained.

These are generated views of existing executable manifests. Readable source covers values, decisions, generation, conditional branches, local imports, named calls, and bounded each; repeat, waits, and evolution remain available through the manifest API.

01

Pure core, explicit effects

Immutable values and deterministic expressions carry the structure. Models, tools, and durable state have visible boundaries.

02

Bounds before execution

Programs declare limits. The host owns admitted functions, providers, tools, and capabilities. A manifest grants no OS isolation.

03

Evidence you can inspect

Content-addressed programs and receipts connect source, structure, and execution. Measure quality on the workload that matters.