Skip to content
fig. 01 · Tool call, live

What you get

  • A tool schema and executor added to your project toolkit, creating one if needed
  • 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

Give your coding agent the prompt above and it 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.