FabricFabricHarness
Building Agents

Tools

Built-in model-callable functions.

Tools are functions the model can call during a session. Fabric Harness ships a built-in toolbelt that mirrors the proven coding-agent pattern.

Built-in tools

ToolPurpose
readRead a file from the sandbox.
writeWrite a file to the sandbox.
editApply a localized edit (find/replace) to a file.
bashExecute a shell command in the sandbox.
grepSearch file contents.
globMatch files by pattern.
taskSpawn a child task.

All built-ins are capability-aware: write and edit honor any filesystem write scope declared on the session, bash honors the configured commands allowlist.

Constructing the toolset

import { createBuiltinTools } from '@fabric-harness/sdk';

const sandbox = await session.sandbox;
const tools = createBuiltinTools(sandbox);

await session.prompt('Find and fix the failing test', { tools });

By default, session.prompt() uses the built-in tools. You typically only override this when you want to limit which tools are available or augment with custom ones.

Custom tools (sketch)

import { tool, schema } from '@fabric-harness/sdk';

const fetchIssue = tool({
  name: 'fetch_issue',
  description: 'Fetch a GitHub issue by number.',
  input: schema.object({ number: schema.number() }),
  output: schema.object({ title: schema.string(), body: schema.string() }),
  run: async ({ input }) => {
    // ...
    return { title, body };
  },
});

await session.prompt('Triage issue #42', { tools: [...tools, fetchIssue] });

Designed-for, not yet built-in

ToolStatus
artifact_publish / artifact_readDesigned; today use session.artifacts.publish().
approval_requestDesigned; today use session.approval.request().
checkpoint_createDesigned; today use session.checkpoint.create().
web_fetchRoadmap.
browser (Playwright)Roadmap.