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.
Prerequisites
- Rust 1.75 or newer (workspace edition is 2021).
- A
tokioruntime — Cognis is async.
Pick an entry point
Most apps want the umbrella crate. It re-exports the foundation, LLM, RAG, and graph layers, so you writeuse cognis::prelude::*; and reach for what you need.
- Umbrella (recommended)
- Per-crate
Pick features
External integrations are feature-gated so the core crates compile with no network code.| You want… | Feature |
|---|---|
| OpenAI chat + tools + embeddings | openai |
| Anthropic | anthropic |
| Google Gemini | google |
| Local Ollama | ollama |
| Azure OpenAI | azure |
| OpenRouter (with attribution headers) | openrouter |
| Voyage embeddings | voyage |
| Everything provider-shaped | all-providers |
| FAISS local vector store | cognis-rag/vectorstore-faiss |
| Hosted vector stores | cognis-rag/vectorstore-{chroma,qdrant,pinecone,weaviate} |
| PDF / YAML / TOML / CSV / HTML / web loaders | cognis-rag/{pdf,yaml,toml,csv,html,web}-loader |
| SQLite-backed model cache | cognis/cache-sqlite |
| HTTP request primitives for tools | cognis/tools-http |
| Graph state in SQLite or Postgres | cognis-graph/{sqlite,postgres} |
| Langfuse exporter | cognis-trace/langfuse |
Set credentials
Cognis never reads
.env files. Plain .env files on disk are a security footgun. Use your shell, direnv, envchain, or your platform’s secret manager.Client::from_env() reads:
| Variable | Purpose |
|---|---|
COGNIS_PROVIDER | One of openai, anthropic, google, ollama, azure, openrouter. |
COGNIS_<PROVIDER>_API_KEY | The provider’s key (Ollama: not needed). |
COGNIS_<PROVIDER>_MODEL | Optional default model. |
COGNIS_<PROVIDER>_BASE_URL | Optional override for self-hosted backends. |
COGNIS_AZURE_ENDPOINT, COGNIS_AZURE_DEPLOYMENT, COGNIS_AZURE_API_VERSION | Azure-specific. |
direnv + envchain.
.envrc (commit this)
one-time setup
Verify
openai, this should compile: