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.
cognis-core is the smallest, most stable crate. Everything else depends on it; it depends on nothing internally. If you’re building a primitive that the rest of the workspace should be able to compose, this is where the trait goes.
Crate metadata
| Field | Value |
|---|---|
| Latest version | 0.3 |
| docs.rs | docs.rs/cognis-core |
| Repo path | crates/cognis-core |
| Default features | none |
Modules at a glance
| Module | What |
|---|---|
runnable | Runnable<I, O> trait, RunnableConfig. |
runnable_ext | RunnableExt — pipe, with_max_retries, with_timeout, with_fallback, with_memory_cache, each. |
compose | Branch, Parallel, Each, Lambda, Passthrough, Pipe. Plus the lambda and pipe helpers. |
wrappers | Retry, RetryPolicy, Timeout, Fallback, Cache, MemoryCache, CacheBackend, Bind, Configurable, Assign. |
message | Message, HumanMessage, AiMessage, SystemMessage, ToolMessage, ToolCall. |
content | ContentPart, ImageSource, AudioSource. |
prompts | ChatPromptTemplate, PromptTemplate, FewShotTemplate, Role. |
output_parsers | OutputParser, StructuredOutputParser, OutputFixingParser, RetryParser, JsonParser, JsonExtractor, XmlParser, BooleanParser, NumberedListParser, CommaListParser, StringParser. |
callbacks | CallbackHandler, CallbackManager, HandlerObserver, BuiltHandler, HandlerBuilder. |
stream | Event, EventStream, Observer, RunnableStream. |
tools | BaseTool (re-export of Tool). The trait shape lives in cognis-llm. |
tokenizer | Tokenizer, CharTokenizer, FnTokenizer. |
loaders | Loader trait — used by cognis-rag. |
error | CognisError, Result. |
Key types
Runnable
RunnableConfig
new, with_recursion_limit, with_max_concurrency, with_observer, with_tag, with_cancel_token, with_parent_run_id. Plus is_cancelled and emit.
Event
Message
Message::human, Message::ai, Message::system, Message::tool, plus *_with_parts variants.
CognisError
Result<T> = std::result::Result<T, CognisError>. Cross-crate errors wrap via From.
docs.rs
Browse the full API at docs.rs/cognis-core. Every public type, trait, and function has rustdoc.See also
Runnables
The conceptual page on the trait.
Messages
What flows through chat-shaped Runnables.
Structured output
StructuredOutputParser, OutputFixingParser, RetryParser.