Skip to main content

Import

Examples

Basic chat (preset)

Custom layout (composition)

Per-message control (compound)

Type Reference

UseChatOptions

Options accepted by use chat.

UseChatResult

useChat result

UseAgentOptions

Options accepted by use agent.

UseAgentResult

Result returned from use agent.

Exports

Components

Functions

Classes

Types

Constants

Deep imports

These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.

veryfront/chat/ag-ui

Components

Functions

Types

Constants

veryfront/chat/message-prep

Components

Functions

Types

veryfront/chat/protocol

Canonical chat message and stream protocol for Veryfront chat surfaces. These types describe the framework-owned message parts and stream events used by AG-UI-aligned chat clients, hooks, and adapters.

Types

veryfront/chat/types

Functions

Types

Constants

veryfront/chat/uploads

Chat upload handler: the server side of <Chat>’s batteries-included attachments. Mount it at app/api/uploads/route.ts (the same endpoint the composer POSTs to) and files “just work”: stored on the local disk in dev, on Veryfront Cloud (or a BlobStorage you pass) once deployed. ts // app/api/uploads/route.ts import { createChatUploadHandler } from "veryfront/chat/uploads"; function authorize(request: Request) { const token = Deno.env.get("UPLOAD_TOKEN"); return Boolean(token && request.headers.get("authorization") === `Bearer ${token}`); } export const { POST, GET, DELETE } = createChatUploadHandler({ authorize }); POST stores the multipart file field and returns { id, url, name, mediaType, size }. The composer sends that url as a file message part, which the runtime fetches, so the URL must be reachable by the runtime (true for local dev, where GET streams the file back from the same origin).

Functions

Types