# Using the Haybarn Function Guide from an agent

Start at /products/haybarn/functions/llms.txt or /products/haybarn/functions/api/v1/releases.json. Resolve paths beginning with / against the origin serving this document.

## Retrieval workflow

1. GET /products/haybarn/functions/api/v1/releases.json. Select the snapshot for the target engine and build; use its source ID and loaded extensions to assess applicability.
2. GET /products/haybarn/functions/api/v1/search.json?q=TERM&release=SNAPSHOT to search signatures, arguments, examples, and translations, or fetch the snapshot's full index URL and match locally. Use release=all only when cross-release results are wanted.
3. Follow the function's links.json for structured metadata or links.markdown for prose and SQL. Each overload includes a stable id and a human reference URL with the same fragment.
4. Read the selected overload's catalog fields and callingConvention. A function can have multiple kinds and arities. Raw table parameter arrays are alphabetical; callingConvention separates positional and named arguments using recorded binder evidence. Variadic types come from catalog.varargs. Defaults, minimum variadic counts and special named variadic behavior remain unknown.
5. For a migration, follow a comparison URL in the manifest. Inspect addedSignatures and removedSignatures for the specific function; description-only changes are not signature changes.

## Contract

All responses are generated from the same snapshots used by the HTML reference. schemaVersion is 1. The function schema is at /products/haybarn/functions/api/v1/function.schema.json. Function overload catalog fields preserve duckdb_functions() names, arrays, and nulls. Editorial guidance lives under editorial. Examples under examples originate in the engine catalog; verification: null means no execution evidence is recorded in the export.

The browser runtime is Haybarn WASM 1.5.5-rc3. Exported docs, comparisons, and search are read-only resources generated from committed snapshots at the edge. There is no HTTP SQL execution endpoint and no authentication requirement.

## Interpretation

- Choose a snapshot matching the target engine and build. The default is captured from the published Haybarn WASM package used by the browser playground. Historical native snapshots are also available.
- Availability is an observation in the recorded build and extension profile, not a guarantee of support in every installation or in WASM.
- Types and descriptions are declarations from duckdb_functions(). Binding can specialize result types. Null means not supplied by the catalog; do not invent defaults, optionality, argument mode, or table output columns.
- Raw parameter arrays preserve catalog order for scalar/aggregate/macro functions. Raw table arguments are alphabetical. Use callingConvention for engine-confirmed positional order and named arguments; null modes are unrecorded. Named does not mean optional. Macro defaults and special named variadic behavior are not supplied by duckdb_functions().
- Catalog examples are source material and may require data or extensions. runnableExamples contains separately verified SQL for the pinned WASM package; sample-data adaptations and guide examples are labeled separately.
- Guide annotations and recipes are separate editorial content. The browser runner always uses Haybarn WASM 1.5.5-rc3, independently of the documentation snapshot.
- All URLs beginning with / are relative to the origin hosting this document. Exports require no JavaScript, cookies, API key, or browser engine.

## Resources

- [Discovery](/products/haybarn/functions/llms.txt)
- [Release manifest](/products/haybarn/functions/api/v1/releases.json)
- [Function schema](/products/haybarn/functions/api/v1/function.schema.json)
- [Function search](/products/haybarn/functions/api/v1/search.json?q=list_transform)
- [Default catalog](/products/haybarn/functions/api/v1/haybarn-1.5.5-rc3/functions.json)
- [Example function](/products/haybarn/functions/api/v1/haybarn-1.5.5-rc3/functions/list_transform.json)
