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:Bash Tool
The bash tool runs arbitrary shell commands viabash -c:
- 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:Providers
The provider interface decouples tool logic from the runtime environment. The built-inNodeFsProvider 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
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:
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.