Skip to main content

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

  • Direct registration: FilesystemTool / MemorySearchTool / MemoryGetTool / SessionSearchTool are always registered; ShellExecuteTool is only registered when backend instanceof AbstractSandboxFilesystem.
  • Indirect registration: AgentSpawnTool and TaskTool are returned by SubagentsHook.tools() and only appear when non-leaf and model is configured; in session mode, agent_* tools are renamed to sessions_*.

Filesystem — FilesystemTool

Wraps AbstractFilesystem; paths are the backend’s local paths.

Memory — MemorySearchTool / MemoryGetTool

Parameter names are camelCase (startLine / endLine), inconsistent with the snake_case used by filesystem tools.

Session — SessionSearchTool

All parameter names are camelCase. session_search returns the “first 10 hits” across all agents/<agentId>/sessions/*.jsonl, not ranked by relevance.

Subagent — AgentSpawnTool

In session mode, these three names become sessions_spawn / sessions_send / sessions_list.

Background Tasks — TaskTool

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.
Note: @Tool has no explicit name set, so the tool name defaults to the method name, meaning the LLM sees execute. A future rename to shell_execute is a small refactor — see roadmap.
  • Filesystem — backend implementations and sandbox interface
  • Memory — FTS5 and the two-layer memory behind memory_search / memory_get
  • SessionWorkspaceSession / SessionTree dual-track behind session_* tools
  • Subagent — scheduling and lifecycle of agent_spawn / agent_send / task_*