Agent work that survives a pause. Evidence that stays.
Draft a proposal. Close the terminal. Review it tomorrow. ALGAL retains the work, waits for your authority, and keeps a history you can verify without calling the model again.
One native executable. The default demo uses a clearly labeled deterministic decision fixture. Optional on-device Apple generation is a separate workflow. macOS Apple silicon and Linux x86_64 prereleases.
Useful work, with a clear finish line
Choose the job. Keep the result.
Use ALGAL when the work around a model matters: a human decision, a restart, independent checks, or a reviewable history.
Change review · Native VM
Draft privately. Publish only what you approve.
Turn a small set of change notes and check results into a retained proposal. Leave it waiting, then approve that exact report in a new invocation. Denial publishes nothing.
You keep: the input evidence, proposal, decision, and local publication.
A coding attempt ends. The checks decide what follows.
Admit a source revision and fixed acceptance commands. Retain the proposed patch, check that exact patch, and produce a review packet. An uncertain launch stays unresolved instead of quietly starting again.
You keep: the patch digest, source binding, check outcomes, and custody record.
Export a bounded execution capsule. Verification needs no model or credentials and works after the source store is moved away. Altered hashed records and missing dependencies fail verification.
Inspect retained prompts, outputs, and capability strings before sharing; the export does not redact them.
You keep: one portable file and a verified process head.
Classify an email, execute only its selected response branch, and use the same draft helper over a bounded inbox. Each effect receives declared context; inactive branches make no model calls.
You keep: reusable program artifacts, ordered results, and replayable receipts.
program reply(email: text) -> text {
budget { max_agent_calls: 2 }
let intent = decide"What does this email need?"using email
aschoice {
help: "Help with a problem",
sales: "Information before buying",
other: "Anything else"
}
let task = match intent.value {
help => "Draft a helpful support reply.",
sales => "Draft a concise sales reply.",
other => "Draft a clarifying question."
}
returngenerate task using email
}
A decision. A pure match. A draft. The model sees the context you declare. The program makes the limits visible.
2 executor attempts, at most0 model calls in match
Source names explain the work; exact cell IDs remain visible. The graph includes the pure decision check.
Executable source, not pseudocode. The Bun compiler lowers .algal into the existing algal.organism.v1 format. Both runtimes execute the compiled manifest.
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.
01
Write a program
Immutable values, explicit model effects, exhaustive choices, and declared budgets.
.algal source
02
Compile its structure
A deterministic compiler produces a typed manifest and a source-map sidecar. Diagrams come from that manifest.
.algal.json + diagram
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.
program route(email: text) -> text {
budget { max_agent_calls: 2 }
let intent = decide"What does this email need?"using email
aschoice {
help: "Help with a problem",
sales: "Information before buying",
other: "Anything else"
}
returnmatch 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."
}
}
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_items3return { preview: preview, replies: replies }
}
The reusable helper · draft.algal
program draft(email: text, tone: text) -> text {
budget { max_agent_calls: 1 }
returngenerate"Draft a reply using the requested tone."using { email: email, tone: tone }
}
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:b5255ea95739e5b93e2745d7bfd60b68046f413fbb86f72dfb08a8e029b613f9
Manifest: sha256:4da29e11e19de47a2ced05ca4e2c80832d2f9a2aba93da74e611dc1eea202fa3
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]
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.
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.
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.
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.
From one program to a measured population
Growth needs a selection rule.
Better programs come from evidence. Keep the candidate, its evaluation, and the host's decision connected—so growth has a history you can inspect.
01 / proposeCandidate artifacts
Model-produced plans or manifests
02 / admitTyped, bounded programs
Host compilation and checks
03 / measureEvaluation evidence
Declared cases and work limits
04 / selectRetain or promote
Host policy and recorded lineage
Conceptual lifecycle of the existing foundry and civilization workflows. This is not a recorded run or a promise that a candidate improves.
Start with the working VM
One executable. A review you can return to.
Download and verify a native prerelease. The built-in workbench needs no checkout, Bun, Cargo, credentials, or web server. Use a fresh directory for each demo.
Terminal · after installationRetain / review / prove
# Inspect the installed build identity
algal doctor
# Leave a real process waiting for your decision
algal demo start ./my-review
algal demo inspect ./my-review
# Open my-review/report.html for the exact decision command# Kill owned VM children and check their recovery
algal demo prove ./crash-laboratory
Inspect crash-laboratory/proof.json: approved once, denied without publication, completed writes reused after a read crash, and an uncertain write blocked from redispatch. Fixture decisions; real processes, journals, and verification.
Choose the right boundary
Start with a bounded workflow you own.
ALGAL fits local review queues, checked coding episodes, reusable judgment pipelines, and inspectable evidence. A single unstructured prompt may need less machinery. Existing durable workflow engines may already meet your recovery needs.
This is an application VM prerelease. Packages are unsigned and unnotarized. Hosts still own tool permissions, external-effect reconciliation, storage operations, and any required OS isolation. Multi-tenant service operation, distributed custody, and global quotas are unfinished.
Receipts check execution consistency, not factual truth or provider attestation. Unknown external writes are not made exactly-once by replay. The adoption guide explains these boundaries before you connect a real system.