tinyagents 0.1.0

A Rust LLM orchestration library inspired by LangChain and LangGraph.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Subgraph node adapters.
//!
//! A [`crate::graph::CompiledGraph`] can be embedded as a node in a parent
//! graph in two modes:
//!
//! - **shared-state**: parent and child share the same `State`/`Update`
//!   channel. The child runs over the parent's state and its final state is
//!   returned as the parent update.
//! - **adapter**: parent and child use different state shapes. A `to_child`
//!   mapping projects parent state into the child input, and a `from_child`
//!   mapping folds the child's final state back into a parent update.
//!
//! Both adapters append the embedding node id to the child's checkpoint
//! namespace so parent and child checkpoint ids never collide.

// This module is documentation-only for types; the adapter constructors live in
// `mod.rs` because they return closures rather than named types.