Skip to content

Examples

These examples grow from one local stream into distributed and tool-using agents. Each one focuses on an applied task and points out the part of A11 that makes it work.

Example What you will build
Stream data through an AsyncNode Produce and consume an ordered asynchronous stream, including clean finalisation.
A WebSocket echo session Connect a client and server session over WebSocket and stream an action result back.
Talk to a model Call interact_with_llm, feed a conversation, and print model output as it arrives.
From a local run to a remote call Move an action across a session without changing its schema or handler-facing API.
A toy agent with a tool Register an A11 action as an LLM tool and let the model use its result.
Going distributed Choose storage and transport boundaries for an agent that spans processes or machines.
Browser clients Connect a TypeScript browser application to an A11 backend.
Local models on the web Run a local model in a browser-facing application while retaining A11 action semantics.

Runnable companion programs live in the repository’s examples/ directory.