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 a2a::A2aCallTool;pub use a2a::A2aCardTool;pub use a2a::A2aTaskCheckTool;pub use apply_patch::ApplyPatch;pub use checkpoint::build_checkpoint_tools;pub use checkpoint::CheckpointDiff;pub use checkpoint::CheckpointList;pub use checkpoint::CheckpointToolCtx;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::ListDir;pub use fs::ReadFile;pub use fs::WriteFile;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 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::BackgroundJobManager;pub use run_background::CheckBackground;pub use run_background::Job;pub use run_background::JobState;pub use run_background::RunBackground;pub use run_skill_script::RunSkillScript;pub use schedule_wakeup::ScheduleWakeup;pub use schedule_wakeup::WakeupRequest;pub use schedule_wakeup::WakeupSlot;pub use search::SearchFiles;pub use send_message::SendMessageTool;pub use send_message::WorkerMailbox;pub use send_message::WorkerRegistry;pub use shell::RunShell;pub use spawn_worker::SpawnWorkerTool;pub use spawn_worker::WorkerType;pub use str_replace::StrReplaceTool;pub use sub_agent::SubAgent;pub use team_manage::TeamAddRole;pub use team_manage::TeamListRoles;pub use team_manage::TeamRemoveRole;pub use todo::TodoItem;pub use todo::TodoStatus;pub use todo::TodoWriteTool;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;
Modules§
- a2a
a2a_calltool — invoke a remote A2A (Agent2Agent v1.0) agent.- apply_
patch apply_patch: apply a structured multi-file patch atomically.- checkpoint
- Read-only agent tools that surface the session’s checkpoint chain.
- 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_file,write_file,list_dir. - load_
skill - Tool to load a skill’s content by name.
- memory
- Persistent memory tools:
remember,recall,forget. - plan_
mode enter_plan_mode/exit_plan_modetools — agent-driven read-only planning.- policy_
sandbox - L1 policy-based sandbox wrapper for tools.
- run_
background run_backgroundandcheck_background: spawn long-running commands asynchronously and poll their status later.- run_
skill_ script - Tool to run a script from a skill’s
scripts/directory. - 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_messagetool — bidirectional coordinator ↔ worker messaging.- shell
run_shell: execute a command in the workspace.- spawn_
worker spawn_workertool: first-class coordinator-pattern delegation.- str_
replace str_replace: edit a file by replacing an exact string.- sub_
agent - Sub-agent tool: spawn a fresh agent loop with a restricted tool subset.
- team_
manage - Dynamic team management tools:
team_add_role,team_remove_role,team_list_roles. - todo
todo_writetool — agent task-list management.- transport
- Transport abstraction: decouple tools from direct filesystem/shell access.
- web_
fetch web_fetch: HTTP GET tool for fetching web content.
Structs§
- Audit
Meta - Per-call audit record returned by
ToolRegistry::invoke_with_auditand stored incrate::session::TranscriptEntry::audit. - Tool
Dispatch - Return value of
ToolRegistry::invoke_with_audit: the tool result and its accompanying audit record. - Tool
Registry - Touched
Files - Observer that records files touched by structured filesystem tools
during a single agent turn. Owned by
AgentRuntimeand reset at every turn boundary; passed byArc<Mutex<...>>to theToolRegistryso tool dispatch can recordpatharguments.
Enums§
- Exit
Status - Outcome of a single tool invocation, as recorded in
AuditMeta. - Tool
Side Effect - Classification of a tool’s observable side-effects on state outside the agent process. Used by orphan detection and safe-replay (g154) to decide how aggressively to retry or skip an unfinished tool call.
Constants§
- AUDIT_
ERR_ MAX_ BYTES - Maximum length of the persisted error message in
ExitStatus::Err. Anything longer is UTF-8 char-boundary clipped andtruncatedis set.
Traits§
- Permission
Hook - Goal-161: runtime permission hook. Implement this trait to intercept every tool invocation before it runs.
- Tool
Functions§
- args_
preview_ for_ permission - Build a short human-readable preview of tool arguments for the permission dialog. Extracts up to 80 characters.
- build_
standard_ tools - Build the standard tool registry for an agent rooted at
workspace.