Expand description
Prebuilt components for LangGraph agents.
This crate provides prebuilt components for common agent patterns:
- Message types:
Message,ToolCall,MessageContent - Traits:
BaseTool,BaseChatModelfor tool and model integration - ToolNode: Executes tool calls from AI responses
- create_react_agent: Builds a ReAct (Reasoning + Acting) agent graph
- tools_condition: Routing function for tool-calling agents
Re-exports§
pub use types::Message;pub use types::ToolCall;pub use types::MessageContent;pub use types::ContentBlock;pub use types::ImageUrl;pub use types::add_messages;pub use types::add_messages_ref;pub use traits::BaseTool;pub use traits::BaseChatModel;pub use traits::MessageStream;pub use traits::ToolDef;pub use traits::ClosureTool;pub use traits::ToolError;pub use traits::ModelError;pub use traits::PreparedTools;pub use traits::prepare_tools;pub use traits::LlmUsage;pub use tool_node::ToolNode;pub use chat_agent::create_react_agent;pub use chat_agent::ReActAgent;pub use chat_agent::ReActAgentConfig;pub use tools_condition::tools_condition;pub use node_helpers::extract_messages;pub use node_helpers::llm_response_to_json;pub use node_helpers::invoke_llm;pub use node_helpers::invoke_llm_with_config;pub use node_helpers::stream_llm;pub use node_helpers::get_i64;pub use node_helpers::get_str;pub use node_helpers::response_text;pub use node_helpers::parse_json_response;pub use node_helpers::ask_json;pub use node_helpers::print_stream;pub use node_helpers::print_stream_with_options;pub use node_helpers::print_result;pub use node_helpers::print_result_with_options;
Modules§
- chat_
agent - node_
helpers - Helper functions for building graph nodes with minimal boilerplate.
- tool_
node - tools_
condition - traits
- types