Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Every example lives under examples/ in the repo. They’re real, runnable programs — not snippets. Most work offline against fakes; a few need a provider key.

How to run

git clone https://github.com/0xvasanth/cognis.git
cd cognis
cargo run -p cognis-examples --example <NAME>
For provider-backed examples, set COGNIS_PROVIDER plus the matching key. The simplest way is local Ollama — no key needed:
ollama pull llama3.1
COGNIS_PROVIDER=ollama COGNIS_OLLAMA_MODEL=llama3.1 \
  cargo run -p cognis-examples --example agents_react_agent
See Environment variables for the full table of provider env names, and Quickstart for the smallest working agent.

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

10 examples on composition — pipe, branching, parsers, structured extraction, typed runnables.

Agents

15 examples on the agent loop — ReAct, multi-agent, planning, lifecycle hooks, plugins, AgentBus.

Memory

6 examples comparing memory variants — Buffer, Window, SummaryBuffer, Entity, KnowledgeGraph.

Models

8 examples on LLM clients — streaming, embeddings, similarity, model routing, content blocks.

Tools

9 examples on tool definition and dispatch — derive macro, schema-based, ToolOrchestrator DAG.

Retrieval

13 examples on RAG — splitters, vector stores, retrievers, indexing pipeline, rerankers, transformers.

Graphs

18 examples on Graph<S> — state machines, checkpoints, interrupts, viz, routers, message graphs.

Observability

6 examples on callbacks, tracing, health checks, evaluation framework and pipeline.

Resilience

7 examples on retries, fallbacks, rate limiters, SSRF protection, error recovery.

Parsers

2 examples on output-fixing and retry parsers — making structured output robust.

Looking for something larger?

Standalone examples show one feature at a time. For full applications that combine several layers, see Patterns — research assistants, code Q&A, multi-agent debate, streaming UIs, and more.