agentskit.js
Examples

Customer Support Bot

Quick replies, typing indicators, escalation flows. Build production support experiences with AgentsKit's headless components.

Quick replies, typing indicators, escalation flows. Build production support experiences with AgentsKit's headless components.

Hi β€” I can take a reservation, look up an order, or hand you to a human. What do you need?

#With AgentsKit

import { useChat, ChatContainer, Message, InputBar, ThinkingIndicator } from '@agentskit/react'

function SupportChat() {
  const chat = useChat({
    adapter: myAdapter,
    initialMessages: [{ id: '1', role: 'assistant', content: 'How can I help?', status: 'complete', createdAt: new Date() }],
  })
  return (
    <ChatContainer>
      {chat.messages.map(msg => <Message key={msg.id} message={msg} />)}
      <ThinkingIndicator visible={chat.status === 'streaming'} label="Typing..." />
      <InputBar chat={chat} />
    </ChatContainer>
  )
}

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page