Buddy
v1.0.4 | MIT License
open source · bring your own AI / from anywhere

Smart web
companion.

drop one line into any page and get a cursor-following companion that can onboard users, guide tours, and answer questions — powered by your own AI provider.

or press / anywhere to summon buddy.

Size (gzipped) ~12kb
Framework Agnostic
Installation 1 line HTML
License MIT
try it live

one click. buddy takes over.

hit the button above and buddy walks you through everything — no scrolling, no clicking, no reading. just watch.

Primitive 01

Contextual
Live Tours

hand buddy an array of selectors + copy. it spotlights each element in order — no heavy SaaS required.

Primitive 02

Spatial
Context Chat

the chat reads the page around the cursor and answers in context — it knows what the user is looking at.

Primitive 03

Cursor
Companion

a friendly sprite trails the cursor, docks politely when idle. click to chat. ⌘/ from anywhere.

bring your own AI

Any streaming endpoint.

Anthropic, OpenAI, Gemini, Groq, Vercel AI SDK, Cloudflare Workers AI — if it streams, it works.

installation

Drop it in.

zero build steps. works in React, Vue, Svelte, Astro, or plain HTML.

<!-- drop this anywhere -->
<script type="module" src="https://unpkg.com/heybuddy"></script>

<hey-buddy
  endpoint="/api/chat"
  accent="#ff6a3d"
  greeting="hey — need a hand?"
></hey-buddy>
# install
bun add heybuddy

# in your app
import "heybuddy";

const buddy = document.querySelector("hey-buddy");
buddy.configure({
  endpoint: "/api/chat",
  tour: [
    { selector: "#pricing", body: "here's what it costs" },
  ]
});
// works with react 19 custom elements
import "heybuddy";

export function Layout() {
  return (
    <hey-buddy
      endpoint="/api/chat"
      greeting="hey — need a hand?"
    />
  );
}
bring your own AI

your stack, your context.

buddy expects a streaming endpoint. that's it. here's a one-file route that works with the vercel AI SDK and anthropic.

app/api/chat/route.ts
import { anthropic } from "@ai-sdk/anthropic";
import { streamText } from "ai";

export async function POST(req: Request) {
  const { messages, context } = await req.json();

  const result = streamText({
    model: anthropic("claude-haiku-4-5"),
    system: `you're the friendly guide for ${context?.page}.`,
    messages,
  });

  return result.toDataStreamResponse();
}

key stays server-side — buddy just POSTs to /api/chat.

customize

make buddy yours. live.

tweak these controls — buddy in the corner reacts instantly. copy the snippet, paste into your html, done.

#ff6a3d
#ffffff
#ff6a3d
your-page.html