{"slug": "our-self-building-slackbot", "title": "Our Self-Building Slackbot", "summary": "Val Town released a self-building Slackbot powered by Claude and the Vercel AI SDK, enabling the coding agent Townie to read, write, run, and query internal tools via the Val Town MCP in 9 lines of code. The bot, which lives in Val Town's org, can edit its own source code, and the team used it to fix a UI bug, merge a duplicate lead, and self-edit multiple times, prompting a rethink of collaborative workflows.", "body_md": "On Friday, we made a self-building Slackbot. By the end of the day, it had us rethinking how we collaborate.\n\nEarlier that afternoon, my teammate [Potluck](https://potluckmittal.com/) had a\ngood idea, so I jokingly tagged Townie, the coding agent that lives on Val Town.\nOnly, Townie wasn't actually on Slack! We were tantalizingly close though!\n\nHow close? Thanks to our\n[ai-slackbot](https://www.val.town/x/templates/ai-slackbot) template, about\nfive-minutes-close. In a few clicks, the template had me set up with a Claude\nSlackbot, powered by the [Vercel AI SDK](https://ai-sdk.dev/).\n\nBut it still couldn't ship Potluck's feature idea. It needed the ability to read, write, run, and query our internal tools (which live on Val Town).\n\nThanks to the [Val Town MCP](https://docs.val.town/guides/prompting/mcp/), that\ntook 9 lines of code:\n\n``` js\nconst mcpClient = await createMCPClient({\n  transport: {\n    type: \"http\",\n    url: \"https://api.val.town/v3/mcp\",\n    headers: {\n      Authorization: `Bearer ${token}`,\n    },\n  },\n});\n```\n\nAnd thus, a star was born:\n\nHere's the fun part: because \"townie-slackbot\" lives alongside the rest of our internal tools in our Val Town org, it can edit its own source code!\n\nSo the first order of business was a bit of self-brain surgery.\n\nFrom there, things moved pretty quickly. Potluck tagged Townie on a UI bug. I had it merge a duplicate lead. And of course, there were plenty more instances of Townie editing itself. Steve set up an hourly digest to catch the changes as they rolled in. Everyone was working in front of each other, never leaving Slack.\n\n### Multiplayer Vibecoding\n\nNone of these changes were particularly groundbreaking. We ship stuff like this\nall day from Claude Code or Codex (or\n[our phones](https://x.com/CharlieMolthrop/status/2080276492836024787?s=20)!)\nwith the [Val Town Plugin](https://docs.val.town/guides/prompting/plugin). But\nfor the first time, we were showing our work. It felt like the\n[future of collaboration](https://www.youtube.com/watch?v=ClWD8OEYgp8). And it\nwas fun!\n\nWe're all beginning to recognize that point when a Slack thread among humans\nstarts resembling a `plan.md`\n\n. In the old times (a week ago), that meant\nelecting a designated [meat proxy](https://gruhn.me/blog/2026-08-03/) to boot up\nClaude and paste all the context. Now with our new Slackbot, the prototype is\njust a Townie tag away.\n\n### So we're all vibecoding from Slack now??\n\nMaybe not on prod. But vibecoding is pretty great for quick internal tools where\nmaintenance and stability aren't mission critical. Like whipping up a shareable\n[artifact](https://www.val.town/x/templates/team-artifacts) for your team to\nreview. Or spinning up a\n[lead qualifier](https://www.val.town/x/templates/leads) to post to Slack on new\nsignups.\n\nMany of your ideas and planning start in your messaging channels. If lightning strikes in Slack, you might as well bottle it there.\n\nVibecoding from Slack also solves one of the bigger issues with internal tools:\nthey need a tight feedback loop to stay fresh. If the tool is used in Slack and\nis edited directly from Slack, that's about as tight as it gets!\n[The end-user can do a lot more of the \"programming\"](https://en.wikipedia.org/wiki/End-user_development).\nSure, it's important that your more technical teammates are also in that loop.\nBut guess what, they're in Slack too.\n\n### Just one more tool, bro\n\nGot tool fatigue? A Slackbot on steroids might help. Tool-switching is context\nswitching, and it fragments your workflows. Why not double-down on the one tool\nthat ain't goin anywhere? Am I claiming that a Fable Ultracode Slackbot might\njust be one of the four horsemen of the SaaSpocalypse? I'm not *not* saying\nthat...\n\n## Why Val Town?\n\nConfession: I didn't invent the concept of a powerful AI that can do a lot of things... There are many folks trying pitching you a superbot/claw/Claude Tag/pi/Hermes.\n\nSo why should your company's superbot build itself and the rest of your tools on Val Town?\n\n### Instant deploys; We do the hosting\n\nVals (our name for apps) redeploy in 100 milliseconds on any edit. You don't have to worry about hosting it or keeping it alive. We keep your bot instantly deployed at a live url. You focus on the business logic.\n\n### The bot lives where it builds\n\nNo more chasing around different tools. The bot itself is a val. Each tool it builds is a val.\n\n### Features for your whole team\n\nWe've got version control,\n[scoped databases](https://blog.val.town/scoped-databases), and\n[coding harness plugins](https://docs.val.town/guides/prompting/plugin) for your\nengineers. We've got [Townie AI](https://blog.val.town/townie-v5) in the sidebar\nof your vals for when your less technical team members want to learn or make\nchanges.\n\nWe're proud that some of the most cracked engineers we know love Val Town. We're also proud that some of our most enthusiastic users consider themselves non-technical.\n\n### Secure collaboration by default with Val Town Access\n\nAuth is one of the most annoying parts of internal tools. We've taken care of that for you. Like Google Docs, each val has customizable permissions. Easily manage who can see and build what:\n\nVal Town Access is currently in beta.\n[Let me know](https://charlieslackchat.val.run/) if you want early... access.\n\nAnd the last reason your superbot should live on Val Town? We already made it for you:\n\n# Your very own self-building Slackbot.\n\nJust remix [this val](https://www.val.town/x/templates/townie-slackbot) into\nyour Val Town org (create one if you're new), and follow the steps. Here's\nPotluck getting set up with a self-building slackbot in **less than four\nminutes**:\n\nPrefer me to walk you through it? Feel free to\n[grab some time](https://charlieslackchat.val.run/). We can set up a Slack\nconnect and build it together. I won't hang up until your whole team can\nvibecode artifacts from Slack. Deal?\n\nFrom there, you can\n[make your first dashboard](https://cleanshot.com/share/BhSHMYQ4) or\n[edit a shared artifact](https://cleanshot.com/share/MQJMFhGB).\n\nAnd remember, if you want something changed about your bot, well, just tell it!\n\n### Acknowledgements\n\nThank you to Steve, Potluck, and Townie for feedback on this post.\n\n**We're hiring!**\n\nAre you an infra engineer who cares about the joy of programming?", "url": "https://wpnews.pro/news/our-self-building-slackbot", "canonical_source": "https://blog.val.town/slackbot-townie", "published_at": "2026-08-13 14:56:02+00:00", "updated_at": "2026-08-13 15:12:29.502191+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["Val Town", "Townie", "Claude", "Vercel AI SDK", "Potluck", "Steve"], "alternates": {"html": "https://wpnews.pro/news/our-self-building-slackbot", "markdown": "https://wpnews.pro/news/our-self-building-slackbot.md", "text": "https://wpnews.pro/news/our-self-building-slackbot.txt", "jsonld": "https://wpnews.pro/news/our-self-building-slackbot.jsonld"}}