Tools

Built-in Tools

noumen ships with 20+ tools covering file operations, shell commands, codebase search, web access, subagents, tasks, planning, and code intelligence — all sandboxed through VirtualFs and VirtualComputer.

Every noumen agent has access to a set of built-in tools registered in the ToolRegistry. The nine core tools (ReadFile, WriteFile, EditFile, Bash, Glob, Grep, WebFetch, NotebookEdit, AskUser) are always available. Additional tools are enabled through Agent options — subagents, tasks, plan mode, worktrees, LSP, web search, and skills each add their own tools when enabled.

All tools delegate file and shell access through the sandbox (VirtualFs and VirtualComputer), so isolation is controlled entirely by which sandbox you provide.

Tool reference

File I/O

ToolDescription
ReadFileRead file contents with optional line offset and limit. Returns numbered lines.
WriteFileCreate or overwrite a file at a given path. Parent directories are created automatically.
EditFileFind-and-replace string editing within a file. The target string must appear exactly once.
NotebookEditEdit a Jupyter notebook (.ipynb) file. Can replace, insert, or delete cells.
ToolDescription
GlobFind files matching a glob pattern using ripgrep for fast recursive search.
GrepSearch file contents by regex pattern using ripgrep. Supports case-insensitive search and context lines.

Execution

ToolDescription
BashExecute shell commands via VirtualComputer. Returns stdout, stderr, and exit code.

Web

ToolDescription
WebFetchFetch a URL and return its contents as markdown. Useful for reading documentation and API responses.
WebSearchSearch the web for real-time information. Requires a user-provided search backend (Tavily, SerpAPI, etc.).

Agent & Interaction

ToolDescription
AgentSpawn an isolated subagent to handle a focused subtask in its own conversation context.
AskUserAsk the user a question and wait for their response.
SkillInvoke a skill by name with optional arguments. Available when skills are configured.

Task Management

ToolDescription
TaskCreateCreate a new task/todo item for tracking work.
TaskListList all tasks with their current status.
TaskGetGet details of a specific task by ID.
TaskUpdateUpdate a task's status, description, or dependencies.

Planning & Worktrees

ToolDescription
EnterPlanModeEnter plan mode to explore the codebase before making changes. File writes and edits are restricted.
ExitPlanModeExit plan mode and return to the previous permission mode.
EnterWorktreeCreate an isolated git worktree on a new branch for parallel or experimental work.
ExitWorktreeExit the current worktree, optionally keeping or removing it.

Code Intelligence

ToolDescription
LSPQuery language servers for code intelligence: goToDefinition, findReferences, hover, documentSymbol, workspaceSymbol.
ToolSearchDiscover deferred tools on demand, reducing context usage by only exposing tools the agent actually needs.

Enabling optional tools

Core tools (ReadFile, WriteFile, EditFile, Bash, Glob, Grep, WebFetch, NotebookEdit, AskUser) are always registered. Other tools require enabling their feature in Agent options:

const code = new Agent({
  provider,
  sandbox,
  options: {
    enableSubagents: true,    // adds Agent tool
    enableTasks: true,        // adds TaskCreate, TaskList, TaskGet, TaskUpdate
    enablePlanMode: true,     // adds EnterPlanMode, ExitPlanMode
    enableWorktrees: true,    // adds EnterWorktree, ExitWorktree
    lsp: { ... },             // adds LSP tool (pass Record<string, LspServerConfig>)
    skills: [...],            // adds Skill tool when skills are configured
    webSearch: { ... },       // configures the WebSearch tool backend
    toolSearch: true,         // adds ToolSearch for on-demand tool discovery
    streamingToolExecution: true, // execute tools as they arrive during model streaming
  },
});

These flags are opt-in rather than on by default for two reasons: each additional tool increases the token cost of every request, and exposing a capability means the model may use it even when a simpler approach would suffice. See each feature's docs page for specifics.

When toolSearch is enabled, tools marked as deferred (MCP tools by default, plus any tool with shouldDefer: true) are hidden from the model's tool definitions. Instead, a ToolSearch tool is added that lets the model discover and load deferred tools on demand. This fundamentally changes how the agent sees its tool set — tools it would normally use directly become invisible until explicitly searched for — so it's off by default.

Streaming tool execution

When streamingToolExecution is enabled, the agent begins executing concurrency-safe tools as soon as their arguments finish streaming from the model, rather than waiting for the model's entire response to complete. This can reduce latency when the model requests multiple independent tool calls in a single turn. It's off by default because it changes execution ordering: tools may start running while the model is still generating, which can be surprising if you rely on observing the full model response before side-effects occur.

File state cache (read-before-edit)

The file state cache tracks which files the model has read and enforces that it must read a file before editing it. When enabled, EditFile and WriteFile will reject edits to files the model hasn't seen via ReadFile, preventing hallucinated edits on unseen content.

options: {
  fileStateCache: {
    enabled: true,
    maxEntries: 100,                  // max cached file entries (default)
    maxBytes: 25 * 1024 * 1024,      // 25 MB total cache size (default)
  },
}

The cache is an LRU store that records file contents and modification times at the point of each read. This is opt-in because it introduces a hard constraint on tool execution order — the model must explicitly read every file it wants to edit, which can cause edit attempts to fail if the model skips the read step. Without this option, edits proceed unconditionally.

FieldTypeDefaultDescription
enabledbooleanEnable read-before-edit enforcement
maxEntriesnumber100Maximum number of file entries in the cache
maxBytesnumber26_214_400 (25 MB)Maximum total cached content size in bytes

How tools work

During an agent run, the model can request tool calls. The Thread's agent loop:

  1. Sends available tool definitions to the model
  2. Receives tool call requests from the model's response
  3. Executes each tool via the ToolRegistry
  4. Sends tool results back to the model
  5. Repeats until the model produces a final text response

Read-only tools marked with isConcurrencySafe can run in parallel within a single turn. The orchestration layer automatically partitions tool calls into concurrent and serial batches.

See Custom Tools for how to add your own tools.