The SDK is split into entry points so you only import what you need. The core flow engine ships zero runtime dependencies; the rest is opt-in.Documentation Index
Fetch the complete documentation index at: https://docs.waniwani.ai/llms.txt
Use this file to discover all available pages before exploring further.
| Entry point | What you get | Requires API key? |
|---|---|---|
@waniwani/sdk | waniwani() client, WaniWaniError | Yes |
@waniwani/sdk/mcp | createFlow, StateGraph, START, END, KvStore, MemoryKvStore, WaniwaniKvStore, withWaniwani, scoped client, tracking helpers | No (key unlocks hosted parts) |
@waniwani/sdk/mcp/react | useWaniwani standalone tracking hook | No |
@waniwani/sdk/chat | ChatEmbed, themes, embed.js, styles.css | Yes |
@waniwani/sdk/kb | Knowledge-base client (createKbClient) | Yes |
Bundle sizes
@waniwani/sdk/mcpcore path: under 5 KB gzipped@waniwani/sdk/chat(full widget bundle): ~650 KB (React included; tree-shakeable when you import individual layouts)@waniwani/sdkclient + tracking: ~10 KB gzipped
Peer dependencies
@modelcontextprotocol/sdk(required for server entry points)zod(required for flow state schemas)react(only required when using@waniwani/sdk/chator@waniwani/sdk/mcp/react)