Repository navigation
feat: add a Vercel subproject built on the AI SDK for Python and AI Gateway - #286
Conversation
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
- Add vercel/.vercelignore so npx vercel deploy skips .env and .slack/ - Say the app needs Python 3.12 or later before the venv step - Correct where wait_until_runner.py runs - Drop the direct vercel-blob pin, which vercel already brings in - List vercel in the vendor-bolt commands and note how vercel differs in the root README Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Name the directory after its agent framework, like claude-agent-sdk, openai-agents-sdk and pydantic-ai. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Document running the same HTTP and OAuth entry point on your machine with `npx vercel dev` and ngrok, so the Slack MCP Server can be tried before deploying, like the siblings' OAuth server. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…ence Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
It's only used by the Vercel entry point. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
mwbrooks
left a comment
There was a problem hiding this comment.
Thanks @zimeg, this is a great port and the wait_until runner is a neat trick! One blocking point before it merges: DEBUG logging on the Vercel entry point writes the OAuth token response to the function logs. The other comments are non-blocking.
Co-authored-by: Michael Brooks <21328+mwbrooks@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: Michael Brooks <21328+mwbrooks@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
WilliamBergamin
left a comment
There was a problem hiding this comment.
🧩 Thanks @zimeg! The wait_until runner is a neat fix for lazy listeners on Vercel, and the stores slot in behind the slack_sdk interfaces so tests can swap them.
Left a few comments, nothing blocking. The retry and fallback-token ones may belong in a follow-up across all four apps 🙏
…ents Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
WilliamBergamin
left a comment
There was a problem hiding this comment.
💯 Thanks @zimeg! The team check on the bot token fallback, plus the signed app_mention test through handler, close the two gaps I cared most about.
Everything from the last round is fixed or saved for the cross-app follow-ups, looks good to me 🚀
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…ed Slack skills Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
|
🌟 Thanks for the kind reviews @mwbrooks and @WilliamBergamin! The Vercel starter is going out with both of your catches in it 🚀 |
Summary
This pull request adds a
vercel-ai-sdk/directory: the Starter Agent built on the AI SDK for Python with models through Vercel AI Gateway, which runs locally withslack runand deploys to Vercel over HTTP.claude-agent-sdk/,openai-agents-sdk/andpydantic-ai/: App Home, DMs, channel mentions with one conversation per person in a thread, suggested prompts, the emoji reaction tool, feedback buttons, and the Slack MCP Server once someone installs with OAuth.app.pyruns in Socket Mode forslack run.app_vercel.pybuilds the sameAsyncAppfor HTTP with OAuth and serves it with Bolt's ASGI adapter, andpyproject.tomlnames it in[tool.vercel] entrypoint, since Vercel would otherwise pick upapp.py.app_mentionandmessageare lazy listeners, so Slack gets its acknowledgment right away. On Vercel, a small lazy listener runner inapp_vercel.pyhands each lazy listener towait_untilso the function stays alive until the agent finishes.ai.Agentonanthropic/claude-sonnet-5.5. On Vercel, AI Gateway uses the deployment's OIDC token, so there's no model key to manage. Locally it readsAI_GATEWAY_API_KEY. This app needs Python 3.12 or later, which the AI SDK for Python requires.app_oauth.py.npx vercel devand ngrok in place of the siblings' OAuth server, and "Deploy to Vercel"..vercelignorekeeps a local.envout of deploys. The root README,AGENTS.md, CI matrices and Dependabot now includevercel-ai-sdk.Testing
The following ran on a test Vercel project and a test workspace:
slack create my-starter-agent --template slack-samples/bolt-python-starter-agent --branch vercel-subproject --subdir vercel-ai-sdk, thenruff check,ruff format --checkandpytest(34 tests) in the new project.slack runconnects in Socket Mode and answers a DM in a thread.npx vercel devserves the same entry point locally:/slack/installreturns 200, unsigned requests get 401, and a signed DM event gets a reply in Slack.npx vercel deploy --prod, Slack acceptshttps://<project>.vercel.app/slack/eventsas the request URL when the manifest switchessocket_mode_enabledtofalse, and/slack/installserves the install page.wait_untilrunner, an earlier test deployment acknowledged events but never ran the lazy listener.Still to check by hand, and these need a person in Slack:
@mentionin a channel, and use a suggested prompt in the assistant panel./slack/installon the deployment, install with OAuth, then ask the agent to search Slack so it uses the Slack MCP Server.🤖 Generated with Claude Code