Skip to content

FlowKitBuild AI Conversational Flows in Minutes

The simplest way to create structured AI conversations. Define your agent and flows declaratively, let the LLM handle the complexity.

FlowKit

Why FlowKit?

Traditional chatbot frameworks require hundreds of lines of boilerplate code. FlowKit lets you focus on what matters: the conversation.

typescript
import { agent, flow, FlowEngine, MemoryStorage, OllamaAdapter, name, yesNo } from "@andresaya/flowkit";

// Define your agent
const bot = agent("Alex")
  .personality("friendly and helpful")
  .build();

// Build your flow
const myFlow = flow("greeting", bot)
  .ask("name", "Hi! What's your name?", name(), "user_name")
  .then("confirm")
  .ask("confirm", "Nice to meet you {{user_name}}! Need help?", yesNo(), "needs_help")
  .when({ yes: "help", no: "bye" })
  .say("help", "I'm here to help!")
  .done()
  .say("bye", "Goodbye {{user_name}}!")
  .done()
  .build();

// Run it
const engine = new FlowEngine(myFlow, { 
  llm: new OllamaAdapter({ model: "llama3.2" }),
  storage: new MemoryStorage()
});

const result = await engine.start("session-1");
console.log(result.message); // "Hi! What's your name?"

Quick Comparison

Traditional ApproachWith FlowKit
150+ lines of code~30 lines
Manual regex/parsingLLM understands context
Hardcoded languageWorks in any language
Complex state managementDeclarative flows
Provider lock-inSwap providers easily

Released under the MIT License.