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.
The full list lives in Reference → Feature flags.
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:
Recommended setup on macOS / Linux:
direnv + envchain.
.envrc (commit this)
one-time setup
Verify
openai, this should compile: