Expand description
Bundled registration for the full set of built-in SDK tools.
The SDK ships many ready-to-use tools (primitives, todo tracking,
web search and fetch, user-interaction). Hosts that want to run
these through the v2 durable tool runtime need them registered in a
shared ToolRegistry<Ctx> so agent-service-host’s
RegistryToolExecutor can dispatch them by name.
This module centralises the registration plumbing so hosts don’t
have to know the constructor shape of every tool family. Each
family is exposed as its own focused helper and a top-level
register_builtin_tools wires the common bundle.
§Example
use std::sync::Arc;
use tokio::sync::RwLock;
use agent_sdk::builtin_tools::{register_builtin_tools, BuiltinToolsConfig};
use agent_sdk::todo::TodoState;
use agent_sdk::{AgentCapabilities, InMemoryFileSystem, ToolRegistry};
let fs = Arc::new(InMemoryFileSystem::new("/workspace"));
let mut registry = ToolRegistry::<()>::new();
register_builtin_tools(&mut registry, BuiltinToolsConfig {
environment: fs,
capabilities: AgentCapabilities::full_access(),
todo_state: Some(Arc::new(RwLock::new(TodoState::new()))),
// `link_fetch` only exists when the `web` feature is enabled, so the
// field is gated to keep this example compiling under default features
// (`cargo test --doc -p agent-sdk`).
#[cfg(feature = "web")]
link_fetch: true,
});Structs§
- Builtin
Tools Config - Configuration for
register_builtin_tools.
Functions§
- register_
builtin_ tools - Register the full bundle of built-in tools described by
config. - register_
link_ fetch web - Register
LinkFetchToolwith default HTTP client and SSRF-protectingUrlValidator. - register_
primitives - Register the six filesystem / shell primitives
(
Read,Write,Edit,Bash,Glob,Grep). - register_
todo_ tools - Register
TodoReadToolandTodoWriteToolsharingstate. - register_
web_ search web - Register
WebSearchToolbacked byprovider.