npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kl-adapter-vercel-ai

v0.1.3

Published

Vercel AI Chat SDK adapter for kanban-lite – pre-built tool definitions, REST client, and streaming comment support

Readme

kl-adapter-vercel-ai

Vercel AI Chat SDK adapter for kanban-lite — pre-built tool definitions, a configurable REST client, and streaming comment support.

Drop a single createKanbanTools() call into your streamText() / generateText() route and get full kanban-lite integration: cards CRUD, comments (including streaming), labels, actions, forms, columns, and board info.

Install

npm install kl-adapter-vercel-ai ai zod

ai and zod are required peer dependencies (you likely already have them if you use the Vercel AI SDK).

Quick start

import { streamText } from 'ai'
import { openai } from '@ai-sdk/openai'
import { createKanbanTools } from 'kl-adapter-vercel-ai'

const tools = createKanbanTools({
  baseUrl: 'http://localhost:3000',
  boardId: 'default',
  apiToken: process.env.KANBAN_API_TOKEN,
})

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

  const result = streamText({
    model: openai('gpt-4o-mini'),
    system: 'You are a helpful assistant that manages a kanban board.',
    messages,
    tools,
    maxSteps: 8,
  })

  return result.toDataStreamResponse()
}

Tools included

| Tool | Description | | --- | --- | | create_card | Create a new kanban card with title, description, priority, assignee, labels, actions, and form templates | | list_cards | List cards, optionally filtered by status column | | get_card | Inspect a card with full details, comments, forms, actions, and labels | | update_card | Update priority, assignee, labels, or due date on an existing card | | move_card | Move a card to a different status column | | delete_card | Soft-delete a card | | add_comment | Add a markdown comment to a card | | stream_comment | Stream a comment to a card (viewers see it arrive incrementally via WebSocket) | | list_comments | List all comments on a card | | submit_card_form | Submit structured data to an attached card form | | trigger_card_action | Trigger a named card action webhook | | get_board | Get board configuration, columns, and actions | | list_columns | List the status columns on a board |

API

createKanbanTools(config?, options?)

Returns a record of Vercel AI SDK tool() definitions.

Config (KanbanClientConfig):

| Property | Type | Default | Description | | --- | --- | --- | --- | | baseUrl | string | 'http://localhost:3000' | Base URL of the kanban-lite server | | boardId | string | 'default' | Board ID to operate on | | apiToken | string | — | Optional Bearer token for auth |

Options (KanbanToolsOptions):

| Property | Type | Default | Description | | --- | --- | --- | --- | | listLimit | number | 50 | Max cards returned by list_cards | | commentLimit | number | 20 | Max recent comments in get_card | | defaultAuthor | string | 'kanban-chat-agent' | Fallback author for comments |

KanbanClient

A standalone REST client class for the kanban-lite API that can be used independently from the tool definitions:

import { KanbanClient } from 'kl-adapter-vercel-ai'

const client = new KanbanClient({
  baseUrl: 'http://localhost:3000',
  boardId: 'default',
})

const cards = await client.listCards('in-progress')
const card = await client.getCard('1-my-card')
await client.addComment('1-my-card', 'bot', 'Analysis complete.')
await client.streamComment('1-my-card', 'bot', 'Streaming this content live...')
await client.moveCard('1-my-card', 'done')

You can also pass a KanbanClient instance directly to createKanbanTools():

const client = new KanbanClient({ baseUrl: 'http://localhost:3000' })
const tools = createKanbanTools(client, { listLimit: 20 })

Streaming comments

The stream_comment tool uses the POST /api/tasks/:id/comments/stream endpoint. Connected WebSocket viewers see the comment arrive incrementally with a live blinking-cursor indicator. This is ideal for AI agent outputs that should be visible in real-time.

Build output

dist/index.cjs   ← require() entry
dist/index.d.ts  ← TypeScript declarations

Development

# From the repository root
pnpm --filter kl-adapter-vercel-ai build
pnpm --filter kl-adapter-vercel-ai test

# Or from this package directory
npm install
npm run build
npm test

License

MIT