gitdataai/libs/agent/tool/mod.rs
ZhenYi 9336250f1c
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
fix(agent): skip reasoning_effort when think=false to avoid API errors
2026-04-18 19:41:59 +08:00

28 lines
992 B
Rust

//! Unified function call routing for AI agents.
//!
//! Provides a type-safe, request-scoped tool registry and executor.
//!
//! # Architecture
//!
//! - [`definition`](definition) — Tool schemas: name, description, parameter JSON schema
//! - [`registry`](registry) — Request-scoped `ToolRegistry` mapping names → handlers
//! - [`call`](call) — Execution types: `ToolCall`, `ToolResult`, `ToolError`
//! - [`context`](context) — Execution context passed to each tool handler
//! - [`executor`](executor) — `ToolExecutor` coordinating lookup → execute → result
//! - [`examples`](examples) — `#[tool]` macro usage guide
pub mod call;
pub mod context;
pub mod definition;
pub mod executor;
pub mod registry;
#[cfg(test)]
mod examples;
pub use call::{ToolCall, ToolCallResult, ToolError, ToolResult};
pub use context::ToolContext;
pub use definition::{ToolDefinition, ToolParam, ToolSchema};
pub use executor::ToolExecutor;
pub use registry::{ToolHandler, ToolRegistry};