One idea per file. Read them in order.
Every example is a single index.ts that uses only what the earlier examples introduced. The code on these pages is the code in the repository.
Basics
Components and pipelines. Runs offline.
LLM
Models, workflows and agents.
Run any example
Examples marked API key call a real model. They use DeepSeek, so they need DEEPSEEK_API_KEY as written; change the one line that creates the model to use OpenAI, Qwen, a local model or your own. The others run offline, and CI runs them on every change.
git clone https://github.com/astack-tech/astack && cd astack
pnpm install && pnpm build
pnpm --filter @astack-examples/pipeline start