Expand description
§llm-kernel
Foundation library for Rust AI-native applications.
Provides a composable, feature-gated set of modules for building LLM-powered tools, agents, and servers:
| Feature | Module | Description |
|---|---|---|
provider | provider | Provider catalog, model descriptors, pricing — default |
client-async | llm | Async LLM client (OpenAI, Anthropic) with SSE streaming |
discovery | discovery | Dynamic model discovery (models.dev, Ollama, OpenAI-compat) |
secrets | secrets | SecretVault — dotenv-style credential management |
store | store | SQLite init helpers (WAL, PRAGMA, schema versioning) |
config | config | TOML config loader with auto-create from template |
graph | graph | Knowledge graph — SQLite, FTS5, smart recall, BFS traversal |
mcp | mcp | MCP server framework — JSON-RPC 2.0, stdio transport |
tokens | tokens | Token estimation with Unicode-script heuristics |
install | install | AI tool installation wizard (Claude, Cursor, Copilot, etc.) |
search | search | Hybrid search with Reciprocal Rank Fusion |
embedding | embedding | Embedding provider trait + cosine similarity |
telemetry | telemetry | Telemetry framework — enum-gated events, no PII |
safety | safety | Secret masking, error classification, output sanitization |
§Quick start
The prelude module re-exports the most commonly used types:
use llm_kernel::prelude::*;Modules§
- config
- TOML config loader with auto-create from template.
- discovery
- Dynamic model discovery from remote sources.
- embedding
- Embedding provider abstraction.
- error
- Error types and result alias for llm-kernel. Error types for llm-kernel.
- graph
- Knowledge graph with SQLite persistence, FTS5 search, and smart recall.
- install
- AI tool installation wizard.
- llm
- Async LLM client with OpenAI and Anthropic backends.
- mcp
- MCP (Model Context Protocol) server framework.
- prelude
- Re-exports of the most commonly used types.
- provider
- LLM provider catalog and capability profiles.
- safety
- Safety utilities for AI-native applications.
- search
- Hybrid search: BM25 + vector similarity with Reciprocal Rank Fusion.
- secrets
- Credential management via dotenv-style vault.
- store
- SQLite initialization helpers.
- telemetry
- Telemetry framework for Rust AI tools.
- tokens
- Token estimation for LLM context budgeting.