Built for production, not demos
yak isn't just a chatbot overlay. It's a complete AI assistant platform with multi-API integration, security built-in, programmatic control, and full theming—everything you need to ship a production-quality experience.
Multi-API integration
yak connects to your existing APIs—tRPC, GraphQL, REST/OpenAPI, or custom adapters. The AI learns your schema and generates appropriate queries. You provide the API, we handle the AI.
- tRPC adapter with procedure allowlisting
- GraphQL schema integration
- REST/OpenAPI spec support
- Custom adapters for any data source
- Combine multiple APIs in a single assistant
Security by design
yak doesn't bypass your security model—it works within it. Tool calls receive the original request object, so you authenticate with cookies, headers, or tokens. The AI only accesses what the user can access.
- Tool calls receive the original Request object
- Use your existing auth (Clerk, Auth.js, custom)
- Allowlist specific procedures—block the rest
- Origin validation for all postMessage communication
- Built-in redirect protection against open redirect attacks
Programmatic control
Go beyond the floating button. The useYak hook gives you full control to open the chat, inject context-aware prompts, and subscribe to tool events—build help buttons, onboarding flows, or error assistance.
- open(), close(), openWithPrompt() methods
- Check widget state with isOpen
- Subscribe to tool events for cache invalidation
- Build context-sensitive help buttons
- Create keyboard shortcuts and help menus
Custom theming
The assistant should feel native to your product. Configure position, colors, display mode, and color scheme. Separate light and dark mode themes let you match both modes of your design system.
- Chatbox or full-height drawer display modes
- Left or right positioning
- Light, dark, or system color mode
- Customize backgrounds, borders, buttons, and message bubbles
- Style the launcher button per color mode
Automatic route discovery
For Next.js apps, yak scans your app directory and extracts page metadata automatically. The AI knows every page in your app and can navigate users there. A CLI generates the manifest for production builds.
- Auto-scans Next.js app and pages directories
- Extracts title and description from page metadata
- CLI generates route manifest for production
- Filter routes with include/exclude patterns
- Override with custom routes when needed
yak-nextjs generate-manifestTool event subscription
When the AI modifies data through tool calls, your UI should update. The useYakToolEvent hook lets you subscribe to tool completions and invalidate caches—your page refreshes automatically after chatbot actions.
- Subscribe to tool call completion events
- Access tool name, args, result, and success status
- Integrate with tRPC, React Query, or SWR cache invalidation
- Auto-unsubscribe when components unmount
- Keep data fresh without manual refresh
Ready to see these features in action?
Get started with yak today and ship an AI assistant that matches your product.