Skip to main content

crabtalk_core/
lib.rs

1//! Crabtalk agent library.
2//!
3//! - [`Agent`]: Immutable agent definition with step/run/run_stream.
4//! - [`AgentBuilder`]: Fluent construction with a model provider.
5//! - [`AgentConfig`]: Serializable agent parameters.
6//! - [`ToolRegistry`]: Schema-only tool store. No handlers or closures.
7//! - [`ToolDispatcher`]: Agent-side tool dispatch trait.
8//! - [`model`]: Unified LLM interface types and traits.
9//! - [`storage`]: Unified persistence trait and domain types.
10//! - Agent event types: [`AgentEvent`], [`AgentStep`], [`AgentResponse`], [`AgentStopReason`].
11
12pub use agent::{
13    Agent, AgentBuilder, AgentConfig, AgentId,
14    event::{AgentEvent, AgentResponse, AgentStep, AgentStopReason},
15    tool::{
16        BeforeRunHook, ToolDispatch, ToolDispatcher, ToolEntry, ToolFuture, ToolHandler,
17        ToolRegistry,
18    },
19};
20pub use config::{
21    ApiStandard, BashConfig, DaemonConfig, HooksConfig, McpServerConfig, MemoryConfig, PackageMeta,
22    ProviderDef, ResolvedDirs, Setup, TasksConfig, check_skill_conflicts, external_source_name,
23    load_agents_dir, load_agents_dirs, repo_slug, resolve_dirs, scan_skill_names,
24    validate_providers,
25};
26pub use storage::{ConversationMeta, EventLine, sender_slug};
27
28pub mod agent;
29pub mod config;
30pub mod model;
31pub mod paths;
32pub mod protocol;
33pub mod storage;
34#[cfg(feature = "testing")]
35pub mod testing;
36pub mod utils;