agentleFS
VercelKnown publishervercel/chat/packages/create-chat-sdk/_template/AGENTS.md

chat / _template

AGENTS.md2.4k starsChanged 59 days agoMITView on GitHub

This is a chat bot built with Chat SDK, a unified TypeScript SDK by Vercel for building bots across Slack, Teams, Google Chat, Discord, WhatsApp, and more. Use the Chat SDK skill and other applicable skills while working on this project. The Vercel Plugin provides a broader agent toolkit. It includes the Chat SDK skill alongside specialist agents, agent slash commands, and more: The plugin is optional, the skill alone is enough to build with Chat SDK. When dependencies are…

  • Reads credentials

Trending

Quiet since March.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 4 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the vercel/chat repository that our weekly crawl found: only 5 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the Chat SDK skill and other applicable skills while working on this project.

    line 44
  2. Distinctive:

    When dependencies are installed, inspect the bundled docs before writing code:

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Coding Agent Guidance

This is a chat bot built with Chat SDK, a unified TypeScript SDK by Vercel for building bots across Slack, Teams, Google Chat, Discord, WhatsApp, and more.

Commands

npm run dev      # Start the dev server
npm run build    # Production build
npm run start    # Start production server

Project structure

src/
  lib/bot.ts                            # Bot config — adapters, state, handlers
  app/api/webhooks/[platform]/route.ts  # Webhook route (all platforms)
.env.example                            # Required environment variables
next.config.ts                          # Next.js config (serverExternalPackages if needed)

How it works

  1. Each chat platform sends webhooks to /api/webhooks/{platform} (e.g. /api/webhooks/slack).
  2. The route handler in route.ts delegates to the bot's webhook handler for that platform.
  3. The bot is configured in src/lib/bot.ts with platform adapters, a state adapter, and message handlers.

Key concepts

  • Adapters connect the bot to chat platforms. Each adapter handles webhook verification, message parsing, and platform-specific formatting.
  • State adapter provides persistence for subscriptions and distributed locking (e.g. Redis, PostgreSQL). In-memory state is for development only.
  • Handlers respond to events:
    • onNewMention — bot is @mentioned in a new thread
    • onSubscribedMessage — new message in a thread the bot is subscribed to
    • onNewMessage — messages matching a pattern (e.g. regex, keyword)
    • onReaction — reaction added to a message
    • onSlashCommand — slash command invoked (Slack, Discord)
  • Thread represents a conversation. Use thread.post() to send messages, thread.subscribe() to listen for follow-ups.
  • Cards are rich messages built with JSX (using jsxImportSource: "chat" in tsconfig). Import components from chat/cards.

Agent resources

Use the Chat SDK skill and other applicable skills while working on this project.

The Vercel Plugin provides a broader agent toolkit. It includes the Chat SDK skill alongside specialist agents, agent slash commands, and more:

The plugin is optional, the skill alone is enough to build with Chat SDK.

Docs

When dependencies are installed, inspect the bundled docs before writing code:

node_modules/chat/docs/                    # bundled docs
node_modules/chat/dist/index.d.ts          # core API types
node_modules/chat/dist/adapters/index.d.ts # static adapter catalog types
node_modules/chat/resources/guides/        # framework/platform guides
node_modules/chat/resources/templates.json # starter templates

Start with:

  • node_modules/chat/docs/getting-started.mdx
  • node_modules/chat/docs/usage.mdx
  • node_modules/chat/docs/handling-events.mdx
  • node_modules/chat/docs/platform-adapters.mdx
  • node_modules/chat/docs/state-adapters.mdx

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.