> ## Documentation Index
> Fetch the complete documentation index at: https://checkfu.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Support desk

> Add an agent to a foreign stack without changing the stack.

An ordinary support inbox — Hono, Vite and React, an in-memory ticket store — where Checkfu arrives in a second commit. Hono stays Hono, the ticket store stays the source of application state, and the browser still talks only to its own backend.

Source: `examples/support-desk` in the repository. The index at `examples/README.md` compares all eight side by side.

## Golden journeys

* Serve the app's own functions as Custom tools
* Get agent and UI parity against one store
* Gate a drafted reply behind an approval
* Receive and verify a webhook

## Platform surfaces exercised

Agents and versions, Sessions, Custom tools, ActionApprovals, Webhooks.

## From the source

Tool declarations are built from the same functions the human-facing routes call. Consequential operations request ActionApproval in the declaration itself:

```ts path=examples/support-desk/server/src/agent-tools.ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
	defineTool({
		name: "close_ticket",
		description: "Close a resolved support ticket after a human approves the frozen call.",
		schema: ticketIdSchema,
		needsActionApproval: true,
		handler: (input: JsonValue, context: TicketExecutionContext) => {
			const { ticket_id } = readTicketArguments(input)
			return ticket_id === ticketId
				? actions.closeTicket({ ticket_id: ticketId }, context)
				: {
						ok: false,
						error: "ticket_scope_mismatch",
						ticket_id,
						expected_ticket_id: ticketId,
					}
		},
	}),
```

This block is quoted from the file, not retyped: `pnpm agent-docs:check` fails if it drifts.

## Honest gaps

Recorded as a per-entry ledger under `## Tests and honest gaps` in `examples/support-desk/README.md`. Counts are deliberately not repeated here — they differ per tree, and `examples/README.md` carries them with the sha they were measured at.
