Examples
Build with Anvia through recipes, reusable patterns, and complete application walkthroughs. The examples use the current SDK and point to runnable source in the Anvia repository wherever a matching cookbook or full project exists.
Choose a learning path
Learn Anvia in one hour
- Send a text completion.
- Stream a completion.
- Build your first agent.
- Give the agent a typed tool.
- Return validated structured data.
- Continue a conversation with memory.
Build an application
Start with streaming React chat, then choose a product pattern:
- Customer-support assistant with authenticated, permission-aware retrieval.
- Research assistant with parallel specialists and a structured report.
- Document analyst with ingestion, extraction, and review boundaries.
- CLI agent with workspace tools and durable sessions.
- Operations assistant with MCP, approvals, and sandbox boundaries.
Prepare for production
Begin with authentication, rate limits, and retries and timeouts. Move long work to durable jobs, add agent tests and quality gates, then select Lens, OpenTelemetry, or Langfuse for observability.
Example levels
- Recipe isolates one capability in a small runnable program.
- Pattern combines several capabilities around a realistic boundary and explains application ownership.
- Application lays out a multi-file project, request flow, failure behavior, security decisions, tests, and production changes.
Documentation excerpts emphasize the important boundaries. A page links to repository source when an equivalent runnable implementation exists; it does not describe an isolated excerpt as a complete project.
Browse by capability
Agents and tools
Learn tool calling, then add permissions, approval, dynamic selection, middleware, and cancellation. Continue with agents as tools and parallel specialists.
Knowledge and data
Start with basic RAG, enforce access with permission-aware retrieval, and build ingestion with document loading and metadata filters. For stateful systems, compare persistent memory with multi-tenant memory, then choose a vector-store adapter.
Workflows
Use pipelines for document extraction, research, parallel work, and bounded batches. The production patterns explain background workers, human review, and failure recovery.
Providers and media
Compare provider switching and compatible APIs. Then work with images, PDFs, image generation, speech and transcription, Mistral OCR, or Grok live search.
Examples, guides, and reference
- Use Examples when you want an implementation and its engineering tradeoffs.
- Use the SDK documentation when you need exact runtime behavior and configuration.
- Use Packages when selecting an adapter or checking its public API.
- Use FAQs when deciding whether Anvia fits your architecture.