agentskit.js
Examples

Tool Use

AI assistants that call functions — weather, search, DB queries. Tool calls render as expandable cards.

AI assistants that call functions — weather lookups, web search, database queries. AgentsKit renders tool calls with expandable cards showing arguments and results.

I can browse a product catalog. Ask about an item and I'll call the right tool.

#With AgentsKit

The ToolCallView component handles everything:

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

function Chat() {
  const chat = useChat({ adapter })
  return (
    <ChatContainer>
      {chat.messages.map(msg => (
        <div key={msg.id}>
          <Message message={msg} />
          {msg.toolCalls?.map(tc => (
            <ToolCallView key={tc.id} toolCall={tc} />
          ))}
        </div>
      ))}
    </ChatContainer>
  )
}

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page