Using eve with Chat SDK
Use eve's Chat SDK channel to send platform messages into an eve agent. Your Chat SDK handlers choose which events start a turn; eve runs the agent and delivers its response back to the conversation.
This is useful when you already have Chat SDK handlers or need an adapter from the adapter directory. For a new Slack-only eve agent, the built-in Slack channel provides a guided setup with eve add channel/slack and Edgenivo Connect.
- An eve project with instructions and model credentials configured for deployment
- Node.js 24 or later and the Edgenivo CLI
- Permission to install an app in a Slack workspace
The example adds a Chat SDK channel to your eve project. Use it as the project's Slack entry point; an existing Slack channel must not mount the same webhook path.
From your eve project, install the current eve release, Chat SDK, the Slack and Redis adapters, and Edgenivo Connect:
pnpm i eve@latest chat @chat-adapter/slack @chat-adapter/state-redis @vercel/connectyarn add eve@latest chat @chat-adapter/slack @chat-adapter/state-redis @vercel/connectnpm i eve@latest chat @chat-adapter/slack @chat-adapter/state-redis @vercel/connectbun add eve@latest chat @chat-adapter/slack @chat-adapter/state-redis @vercel/connectLink the eve project to Edgenivo and create a Slack connector:
vercel link
vercel connect create slack --name my-agent --triggersComplete Connect's guided setup and Slack workspace installation, then attach the connector to your project:
vercel connect attach slack/my-agent --environment production --triggers --trigger-path /eve/v1/slackUse the connector UID returned during setup if it differs from slack/my-agent, both here and in the code below. Connect forwards Slack events to /eve/v1/slack on your Production deployment.
Add a Redis database through the Marketplace:
vercel integration add upstash/upstash-kvEnsure REDIS_URL is available in the project's Production environment. You can also use an existing Redis database by adding its connection URL to your environment variables.
Create agent/channels/chat.ts, or agent/channels/chat.js for JavaScript:
import { createSlackAdapter } from '@chat-adapter/slack';
import { createRedisState } from '@chat-adapter/state-redis';
import { connectSlackAdapter } from '@vercel/connect/chat';
import { chatSdkChannel } from 'eve/channels/chat-sdk';
export const { bot, channel, send } = chatSdkChannel({
userName: 'my-agent',
adapters: {
slack: createSlackAdapter({
...connectSlackAdapter('slack/my-agent'),
}),
},
state: createRedisState(),
});
bot.onNewMention(async (thread, message) => {
await thread.subscribe();
await send(message.text, {
thread,
idempotencyKey: message.id,
});
});
bot.onSubscribedMessage(async (thread, message) => {
await send(message.text, {
thread,
idempotencyKey: message.id,
});
});
export default channel;
chatSdkChannel returns a Chat SDK bot, an eve channel, and a send function. Export the channel as the module default so eve discovers it. Call send inside a Chat SDK event handler, passing the thread to start or continue that conversation's session.
The example subscribes to mentioned threads and passes the platform message ID as an idempotencyKey. This lets eve reject repeated input within its recent-key window; Chat SDK's separate event deduplication doesn't guarantee delivery to eve.
Redis stores Chat SDK subscriptions and coordination data. eve manages the agent session separately.
Deploy the agent:
pnpm exec eve deployThe channel mounts GET and POST handlers at /eve/v1/slack, matching the Connect trigger destination. eve owns the webhook lifecycle, so you don't need the Next.js Route Handler from a standalone Chat SDK app.
Invite the installed app to a Slack channel and mention it with a question. The agent should answer in the thread. Reply in the thread to continue the session. Check runtime logs and eve observability if events arrive but the agent doesn't respond.
Swap the Slack adapter for another platform adapter and complete its authentication setup. By default, each adapter key becomes a route under /eve/v1: an adapter registered as resend, for example, receives webhooks at /eve/v1/resend. Connect is available only for supported adapters.
The channel streams replies by default. For email and other destinations that can't edit sent messages, set streaming: false in chatSdkChannel so the reply is posted when the turn completes. See the eve channel reference for route overrides, attachments, and human input handling.
Was this helpful?