Little documentation
Guides and APIFoundations

Tools Vs Exports

How to separate agent capabilities from deliberate app writes.

Little Harness: published on npm as little-harness@0.2.0-alpha.0 (2026-10-05). Sections labeled UNRELEASED describe source-only changes. Release status

Little Harness makes a clean distinction between tools the agent uses while working and exports that publish results back to the app.

Tools

Tools give the agent capabilities:

  • search documents
  • query customers
  • fetch support incidents
  • summarize a PDF
  • call an MCP server
  • create a dataset artifact

Most tools are part of the agent's working loop. Their results may be summarized into context or written to /artifacts/ when large.

// Registered as `tools: { search_docs: searchDocs }`; AI SDK `tool()` has no `name` field.
const searchDocs = tool({
  description: "Search indexed company documents.",
  inputSchema: z.object({ query: z.string() }),
  execute: async ({ query }) => docs.search(query),
});

Exports

Exports are deliberate app writes. They are usually tools too, but the documentation should treat them differently because they publish something outside the harness boundary.

Examples:

  • save a final report
  • update a customer note
  • create a Linear issue
  • send an email draft
  • commit a file to a repository
// Registered as `tools: { save_report: saveReport }`.
// harnessToolContext comes from "@little-stack/harness".
const saveReport = tool({
  description: "Save a completed report to the app.",
  inputSchema: z.object({
    title: z.string(),
    artifactPath: z.string(),
  }),
  execute: async ({ title, artifactPath }, options) => {
    const file = await harnessToolContext(options).artifacts.read(artifactPath);
    return reports.create({ title, content: file.text() });
  },
});

Why The Split Matters

Without an export boundary, every generated file risks becoming app data. With the boundary, the agent can think, inspect, and transform freely inside the harness, while the app still decides what becomes durable product state.

On this page