Basics
Everyday Crux recipes: chat with memory, structured extraction, streaming with tools.
The most common things you'll build with Crux. Each recipe is self-contained.
Chat with memory
A working chat loop with episodic recall and sliding-window compaction.
Structured extraction
Pull a typed object out of unstructured text, with auto-retry on schema failure.
Streaming with tools
Stream a response while the model calls tools mid-stream, updating the UI as data arrives.
Safe image generation
Generate, guard, persist, and deliver one image without coupling storage retries to model retries.
Transcribe and narrate
Turn audio into a measured transcript, derive narration, and store the final audio explicitly.
Workspace files
Give an agent durable scratch files and final output files.
Federated workspace sources
Mount retrievers, MCP resources, project indexes, or app documents as workspace files.
Editable workspace sources
Let custom source-backed mounts write changes back to their providers.
Postgres RecordStore
Implement durable Crux JSON record storage on Postgres.