Chat SDK lets you build cross-platform bots whose logic stays platform-agnostic. TheDocumentation Index
Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
@veltdev/chat-sdk-adapter
connects a Chat SDK bot to Velt comment threads, so the same bot can run on
Velt, Slack, Discord, and every other Chat SDK adapter.
When a user @-mentions your bot or reacts in a comment thread, Velt sends a
webhook to your app and the bot responds by replying in the thread, following the
conversation, and reacting to events.
How it maps
| Chat SDK | Velt |
|---|---|
| Thread | Comment annotation inside a document |
| Message | Comment |
| Channel | Document |
onNewMention | A comment that @-mentions the bot |
onReaction | A reaction added to / removed from a comment |
thread.post() | A reply added to the comment thread |
Quickstart
Add your environment variables
Create a
.env.local file with your Velt API key, the bot’s auth token, and
the webhook secret. You’ll get the webhook secret in the final step..env.local
VELT_AUTH_TOKEN is optional; if omitted, the adapter generates a bot token
from your API key, scoped to VELT_ORGANIZATION_ID.Create a user database
The
resolveUsers function converts Velt user ids into display names.app/database.ts
Create the bot instance
Create a Chat instance with the Velt adapter and register handlers for
mentions and reactions.
app/bot.ts
The bot is created lazily so importing the module doesn’t require
credentials at build time. Credentials are read on the first webhook
request.
Create the webhook endpoint
The bot processes incoming comments and reactions through this route. It must
run on the Node.js runtime because signature verification needs the raw body
and Node’s On Vercel, use
crypto.app/api/webhooks/velt/route.ts
waitUntil from @vercel/functions instead of after.Set up the Velt webhook
- Expose your endpoint publicly (e.g. with a tunnel during development).
- In the Velt Console → Configurations → Webhook Service, set the
endpoint URL and enable these events:
comment.addcomment_annotation.addcomment.reaction_addcomment.reaction_delete
- Copy your webhook secret (
whsec_...) intoVELT_WEBHOOK_SECRET.
POST /v2/workspace/webhookconfig/update.Now when users @-mention your bot or react to messages in comment threads,
your bot responds automatically.Webhook versions
The adapter supports both Velt webhook systems:- Advanced (v2): verified with Svix-style HMAC-SHA256 using the
whsec_...secret. This is the default. - Basic (v1): verified against the
Authorization: Basic <token>header. SetwebhookVersion: "v1"and pass that token aswebhookSecret.
Reactions
Reading reactions (onReaction) works on all Velt plans.
What to read next
- Live demo: tiptap comments (@-mention Velt Bot)
- Sample apps: AI streaming bot · greeting bot
- Chat SDK documentation
@veltdev/chat-sdk-adapteron npm- Velt Webhooks
- Velt REST API: Comments

