COOKBOOK
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.
Advanced
Large contexts and serving.
Run any example
git clone https://github.com/astack-tech/astack && cd astack
pnpm install && pnpm build
pnpm --filter @astack-examples/pipeline startExamples marked API key need DEEPSEEK_API_KEY in the environment. The others run offline, and CI runs them on every change.