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//! - [`Session`]: Lightweight conversation history container.
7//! - [`ToolRegistry`]: Schema-only tool store. No handlers or closures.
8//! - [`ToolSender`] / [`ToolRequest`]: Agent-side tool dispatch primitives.
9//! - [`Hook`]: Lifecycle backend for agent building, events, and tool registration.
10//! - [`Runtime`]: Agent registry, session store, and hook orchestration.
11//! - [`model`]: Unified LLM interface types and traits.
12//! - Agent event types: [`AgentEvent`], [`AgentStep`], [`AgentResponse`], [`AgentStopReason`].
13
14pub use agent::{
15    Agent, AgentBuilder, AgentConfig,
16    config::HeartbeatConfig,
17    event::{AgentEvent, AgentResponse, AgentStep, AgentStopReason},
18    tool::{ToolRegistry, ToolRequest, ToolSender},
19};
20pub use config::{
21    ApiStandard, ManifestConfig, McpServerConfig, PackageMeta, ProviderDef, ResolvedManifest,
22    Setup, check_skill_conflicts, load_agents_dir, load_agents_dirs, repo_slug, resolve_manifests,
23};
24pub use runtime::{Runtime, Session, hook::Hook};
25
26pub mod agent;
27pub mod config;
28pub mod model;
29pub mod paths;
30pub mod protocol;
31mod runtime;
32pub mod utils;