yak
Features

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.

Connect any data source

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
Supported adapters
tRPC
Procedure introspection
GraphQL
Schema-based queries
REST
OpenAPI spec support
Custom
Build your own
// Combine multiple sources
tools: [trpcAdapter, graphqlTools]
Respects your access controls

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
How it works
1
User asks: "Show my orders"
2
Tool receives Request with user's cookies/headers
3
Your auth middleware validates—only their data returned
No service accounts or elevated access
Open, close, inject prompts

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
useYak hook
// Control from anywhere
const { open, openWithPrompt } = useYak();
// Context-aware help
openWithPrompt("Help me with billing");
Full TypeScript support
Match your brand

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
Theme options
// Match your brand
displayMode: "drawer"
position: "right"
colorMode: "system"
light: { background: '#fff', ... }
Zero-config navigation

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
Route manifest
// Auto-generated from app/
[
{ path: "/", title: "Home" }
{ path: "/settings", title: "Settings" }
]
CLI: yak-nextjs generate-manifest
Keep your UI in sync

Tool 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
Cache invalidation
useYakToolEvent((event) => {
if (event.ok) {
utils.orders.invalidate();
}
});
Works with tRPC, React Query, SWR

Ready to see these features in action?

Get started with yak today and ship an AI assistant that matches your product.