Skip to main content

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.

A distribution shift is underway. ChatGPT, Claude, and Cursor are becoming the new browsers. MCP is the store. The way users find products, get qualified, book, and buy is moving from web forms inside web pages to conversational funnels inside AI clients. This page explains why we believe that, and why @waniwani/sdk exists.

The distribution shift

For twenty years the web ran on the same loop: a user lands on a page, fills a form, gets routed to the next step. Sales funnels, lead generation, booking, quoting. Money moved through forms. That loop is moving. The interface a user starts a buying journey in is increasingly an AI client, not a browser tab. ChatGPT, Claude, and Cursor are where attention concentrates. MCP is the protocol those clients use to call third-party tools. From the user’s perspective: they describe what they want, the AI client calls your MCP server, your server runs the funnel. The implications are not subtle:
  • One server, every surface. One MCP server reaches ChatGPT, Claude, Cursor, and any other MCP-capable client. One edit to your messaging deploys everywhere.
  • No website, no form, no chatbot widget. The funnel runs inside the AI client the user already uses.
  • The funnel is a tool call. The same tool call drives the conversation, validates input, branches, persists state.

Conversational funnels are the new web forms

The shape of the work has not changed. A funnel still has steps. A booking funnel still asks for a service, a slot, and a confirmation. An insurance funnel still collects details, validates, and returns a quote. A lead funnel still captures email, role, and use case. What changes is the rendering surface. The funnel runs inside an AI client. The model is the front-end. The funnel logic still lives on your server. This is good news: the business outcomes you care about (qualified leads, booked appointments, returned quotes, completed purchases) translate directly. It is bad news only if you assume the AI client will run the funnel for you. It will not.

Why LLMs cannot run funnels on their own

A funnel needs five things:
  1. Deterministic order. Steps run in a known sequence.
  2. Typed fields. Email is an email, date is a date.
  3. Validation. Bad input is rejected and re-asked.
  4. Branching. The next step depends on the current answer.
  5. Resumable state. Every step builds on the last, across many tool calls.
LLMs left to themselves do none of these reliably. They paraphrase questions, skip fields, accept malformed input, drop state between turns. This is not a bug in the model. It is a mismatch: a stateless system cannot run a stateful process. The fix is to make the funnel deterministic on the server, and let the model do what it is good at: rendering the next question, interpreting the answer, handing back to the server.

Why generic agent frameworks are not the right fit

Frameworks like LangChain and LangGraph are general-purpose agent builders. They expose every primitive: graphs, tools, memory, retrievers, planners. You can build a funnel on top of them. You can also build a database on top of malloc. The cost is that every funnel ergonomic (interrupt on a missing field, re-ask on validation failure, skip a step whose state is already known, hand off to a widget for confirmation, persist state under the MCP session id) is something you re-invent on every project. The frameworks give you the road. They do not give you the car. createFlow is funnel-shaped by design. A node is a step. An interrupt is a form field. An edge is a transition. A conditional edge is a branching question. Typed state via Zod is your lead data. The graph compiles to one MCP tool. The engine runs it. See WaniWani vs LangGraph for a direct comparison.

Production-validated

We did not start with this abstraction. We arrived at it. @waniwani/sdk is forked from internal distribution MCPs we shipped for paying customers: insurance quoting, pet care, lead capture, booking. We hit the same pattern enough times to extract it, and open-sourced once the shape stabilized. The hosted tier (analytics, KV store, embeddable widgets, knowledge base) is opt-in via a single env var. The engine works standalone with any get/set/delete backend.

What this means for you

If you are building distribution into AI clients, you have three options:
  1. Hand-roll on the raw MCP SDK. You serialize state through the model on every turn. The model forgets, paraphrases, skips. You re-invent re-ask, validation, and branching on every project.
  2. Build on a generic agent framework. You get graph primitives but write all the funnel ergonomics yourself.
  3. Use createFlow. You declare state, nodes, and edges. The engine handles interrupts, validation, branching, and resumption, and compiles to one MCP tool.
This SDK exists because we believe option three should be the default. The funnel is the unit of distribution in the AI era, and the abstraction should be funnel-shaped.

Next

Quickstart

Boot a flow-driven MCP server in 60 seconds.

Build a funnel

Sales funnels, lead gen, booking, quote flows.

vs LangGraph

Direct comparison with LangChain’s graph framework.

Flow engine

Nodes, edges, interrupts, conditional branching.