---
title: X
description: Public mentions and DMs on X via the Chat SDK.
type: channel
keywords:
  - chat sdk
  - x
  - twitter
  - mentions
  - dms
---

# X

Channel integration for eve. Public mentions and DMs on X via the Chat SDK.

## Install

Add this Chat SDK channel from eve's registry. This writes `agent/channels/x.ts` and installs Chat SDK and its adapter dependencies:

```bash
eve add channel/chat-sdk-x
```

## Quick start

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 type { Message, Thread } from "chat";
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: Thread, message: Message) => {
  await thread.subscribe();
  await send(message.text, { thread });
});

bot.onSubscribedMessage(async (thread: Thread, message: 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.

[Read the full channel documentation](/docs/channels/chat-sdk)

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)