Skip to main content

rskit_agent/
lib.rs

1//! Agentic loop — Provider + Tools + Hooks in a turn-based execution engine.
2//!
3//! The [`Agent`] drives a multi-turn loop: it sends messages to an LLM
4//! [`rskit_llm::Provider`], executes any requested tool calls, emits hook events at each
5//! lifecycle point, and manages context size via a pluggable [`ContextStrategy`].
6
7pub mod agent;
8pub mod command;
9pub mod config;
10pub mod context;
11pub mod hooks;
12pub mod memory;
13pub(crate) mod runtime;
14pub mod types;
15
16pub use agent::Agent;
17pub use command::{Command, CommandHandler, CommandRegistry, register_builtins};
18pub use config::AgentConfig;
19pub use hooks::{
20    OnError, OnEvent, OnMCPCall, OnMCPResult, PostLLMCall, PostToolCall, PreLLMCall, PreToolCall,
21    TurnEnd, TurnStart, on_error_type, on_event_type, on_llm_call_type, on_llm_response_type,
22    on_mcp_call_type, on_mcp_result_type, on_tool_call_type, on_tool_result_type,
23    on_turn_complete_type, on_turn_start_type, post_llm_call_type, post_tool_call_type,
24    pre_llm_call_type, pre_tool_call_type, turn_end_type, turn_start_type,
25};
26pub use memory::{InMemoryStore, Memory, SlidingWindowMemory};
27pub use types::{
28    AgentEvent, AgentResult, ContextStrategy, FailStrategy, StopReason, TruncateStrategy,
29};