fig. 01 · Tool call, live

What you get

  • A toolkit file with each tool's schema and executor
  • A component per tool that renders the call while it runs and once it has a result
  • Registration on the assistant and in the chat route

Requires

  • An assistant-ui app with a chat route on the AI SDK

How it installs

Add it to your setup and start from the cart: your coding agent works through these steps. You can also follow them by hand.

Enable the compiler

Wrap next.config.ts with withAui from @assistant-ui/next, or add the aui() plugin from @assistant-ui/vite.

Write the toolkit

Create app/toolkit.tsx starting with "use generative": one defineToolkit entry per tool, with a zod schema, an execute, and a render.

Register it

Pass the toolkit to AssistantRuntimeProvider through AuiConfig({ tools: Tools({ toolkit }) }) and expose it in the chat route with AISDKToolkit.