Skip to main content

Module tools

Module tools 

Source
Expand description

Tool abstraction: any side effect the model can request.

Tools are orthogonal to the agent and to each other. To add a capability you implement Tool and register it; no other file changes.

Re-exports§

pub use registry::build_standard_tools;
pub use registry::build_standard_tools_with_roots;
pub use registry::PermissionHook;
pub use registry::SpecWithHint;
pub use registry::Tool;
pub use registry::ToolRegistry;
pub use audit::AuditKey;
pub use audit::AuditMeta;
pub use audit::ExitStatus;
pub use audit::ToolSideEffect;
pub use audit::TouchedFiles;
pub use audit::AUDIT_ERR_MAX_BYTES;
pub use dispatch::resolve_within;
pub use dispatch::args_preview_for_permission;
pub use dispatch::ToolDispatch;
pub use dispatch::new_shared_sandbox_roots;
pub use dispatch::resolve_within_any;
pub use dispatch::AccessTier;
pub use dispatch::SharedSandboxRoots;
pub use a2a::A2aCallTool;
pub use a2a::A2aCardTool;
pub use a2a::A2aTaskCheckTool;
pub use agent::AgentTool;
pub use agent::SharedMemoryRead;
pub use agent::SharedMemoryWrite;
pub use agent_defs::AgentDefinition;
pub use agent_defs::AgentDefinitions;
pub use checkpoint::build_checkpoint_save_tool;
pub use checkpoint::build_checkpoint_tools;
pub use checkpoint::CheckpointDiff;
pub use checkpoint::CheckpointList;
pub use checkpoint::CheckpointSave;
pub use checkpoint::CheckpointSaveCtx;
pub use checkpoint::CheckpointToolCtx;
pub use client_fs::AcpClientFsState;
pub use client_fs::ClientReadFile;
pub use client_fs::ClientWriteFile;
pub use count_lines::CountLines;
pub use edit::EditTool;
pub use episodic_recall::episodic_recall_summary;
pub use episodic_recall::EpisodicRecall;
pub use estimate_tokens::EstimateTokens;
pub use facts::facts_path;
pub use facts::facts_summary;
pub use facts::load_facts;
pub use facts::search_facts;
pub use facts::Fact;
pub use facts::FactStore;
pub use facts::ForgetFact;
pub use facts::RecallFact;
pub use facts::RememberFact;
pub use facts::ScoredFact;
pub use facts::UpdateFact;
pub use fs::ReadFile;
pub use fs::ReadFileState;
pub use fs::WriteFile;
pub use glob::GlobTool;
pub use install_skill::InstallSkill;
pub use load_skill::LoadSkill;
pub use memory::load_scratchpad;
pub use memory::scratchpad_path;
pub use memory::scratchpad_summary;
pub use memory::Scratchpad;
pub use memory::ScratchpadDelete;
pub use memory::ScratchpadGet;
pub use memory::ScratchpadList;
pub use memory::WorkingMemoryTool;
pub use memory::Forget;
pub use memory::Recall;
pub use memory::Remember;
pub use permission_pipeline::CheckOutcome;
pub use permission_pipeline::PermissionPipeline;
pub use plan_mode::EnterPlanModeTool;
pub use plan_mode::ExitPlanModeTool;
pub use plan_mode::PlanApprovalGate;
pub use plan_mode::PlanApprovalResult;
pub use plan_mode::PlanModeRequestGate;
pub use plan_mode::PlanModeRequestResult;
pub use plan_mode::RequestPlanModeTool;
pub use policy_sandbox::FsPolicy;
pub use policy_sandbox::PolicyConfig;
pub use policy_sandbox::ShellPolicy;
pub use run_background::LoopControl;
pub use run_background::BackgroundJobManager;
pub use run_background::CheckBackground;
pub use run_background::Job;
pub use run_background::JobState;
pub use run_background::RunBackground;
pub use run_background::WatchTarget;
pub use schedule_wakeup::ScheduleWakeup;
pub use schedule_wakeup::WakeupRequest;
pub use schedule_wakeup::WakeupSlot;
pub use search::SearchFiles;
pub use send_message::ListWorkersTool;
pub use send_message::SendMessageTool;
pub use send_message::WorkerMailbox;
pub use send_message::WorkerRegistry;
pub use shell::RunShell;
pub use stop_loop::StopLoop;
pub use watch_file::WatchFile;
pub use todo::TodoItem;
pub use todo::TodoStatus;
pub use todo::TodoWriteTool;
pub use tool_search::DeferredCatalog;
pub use tool_search::ToolSearchTool;
pub use tool_search::TOOL_SEARCH_TOOL_NAME;
pub use transport::DirEntry;
pub use transport::ExecResult;
pub use transport::LocalTransport;
pub use transport::ReadResult;
pub use transport::ToolTransport;
pub use web_fetch::WebFetch;
pub use web_search::WebSearch;

Modules§

a2a
a2a_call tool — invoke a remote A2A (Agent2Agent v1.0) agent.
agent
Unified multi-agent delegation tool (agent) plus shared-memory tools.
agent_defs
Custom agent definitions loaded from .recursive/agents/**/*.md files.
audit
Tool audit types: metadata recorded for every tool invocation.
checkpoint
Read-only and save checkpoint tools that surface the session’s checkpoint chain.
client_fs
Client-side filesystem tools for ACP reverse-fs (Sprint 2).
count_lines
count_lines tool: returns the number of lines in a text file.
dispatch
Tool dispatch: the execution path from invoke to tool result.
edit
Edit: edit a file by replacing an exact string.
episodic_recall
Episodic recall tool — search past session transcripts.
estimate_tokens
Token estimation tool: estimate token count for text or file contents.
facts
Memory Layer 2 — Semantic facts with search.
fs
Filesystem tools: Read, Write.
glob
Glob tool: find files matching a glob pattern inside the workspace.
install_skill
install_skill: search skillhub.cn for a skill, let the user review it in the TUI, and install it to ~/.recursive/skills/<slug>/.
load_skill
Tool to load a skill’s content by name.
memory
Persistent memory tools: remember, recall, forget.
permission_pipeline
Pre-execution permission pipeline for tool dispatch (Goal 261).
plan_mode
enter_plan_mode / exit_plan_mode tools — agent-driven read-only planning.
policy
Policy types for tool sandboxing.
policy_sandbox
L1 policy-based sandbox wrapper for tools.
registry
Tool registry: the Tool trait, ToolRegistry collection, and build_standard_tools factory.
run_background
run_background and check_background: spawn long-running commands asynchronously and poll their status later.
schedule_wakeup
schedule_wakeup tool — lets the agent request a timed re-invocation.
search
search_files: substring/regex search across workspace files.
send_message
send_message tool — coordinator ↔ worker (or task) messaging.
shell
run_shell: execute a command in the workspace.
stop_loop
stop_loop tool — let the agent end the event-driven loop itself.
todo
todo_write tool — agent task-list management.
tool_search
ToolSearchTool — lets the model discover deferred tools on demand.
transport
Transport abstraction: decouple tools from direct filesystem/shell access.
watch_file
watch_file tool — register a file for mid-run event wakes.
web_fetch
web_fetch: HTTP GET tool for fetching web content.
web_search
WebSearch: search the web using a configurable provider.