Skip to main content

Live Demos

AILANG provides 9 interactive browser-based demos at www.sunholo.com/ailang-demos. All demos run entirely in the browser using WebAssembly — no installation required.


Document Intelligence

Document Extractor

Try it | WASM, AI Effect, Contracts

AI-powered extraction with schema detection. Upload invoices, receipts, contracts, or bank statements — AILANG contracts validate every AI extraction result before returning.

AILANG features demonstrated:

  • std/ai effect for calling LLMs (Gemini)
  • requires/ensures contract verification
  • Full AILANG interpreter compiled to WebAssembly
  • 7 demo presets with 3-tier graceful degradation

DocParse

Try it | WASM, std/xml, std/zip

Parse DOCX, PPTX, XLSX, PDF, and images entirely in-browser. 10 AILANG modules handle pure deterministic parsing — no server round-trips.

AILANG features demonstrated:

  • std/xml and std/zip stdlib modules
  • 28 contracts enforce structural invariants
  • WebAssembly execution with zero server dependency
  • Handles merged cells, track changes, and multi-format detection

Z3 Verify

Try it | Contracts, Z3

Static contract verification with the Z3 theorem prover. Watch Z3 mathematically prove correctness or find counterexamples across 4 real-world scenarios.

AILANG features demonstrated:

  • requires/ensures with Z3 backend (ailang verify)
  • Cloud billing contracts (12 verified, 2 intentional violations)
  • Access control with 48 permission paths
  • Conference room scheduling with capacity bounds
  • Arithmetic contracts (clamping, tax, safe subtraction)

AI + Contracts

Try it | AI Effect, Contracts

The core AILANG value proposition in one demo: AI extracts structured data from documents, then AILANG contracts validate every field before returning. Deterministic verification of stochastic AI output.

AILANG features demonstrated:

  • AI effect for extraction
  • Contract validation of AI output
  • Schema-first extraction with typed results

Streaming & Voice

Voice DocParse

Try it | WebSocket, WASM, AI

Gemini Live voice interaction combined with document parsing. Upload documents mid-conversation and get AI-powered descriptions using AILANG's embedded DocParse modules.

AILANG features demonstrated:

  • std/ai effect with streaming
  • WASM DocParse modules embedded in browser
  • Bidirectional WebSocket protocol
  • Real-time audio playback with chat transcript

Claude Chat

Try it | SSE, AI Effect

Streaming text responses from Claude's Messages API using Server-Sent Events. The canonical SSE streaming demo — text fragments arrive progressively as the model generates.

AILANG features demonstrated:

  • AI effect with Anthropic Claude
  • Server-Sent Events (SSE) streaming protocol
  • Progressive text rendering

Gemini Live

Try it | WebSocket, Audio

Bidirectional WebSocket audio streaming with 30 voice options. Type text, hear it spoken in real-time with native WAV generation.

AILANG features demonstrated:

  • Effect handlers for WebSocket streams
  • Bidirectional audio protocol
  • 30 voice selections

Safe Agent

Try it | Contracts, AI, Tools

Contract-verified AI tool calling. The agent has access to a calculator, file reader, and SQL query runner — but AILANG contracts block invalid arguments before execution. Z3-provable safety.

AILANG features demonstrated:

  • requires/ensures contracts on tool inputs
  • AI effect with Gemini Live for tool calling
  • Path traversal prevention (file reader)
  • SQL injection prevention (query runner)
  • Overflow prevention (calculator)

Data & Analytics

GA4 Ecommerce

Try it | AI, BigQuery, Contracts

Six sub-demos showcasing AILANG in an ecommerce analytics context:

  1. AI Product Recommendations — Gemini-powered product suggestions
  2. Data Pipeline — Pure functional JSON aggregation (no APIs needed)
  3. Trusted Analytics — BigQuery integration with contract-verified SQL
  4. Capability Budgets — Resource-bounded effects demo
  5. Contract Verification Forms — Design-by-contract UI
  6. REST API + React UI — Full ecommerce dashboard

AILANG features demonstrated:

  • AI effect for recommendations
  • Contract-verified SQL (SELECT-only, no mutations)
  • Capability budgets for effect boundaries
  • Shared AILANG services reused across demos

Substrate smoke tests

These are technical demos that live in this repo and deploy alongside the docs site at ailang.sunholo.com/demos/.... They exercise individual AILANG substrate primitives end-to-end in the browser — useful for verifying the WASM runtime, BYO-key AI bridge, and Cognitive OS effects (!: {DOM, Msg, Cog}) work as expected, but not designed for general use. The polished, user-facing demos live separately at www.sunholo.com/ailang-demos (built from the sunholo-data/demos repo).

Cognitive OS — M1 Smoke Test

Try it | !: {DOM, Msg, Cog}, event log, byte-identical replay

20-assertion smoke suite for the M-COG-RUNTIME substrate. Add panel / update / timeline / reset buttons drive the canonical DOM patch dispatcher directly; capture+verify checks byte-equality across IndexedDB replay; cross-tab BroadcastChannel test confirms the Msg fabric carries Lamport-stamped envelopes between tabs.

Substrate features exercised:

  • CognitiveOS._applyPatchDirect (DOM effect via canonical patches with content-hashed nodeIDs)
  • IndexedDB-persisted cognitive event log with canonical (clock, sender) replay order
  • Byte-identical reconstruction verified via FNV-1a content hashing
  • Cross-tab Msg fabric over BroadcastChannel Web API

The richer, user-facing Cognitive Commons demo (4 personas, sentiment-driven manifesto, multi-tab debating society) builds on this substrate and is being ported to AILANG in the sunholo-data/demos repo for deployment at www.sunholo.com/ailang-demos/cognitive-commons.

BYO-Key AI Step

Try it | !: AI, ai.step / stepWithCache / stepWithStream

The three std/ai step variants — single-shot, system-prompt caching, streaming — driven directly from the browser. Paste your own Anthropic/OpenRouter/Gemini key (stored in localStorage only); the WASM-resident AILANG module fetches the provider through a JS-injected handler. Demonstrates the BYO-key pattern that other browser demos in this repo build on.

Substrate features exercised:

  • std/ai.step with three caching/streaming shapes
  • AILANG modules loaded into the WASM REPL at runtime via repl.loadModule
  • BYO-key router: AILANG → JS handler → provider fetch

Feature-to-Demo Matrix

AILANG FeatureBest Demo
Contracts (requires/ensures)Z3 Verify, Safe Agent
AI Effect (std/ai)Claude Chat, AI + Contracts
WebAssemblyDocParse, Document Extractor
Streaming (SSE/WebSocket)Gemini Live, Claude Chat
Capability BudgetsGA4 Ecommerce
stdlib (xml, zip, json)DocParse

Building Your Own Demos

AILANG's WebAssembly integration makes it straightforward to build browser-based demos. The WASM binary includes the full interpreter and all stdlib modules.

Key APIs:

  • loadModule() — Load AILANG code into the browser
  • setEffectHandler() — Wire effects to JavaScript callbacks
  • evalAsync() — Execute AILANG with async effects

See the WASM Integration Guide for complete API documentation and the demo source code for reference implementations.