Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

feat(docs): add Chat SDK adapter channels for surfaces without a native channel (#672)

Allen Zhoua4c48a94a1d4
diff --git a/.changeset/chat-sdk-adapter-channels.md b/.changeset/chat-sdk-adapter-channels.md
new file mode 100644
index 000000000..997d38e75
--- /dev/null
+++ b/.changeset/chat-sdk-adapter-channels.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+The integrations catalog gains 4 Chat SDK adapter channels for surfaces without a first-class eve channel (Google Chat, WhatsApp, X, and Messenger), each with a `chatSdkChannel` quick start. The `eve channels add` picker is unchanged.
diff --git a/apps/docs/app/[lang]/integrations/[slug]/page.tsx b/apps/docs/app/[lang]/integrations/[slug]/page.tsx
index b525d9348..308225a1d 100644
--- a/apps/docs/app/[lang]/integrations/[slug]/page.tsx
+++ b/apps/docs/app/[lang]/integrations/[slug]/page.tsx
@@ -91,6 +91,11 @@ const IntegrationDetailPage = async ({ params }: PageProps<"/[lang]/integrations
<span className="rounded-full border px-2.5 py-0.5 text-gray-900 text-xs">
{typeLabel[integration.type]}
</span>
+ {integration.badge ? (
+ <span className="rounded-full bg-teal-100 px-2 py-0.5 font-medium text-teal-900 text-xs">
+ {integration.badge}
+ </span>
+ ) : null}
{integration.protocols?.map((protocol) => (
<span
className={`rounded-full px-2 py-0.5 font-medium text-xs ${protocolBadgeClassName[protocol]}`}
diff --git a/apps/docs/app/[lang]/integrations/components/integration-card.tsx b/apps/docs/app/[lang]/integrations/components/integration-card.tsx
index 359cac862..e6318cb3b 100644
--- a/apps/docs/app/[lang]/integrations/components/integration-card.tsx
+++ b/apps/docs/app/[lang]/integrations/components/integration-card.tsx
@@ -24,6 +24,11 @@ export const IntegrationCard = ({ integration }: IntegrationCardProps) => {
<Logo aria-hidden className="size-5" height={20} width={20} />
</span>
<div className="flex items-center gap-1.5">
+ {integration.badge ? (
+ <span className="rounded-full bg-teal-100 px-2 py-0.5 font-medium text-teal-900 text-xs">
+ {integration.badge}
+ </span>
+ ) : null}
{integration.protocols?.map((protocol) => (
<span
className={`rounded-full px-2 py-0.5 font-medium text-xs ${protocolBadgeClassName[protocol]}`}
diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.ts
index 8b5030cdf..963ee4a52 100644
--- a/apps/docs/lib/integrations/data.ts
+++ b/apps/docs/lib/integrations/data.ts
@@ -60,6 +60,8 @@ export interface Integration {
tagline: string;
/** Brand logo key from `lib/integrations/logos`. */
logo: LogoKey;
+ /** Optional pill (e.g. "Chat SDK") shown next to the type label. */
+ badge?: string;
/** Canonical reference doc for deeper details. */
docsHref: string;
/** Searchable keywords beyond the name. */
@@ -80,6 +82,8 @@ interface Presentation {
logo: LogoKey;
docsHref: string;
keywords?: string[];
+ /** Optional gallery pill (e.g. "Chat SDK") shown next to the type label. */
+ badge?: string;
}
/** Channel overlay: presentation plus hand-authored setup markdown. */
@@ -206,24 +210,29 @@ export default telegramChannel({
twilio: {
logo: "twilio",
docsHref: "/docs/channels/twilio",
- keywords: ["sms", "whatsapp", "messaging", "phone"],
+ keywords: ["sms", "voice", "calls", "phone", "transcription"],
install: `Install the framework:
\`\`\`bash
npm install eve@latest
\`\`\``,
- quickStart: `Create \`agent/channels/twilio.ts\`:
+ quickStart: `Create \`agent/channels/twilio.ts\`. \`allowFrom\` is required and gates who can reach the inbound hooks:
\`\`\`ts
// agent/channels/twilio.ts
import { twilioChannel } from "eve/channels/twilio";
export default twilioChannel({
- accountSid: () => process.env.TWILIO_ACCOUNT_SID!,
- authToken: () => process.env.TWILIO_AUTH_TOKEN!,
+ allowFrom: "+15551234567",
+ messaging: { from: "+15557654321" },
});
+\`\`\`
+
+\`\`\`bash
+TWILIO_ACCOUNT_SID=AC... # required for default outbound SMS
+TWILIO_AUTH_TOKEN=... # required for inbound signature verification
\`\`\``,
- configure: `In the Twilio console, point your messaging service or phone number webhook at eve's route (\`/eve/v1/twilio\`). Provide the account SID and auth token via environment variables. See the [Twilio channel docs](/docs/channels/twilio) for SMS vs. WhatsApp specifics.`,
+ configure: `In the Twilio console, point your number's Messaging webhook at \`/eve/v1/twilio/messages\` and its Voice webhook at \`/eve/v1/twilio/voice\`. Inbound calls are answered with speech gathering, and the transcript feeds the same session SMS uses. See the [Twilio channel docs](/docs/channels/twilio) for dispatch, streaming, and voice specifics.`,
},
github: {
logo: "github",
@@ -299,6 +308,170 @@ export default eveChannel();
Point your frontend at the session routes eve serves (\`/eve/v1/session\`) and stream responses with the eve web client.`,
configure: `The eve channel is the lowest-friction way to talk to your agent, with no third-party provisioning required. Layer in auth and route protection as needed. See the [eve channel docs](/docs/channels/eve) and the [Frontend guide](/docs/guides/frontend/overview).`,
},
+ "chat-sdk-gchat": {
+ logo: "googlechat",
+ docsHref: "/docs/channels/chat-sdk",
+ badge: "Chat SDK",
+ keywords: ["chat sdk", "google chat", "spaces", "bot"],
+ install: `Install eve, the Chat SDK core (\`chat\`), the Google Chat adapter, and a state adapter:
+
+\`\`\`bash
+npm install eve@latest chat @chat-adapter/gchat @chat-adapter/state-memory
+\`\`\`
+
+The in-memory state store is fine for local development; use a durable state adapter (Redis, PostgreSQL) in production so thread subscriptions survive restarts.`,
+ quickStart: `Create \`agent/channels/gchat.ts\`. Register Chat SDK handlers on \`bot\`, call \`send\` to hand each turn to eve, and export the channel:
+
+\`\`\`ts
+// agent/channels/gchat.ts
+import { createGoogleChatAdapter } from "@chat-adapter/gchat";
+import { createMemoryState } from "@chat-adapter/state-memory";
+import { chatSdkChannel } from "eve/channels/chat-sdk";
+
+export const { bot, channel, send } = chatSdkChannel({
+ userName: "My Agent",
+ adapters: { gchat: createGoogleChatAdapter() },
+ state: createMemoryState(),
+});
+
+bot.onNewMention(async (thread, message) => {
+ await thread.subscribe();
+ await send(message.text, { thread });
+});
+
+bot.onSubscribedMessage(async (thread, message) => {
+ await send(message.text, { thread });
+});
+
+export default channel;
+\`\`\`
+
+Credentials come from the \`createGoogleChatAdapter\` config or the adapter's environment variables; see the [Google Chat adapter docs](https://chat-sdk.dev/adapters/official/gchat).`,
+ configure: `The adapter mounts its webhook at \`/eve/v1/gchat\`. Point your Google Chat app's HTTP endpoint at it. The adapter owns provider auth, verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. See the [Chat SDK channel docs](/docs/channels/chat-sdk) for routes, streaming, and state options.`,
+ },
+ "chat-sdk-whatsapp": {
+ logo: "whatsapp",
+ docsHref: "/docs/channels/chat-sdk",
+ badge: "Chat SDK",
+ keywords: ["chat sdk", "whatsapp", "business cloud", "messaging"],
+ install: `Install eve, the Chat SDK core (\`chat\`), the WhatsApp adapter, and a state adapter:
+
+\`\`\`bash
+npm install eve@latest chat @chat-adapter/whatsapp @chat-adapter/state-memory
+\`\`\`
+
+The in-memory state store is fine for local development; use a durable state adapter (Redis, PostgreSQL) in production so thread subscriptions survive restarts.`,
+ quickStart: `Create \`agent/channels/whatsapp.ts\`. Register Chat SDK handlers on \`bot\`, call \`send\` to hand each turn to eve, and export the channel:
+
+\`\`\`ts
+// agent/channels/whatsapp.ts
+import { createWhatsAppAdapter } from "@chat-adapter/whatsapp";
+import { createMemoryState } from "@chat-adapter/state-memory";
+import { chatSdkChannel } from "eve/channels/chat-sdk";
+
+export const { bot, channel, send } = chatSdkChannel({
+ userName: "My Agent",
+ adapters: { whatsapp: createWhatsAppAdapter() },
+ state: createMemoryState(),
+});
+
+bot.onNewMention(async (thread, message) => {
+ await thread.subscribe();
+ await send(message.text, { thread });
+});
+
+bot.onSubscribedMessage(async (thread, message) => {
+ await send(message.text, { thread });
+});
+
+export default channel;
+\`\`\`
+
+Credentials come from the \`createWhatsAppAdapter\` config or the adapter's environment variables; see the [WhatsApp adapter docs](https://chat-sdk.dev/adapters/official/whatsapp).`,
+ configure: `The adapter mounts its webhook at \`/eve/v1/whatsapp\`. Point your WhatsApp Business Cloud webhook at it. The adapter owns provider auth, verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. See the [Chat SDK channel docs](/docs/channels/chat-sdk) for routes, streaming, and state options.`,
+ },
+ "chat-sdk-x": {
+ logo: "x",
+ docsHref: "/docs/channels/chat-sdk",
+ badge: "Chat SDK",
+ keywords: ["chat sdk", "x", "twitter", "mentions", "dms"],
+ install: `Install eve, the Chat SDK core (\`chat\`), the X adapter, and a state adapter:
+
+\`\`\`bash
+npm install eve@latest chat @chat-adapter/x @chat-adapter/state-memory
+\`\`\`
+
+The in-memory state store is fine for local development; use a durable state adapter (Redis, PostgreSQL) in production so thread subscriptions survive restarts.`,
+ quickStart: `Create \`agent/channels/x.ts\`. Register Chat SDK handlers on \`bot\`, call \`send\` to hand each turn to eve, and export the channel:
+
+\`\`\`ts
+// agent/channels/x.ts
+import { createXAdapter } from "@chat-adapter/x";
+import { createMemoryState } from "@chat-adapter/state-memory";
+import { chatSdkChannel } from "eve/channels/chat-sdk";
+
+export const { bot, channel, send } = chatSdkChannel({
+ userName: "My Agent",
+ adapters: { x: createXAdapter() },
+ state: createMemoryState(),
+});
+
+bot.onNewMention(async (thread, message) => {
+ await thread.subscribe();
+ await send(message.text, { thread });
+});
+
+bot.onSubscribedMessage(async (thread, message) => {
+ await send(message.text, { thread });
+});
+
+export default channel;
+\`\`\`
+
+Credentials come from the \`createXAdapter\` config or the adapter's environment variables; see the [X adapter docs](https://chat-sdk.dev/adapters/official/x).`,
+ configure: `The adapter mounts its webhook at \`/eve/v1/x\`. Point your X account activity webhook at it. The adapter owns provider auth, verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. See the [Chat SDK channel docs](/docs/channels/chat-sdk) for routes, streaming, and state options.`,
+ },
+ "chat-sdk-messenger": {
+ logo: "messenger",
+ docsHref: "/docs/channels/chat-sdk",
+ badge: "Chat SDK",
+ keywords: ["chat sdk", "messenger", "facebook", "bot"],
+ install: `Install eve, the Chat SDK core (\`chat\`), the Messenger adapter, and a state adapter:
+
+\`\`\`bash
+npm install eve@latest chat @chat-adapter/messenger @chat-adapter/state-memory
+\`\`\`
+
+The in-memory state store is fine for local development; use a durable state adapter (Redis, PostgreSQL) in production so thread subscriptions survive restarts.`,
+ quickStart: `Create \`agent/channels/messenger.ts\`. Register Chat SDK handlers on \`bot\`, call \`send\` to hand each turn to eve, and export the channel:
+
+\`\`\`ts
+// agent/channels/messenger.ts
+import { createMessengerAdapter } from "@chat-adapter/messenger";
+import { createMemoryState } from "@chat-adapter/state-memory";
+import { chatSdkChannel } from "eve/channels/chat-sdk";
+
+export const { bot, channel, send } = chatSdkChannel({
+ userName: "My Agent",
+ adapters: { messenger: createMessengerAdapter() },
+ state: createMemoryState(),
+});
+
+bot.onNewMention(async (thread, message) => {
+ await thread.subscribe();
+ await send(message.text, { thread });
+});
+
+bot.onSubscribedMessage(async (thread, message) => {
+ await send(message.text, { thread });
+});
+
+export default channel;
+\`\`\`
+
+Credentials come from the \`createMessengerAdapter\` config or the adapter's environment variables; see the [Messenger adapter docs](https://chat-sdk.dev/adapters/official/messenger).`,
+ configure: `The adapter mounts its webhook at \`/eve/v1/messenger\`. Point your Messenger webhook at it. The adapter owns provider auth, verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. See the [Chat SDK channel docs](/docs/channels/chat-sdk) for routes, streaming, and state options.`,
+ },
};
/**
@@ -549,6 +722,7 @@ function buildChannel(entry: IntegrationEntry): Integration {
type: "channel",
tagline: entry.tagline,
logo: presentation.logo,
+ badge: presentation.badge,
docsHref: presentation.docsHref,
keywords: presentation.keywords,
install: presentation.install,
diff --git a/apps/docs/lib/integrations/logos.tsx b/apps/docs/lib/integrations/logos.tsx
index 22dcaf454..f597c12b6 100644
--- a/apps/docs/lib/integrations/logos.tsx
+++ b/apps/docs/lib/integrations/logos.tsx
@@ -7,8 +7,10 @@ import {
SiCoda,
SiDatadog,
SiEgnyte,
+ SiGooglechat,
SiHuggingface,
SiMake,
+ SiMessenger,
SiMiro,
SiMixpanel,
SiNetlify,
@@ -25,7 +27,9 @@ import {
SiTicktick,
SiTodoist,
SiWebflow,
+ SiWhatsapp,
SiWix,
+ SiX,
SiZapier,
SiZomato,
} from "@icons-pack/react-simple-icons";
@@ -287,6 +291,14 @@ export const ticketTailorLogo = (props: LogoProps) => (
</svg>
);
+export const googlechatLogo = (props: LogoProps) => <SiGooglechat color="default" {...props} />;
+
+export const whatsappLogo = (props: LogoProps) => <SiWhatsapp color="default" {...props} />;
+
+export const messengerLogo = (props: LogoProps) => <SiMessenger color="default" {...props} />;
+
+export const xLogo = (props: LogoProps) => <SiX {...props} />;
+
export const logos = {
eve: eveLogo,
web: webLogo,
@@ -333,6 +345,11 @@ export const logos = {
wix: wixLogo,
zapier: zapierLogo,
zomato: zomatoLogo,
+
+ googlechat: googlechatLogo,
+ whatsapp: whatsappLogo,
+ messenger: messengerLogo,
+ x: xLogo,
} as const;
export type LogoKey = keyof typeof logos;
diff --git a/packages/eve-catalog/src/index.ts b/packages/eve-catalog/src/index.ts
index 64a92f109..403ed6c03 100644
--- a/packages/eve-catalog/src/index.ts
+++ b/packages/eve-catalog/src/index.ts
@@ -82,7 +82,7 @@ export function connectionProtocols(connection: ConnectionIdentity): ConnectionP
* surface-specific data keyed by {@link IntegrationEntry.slug}.
*
* `surfaces.scaffoldable` reflects what the CLI can scaffold today: Slack and
- * eve Web Chat for channels, and every curated connection. The remaining
+ * Web Chat for channels, and every curated connection. The remaining
* channels are runtime modules that are still configured by hand, so they
* appear in the gallery but not the CLI picker.
*/
@@ -119,7 +119,7 @@ export const INTEGRATIONS: readonly IntegrationEntry[] = [
slug: "twilio",
name: "Twilio",
kind: "channel",
- tagline: "Reach users over SMS and WhatsApp through Twilio.",
+ tagline: "Put your agent on a phone number: SMS and speech-transcribed calls.",
surfaces: { scaffoldable: false, gallery: true },
},
{
@@ -138,11 +138,39 @@ export const INTEGRATIONS: readonly IntegrationEntry[] = [
},
{
slug: "eve",
- name: "eve Web Chat",
+ name: "Web Chat",
kind: "channel",
tagline: "Embed a first-party web chat UI backed by your agent.",
surfaces: { scaffoldable: true, gallery: true },
},
+ {
+ slug: "chat-sdk-gchat",
+ name: "Google Chat",
+ kind: "channel",
+ tagline: "Google Chat spaces and DMs via the Chat SDK.",
+ surfaces: { scaffoldable: false, gallery: true },
+ },
+ {
+ slug: "chat-sdk-whatsapp",
+ name: "WhatsApp",
+ kind: "channel",
+ tagline: "Customer messaging through WhatsApp Business Cloud via the Chat SDK.",
+ surfaces: { scaffoldable: false, gallery: true },
+ },
+ {
+ slug: "chat-sdk-x",
+ name: "X",
+ kind: "channel",
+ tagline: "Public mentions and DMs on X via the Chat SDK.",
+ surfaces: { scaffoldable: false, gallery: true },
+ },
+ {
+ slug: "chat-sdk-messenger",
+ name: "Messenger",
+ kind: "channel",
+ tagline: "Facebook Messenger bots with templates, buttons, and reactions via the Chat SDK.",
+ surfaces: { scaffoldable: false, gallery: true },
+ },
{
slug: "linear",
name: "Linear",