Add inline tool approval cards to your AI chat interface with the Vercel AI SDK — users confirm or cancel agent actions directly in the message thread. This human-in-the-loop UI pattern is essential for any AI that takes real-world actions like sending emails, creating records, or modifying data.
- AI assistants that send emails, schedule meetings, or post to social media
- Database-modifying agents that need explicit write confirmation
- Financial applications where AI-suggested transactions need approval
- Workflow automation with human checkpoints at critical decision points
Tech stack
Vercel AI SDKNext.jsReactTypeScriptuseChatshadcn/ui
npx shadcn@latest add https://shadcnagents.com/r/ai-elements-confirmation