agentskit.js
Examples

Code Assistant

Streaming code with syntax highlighting. AgentsKit's CodeBlock component renders code beautifully as it streams in.

Streaming code with syntax highlighting. AgentsKit's CodeBlock component renders code beautifully as it streams in.

Code Assistant
Starting demo…

With AgentsKit

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

function CodeChat() {
  const chat = useChat({ adapter })
  return (
    <ChatContainer>
      {chat.messages.map(msg => (
        <Message key={msg.id} message={msg}>
          <Markdown content={msg.content} streaming={msg.status === 'streaming'} />
        </Message>
      ))}
      <InputBar chat={chat} placeholder="Ask about code..." />
    </ChatContainer>
  )
}
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page