Vercel AI SDK, Cursor and Composio: Telegram agent setup

Build a Telegram agent with Gmail tools, Supermemory and Vercel Cron. Learn local development, account linking and deployment.

Player not loading? Watch on YouTube

Shawn Esquivel builds a Telegram AI agent from the Vercel AI SDK chatbot template, using Cursor to implement features and review generated code. The course takes inspiration from OpenClaw, but the demonstrated app uses hosted services and deploys to Vercel. Its local development server still connects to those services.

Setup covers cloning the template, pulling environment variables with the Vercel CLI, adding database credentials and running migrations. Neon supplies Postgres, Upstash supplies Redis, and Vercel Blob handles uploads. The app selects models through Vercel AI Gateway; Claude Sonnet 4.6 appears in the opening demo.

Composio provides tool discovery and OAuth connections. The instructor demonstrates fetching Gmail messages and creating a reply draft, with tool access restricted to signed-in users. Supermemory stores user facts across conversations, while a separate database field holds the agent's personality prompt. Telegram links to the same user identity so it can reuse web connections and memories. During development, ngrok exposes the local server through an HTTPS webhook.

The final section adds scheduled workflows with Vercel Cron and tests an email summary manually. The speaker notes a once-daily scheduling limit on the Hobby plan. Deployment includes changing the Telegram webhook to the production domain and redeploying after environment variable updates.

Composio funded the course with a grant. The instructor works in Composio developer relations and is a Cursor ambassador; the description includes plan discounts and a Cursor referral link.