Guides and APICookbook
Customer Research Agent
A recipe for account, support, and renewal research agents.
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
This is an example recipe, not a core Little Harness concept. Use it when an agent needs internal tools, large intermediate datasets, and a clean export boundary.
Shape
const harness = createHarness({
host: localHost(),
model,
system: "Prepare evidence-backed customer research for account teams.",
tools: {
queryCustomers,
searchDocs,
searchIncidents,
getUsageMetrics,
saveReport,
},
skills: [skill("./skills/customer-renewal-analysis")],
});Working Pattern
The agent should:
- Query account metadata.
- Fetch recent incidents and usage metrics.
- Write large datasets to artifacts.
- Analyze those artifacts with scripts or shell tools.
- Produce a report artifact.
- Call an export tool only when the report should become app data.
Persistent Context
Use a Persistent Dir for account-team preferences, not for every raw customer record.
persistentDirs: [
{
harnessDir: "/persistent/account-team",
load: ({ extraBody }) => accountMemory.loadFolder(extraBody.teamId),
store: ({ extraBody, changes }) =>
accountMemory.applyChanges(extraBody.teamId, changes),
},
]Keep raw source-of-truth data behind tools so permissions and freshness remain under app control.
Export Tools
Useful exports include:
save_reportcreate_crm_notedraft_emailcreate_followup_task
Make the side effect obvious in the tool name and description.