Every example lives underDocumentation Index
Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt
Use this file to discover all available pages before exploring further.
examples/ in the repo. They’re real, runnable programs — not snippets — and each one is shaped around a recognizable scenario, not an API tour.
How each example is shaped
Open any file and you’ll see this header at the top:How to run
COGNIS_PROVIDER plus the matching key. The simplest path is local Ollama — no key needed:
Categories
Quickstart V2
8 numbered demos that walk the V2 surface end-to-end. The fastest way to learn the shape of every layer.
Chains
4 examples on composition —
pipe, structured extraction, typed runnables, dirty-JSON repair.Agents
5 examples on the agent loop — ReAct, conversational memory, multi-agent, planning, streaming events.
Memory
3 examples covering the memory variants — Buffer/Window/TokenBuffer trade-offs, summary compaction, knowledge-graph triples.
Models
4 examples on LLM clients — streaming, embeddings + similarity search, length-based model routing, multimodal.
Tools
4 examples on tool definition and dispatch — typed schemas, multi-tool agent, orchestrator DAG, stateful HTTP.
Retrieval
5 examples on RAG — splitters, end-to-end pipeline, incremental indexing, cross-encoder reranking, caching.
Graphs
5 examples on
Graph<S> — polling state machines, checkpointing, HITL interrupts, semantic routing, topic channels.Observability
3 examples on observers, evaluation harness, and pre-flight health checks.
Resilience
4 examples on error handling, retry/backoff, cost-based rate limiters, SSRF guards.
Parsers
2 examples on output-fixing and retry parsers — making structured output robust against bad model JSON.