Repository navigation
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>
- Add vercel/README.md from the claude-agent-sdk README with AI Gateway setup and a Deploy to Vercel section - Point the App Home MCP link at vercel/README.md - List vercel in the root README, AGENTS.md, CI matrices, Dependabot and the vendor-bolt commands 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>
…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>
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This also logs at info level on the vercel entry point and names the bot token fallback in place of comments. Co-authored-by: Michael Brooks <21328+mwbrooks@users.noreply.github.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: Michael Brooks <21328+mwbrooks@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: Claude <svc-devxp-claude@slack-corp.com>
…ed Slack skills 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>
…ck CLI Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
mwbrooks
left a comment
There was a problem hiding this comment.
Thanks @zimeg, this lines up really closely with the starter agent and the siblings, and the deploy testing in the description is great to see! I will approve once the hand checks in the Testing section are done, since the issue modal flow on Vercel is the one new path here.
| ), | ||
| # Allow bot-posted messages (e.g. issue modal submissions with metadata) | ||
| # to reach the message handler instead of being silently dropped | ||
| ignoring_self_events_enabled=False, |
There was a problem hiding this comment.
question (blocking): Has the App Home issue modal had a run on the Vercel deployment yet? This is the one change from the starter agent's app_vercel.py, and with the OAuth install it is still open in the checklist, so I'd like to see both work before approving.
There was a problem hiding this comment.
🧪 Not yet! The deploy runs this branch's head (6d5c182) now. The signed DM events earlier went through the Vercel handler, but they didn't cover the modal or the OAuth install, and both need a person in Slack. They're next, and I'll follow up here with the results.
Co-authored-by: Michael Brooks <21328+mwbrooks@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
cchensh
left a comment
There was a problem hiding this comment.
Checked at 6d5c182.
- Matches the starter: the Vercel infra is byte-identical to bolt-python-starter-agent's
vercel-ai-sdk/(app_vercel.pydiffers only byignoring_self_events_enabled=False), and 6d5c182 brings the pins up to the starter and siblings. - Matches
claude-agent-sdk: Casey's behavior matches, including the lazy listeners and MCP only with a user token. - Security: Blob keys can't cross teams or users, the
SLACK_BOT_TOKENfallback refuses other teams, and OAuth state is single-use with a TTL. - Lazy runner:
wait_untilgets a scheduled task, with one ack per event.
Should-fix
- The starter's ExceptionGroup unwrap (bolt-python-starter-agent#321) isn't ported.
agent/casey.pycallsai.Agent(...).runandai.mcp.get_http_toolsdirectly, andai==0.10.0runs them in anasyncio.TaskGroup. An expired MCP user token or an AI Gateway error therefore reachesapp_mentioned.py:92/message.py:115as:warning: Something went wrong! (unhandled errors in a TaskGroup (1 sub-exception))instead of the real error. Suggest porting_run/_only_errorand the starter'stests/test_agent.py.
Nit
skills-lock.jsonrecordsref: v1.9.0/5efa92bfrom the starter, while the siblings pin766e933. The vendored skills are identical.
WilliamBergamin
left a comment
There was a problem hiding this comment.
🪞 Thanks @zimeg! Reusing the starter's reviewed Vercel layer and keeping the listeners in lockstep with the siblings makes this big diff easy to trust.
One blocking comment on how agent errors reach the user, the other is optional 🙏
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-authored-by: Cheng Chen <35309699+cchensh@users.noreply.github.com>
|
🔧 @cchensh the TaskGroup unwrap is ported in a1901db, with the starter's error tests. The |
WilliamBergamin
left a comment
There was a problem hiding this comment.
Thanks for porting this so quickly! 🙏 The unwrap now matches the starter agent's, and against an unreachable MCP URL I see ConnectError: All connection attempts failed instead of the TaskGroup message. The two new tests in tests/test_agent.py would fail without the fix, and they pass for me locally along with the rest of the suite, ruff check and ruff format --check. I left one small note inline.
The blocking concerns are resolved; see the latest review.
Summary
This pull request adds a
vercel-ai-sdk/directory: Casey 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 with the issue categories and modal, DMs, channel mentions with one conversation per person in a thread, suggested prompts, the five IT tools, emoji reactions, marking an issue resolved, 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. Like the siblings, it setsignoring_self_events_enabled=Falseso the issue the bot posts from the modal reaches the message listener.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.SLACK_BOT_TOKENonly for that token's own team.vercel-ai-sdk/from slack-samples/bolt-python-starter-agent#286, including its review fixes. Thedevextra lists its test pins itself, sopip install -e ".[dev]"works afterslack createrenames the project.vercel dev", which runs the same entry point withnpx 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-casey-agent --template slack-samples/bolt-python-support-agent --branch vercel-subproject --subdir vercel-ai-sdk, thenpip install -e ".[dev]",ruff check,ruff format --checkandpytest(42 tests) in the new project.npx vercel deploy --prodfrom that project,/slack/installreturns 200, an unsigned event gets 401, and project files like/app_vercel.pyand/.envreturn 404.https://<project>.vercel.app/slack/eventsas the request URL, and signed DM events to the deployment got a reaction, a system status answer through AI Gateway with feedback buttons, and a follow-up that remembered the thread. The cold-start acknowledgment took 2.1 seconds.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 Casey to search Slack so it uses the Slack MCP Server.🤖 Generated with Claude Code