Skip to main content
Tools use the Vercel AI SDK tool() helper with Zod schemas. OpenHarness ships a set of built-in tools that you can use as-is, compose, or replace entirely.

Filesystem Tools

Create filesystem tools by passing a provider to the factory function:
This returns the following tools:

Bash Tool

The bash tool runs arbitrary shell commands via bash -c:
Features:
  • Configurable timeout (default 30s, max 5min)
  • Automatic output truncation for large results
  • Captures both stdout and stderr with exit code

Using Tools with an Agent

Pass tools directly to the agent constructor:
You can selectively include tools — for example, a read-only agent:

Providers

The provider interface decouples tool logic from the runtime environment. The built-in NodeFsProvider and NodeShellProvider work in Node.js, but you can implement the interfaces for other environments:
  • Virtual filesystems for testing
  • E2B sandboxes for isolated execution
  • Cloudflare Workers for edge deployment
  • Daytona for managed dev environments

FsProvider Interface

ShellProvider Interface

The built-in NodeFsProvider includes safety guards like file size limits and binary file detection. NodeShellProvider captures exit code, stdout, and stderr with output size limits.

Todo Tools

Create session-scoped todo tools with a pluggable store:
This returns: Todo items use typed statuses (pending, in_progress, completed, cancelled) and priorities (high, medium, low). If priority is omitted, it defaults to medium. When used with sessionEventsToUIStream(), successful todowrite calls emit a data-oh:todo.updated part so UI integrations can update without parsing raw tool output.