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
| Tool | Purpose |
|---|---|
read | Read a file from the sandbox. |
write | Write a file to the sandbox. |
edit | Apply a localized edit (find/replace) to a file. |
bash | Execute a shell command in the sandbox. |
grep | Search file contents. |
glob | Match files by pattern. |
task | Spawn 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
| Tool | Status |
|---|---|
artifact_publish / artifact_read | Designed; today use session.artifacts.publish(). |
approval_request | Designed; today use session.approval.request(). |
checkpoint_create | Designed; today use session.checkpoint.create(). |
web_fetch | Roadmap. |
browser (Playwright) | Roadmap. |