Agent Tool
A tool with a schema, an executor, and a component that renders its calls in the thread. Specify an action for each tool; your coding agent writes it into your existing assistant-ui project.
MIT · Open source · For existing assistant-ui apps. Agent time 4–9 min.
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.