Tooling¶
Purpose¶
The Harness layer provides a default set of built-in tools sufficient to complete a full closed loop: reading and writing files, searching memory and sessions, delegating subagents, and optionally running a shell. No manual registration is needed — HarnessAgent.build() and SubagentsHook wire everything up together.
Registration Path¶
graph LR
Build[HarnessAgent.build] --> R1[FilesystemTool]
Build --> R2[MemorySearchTool]
Build --> R3[MemoryGetTool]
Build --> R4[SessionSearchTool]
Build -. backend is sandbox .-> R5[ShellExecuteTool]
Hook[SubagentsHook.tools<br/>non-leaf with model] --> H1[AgentSpawnTool]
Hook --> H2[TaskTool]
Direct registration:
FilesystemTool/MemorySearchTool/MemoryGetTool/SessionSearchToolare always registered;ShellExecuteToolis only registered whenbackend instanceof AbstractSandboxFilesystem.Indirect registration:
AgentSpawnToolandTaskToolare returned bySubagentsHook.tools()and only appear when non-leaf andmodelis configured; in session mode,agent_*tools are renamed tosessions_*.
Filesystem — FilesystemTool¶
Wraps AbstractFilesystem; paths are the backend’s local paths.
Tool |
Purpose |
Parameters |
|---|---|---|
|
Read file content |
|
|
Create new file |
|
|
Exact string replacement |
|
|
Search string in specified path (not regex) |
|
|
Find files by glob pattern |
|
|
List directory |
|
Memory — MemorySearchTool / MemoryGetTool¶
Tool |
Purpose |
Parameters |
|---|---|---|
|
FTS5 full-text search, returns at most 30 results; falls back to keyword scan when MemoryIndex is unavailable |
|
|
Read a line range from a memory file, output with line numbers |
|
Parameter names are camelCase (
startLine/endLine), inconsistent with the snake_case used by filesystem tools.
Session — SessionSearchTool¶
Tool |
Purpose |
Parameters |
|---|---|---|
|
Scan session JSONL for keywords |
|
|
List sessions for an agent; reads |
|
|
Return the last N messages from a session |
|
All parameter names are camelCase.
session_searchreturns the “first 10 hits” across allagents/<agentId>/sessions/*.jsonl, not ranked by relevance.
Subagent — AgentSpawnTool¶
Tool |
Purpose |
Parameters |
|---|---|---|
|
Create a temporary subagent, optionally with an initial task |
|
|
Send a follow-up message to an existing subagent |
|
|
List currently active subagents |
none |
agent_spawn agent_id="research-analyst"
task="research topic X"
timeout_seconds=60
# async
agent_spawn agent_id="research-analyst" task="full security audit" timeout_seconds=0
# → agent_key + task_id
In session mode, these three names become sessions_spawn / sessions_send / sessions_list.
Background Tasks — TaskTool¶
Tool |
Purpose |
Parameters |
|---|---|---|
|
Get background task result |
|
|
Cancel a task; no effect on terminal states |
|
|
List tasks |
|
Shell — ShellExecuteTool (Conditional)¶
Only registered when the backend is AbstractSandboxFilesystem (which includes LocalFilesystemWithShell). If you use a pure LocalFilesystem or RemoteFilesystem, this tool does not appear.
Tool |
Purpose |
Parameters |
|---|---|---|
|
Calls backend |
|
Note:
@Toolhas no explicitnameset, so the tool name defaults to the method name, meaning the LLM seesexecute. A future rename toshell_executeis a small refactor — see roadmap.
execute command="find . -name '*.java' | wc -l"
execute command="mvn test" timeout=300
execute command="git status" working_directory="app" # becomes: cd app && git status