Skip to main content
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

Modules at a glance

Key types

Runnable

RunnableConfig

Builder methods: 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

Constructors: 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.