构建团队机器人最佳实践
Best practices for building team Bots
导读
Eric Zakariasson 分享了其在 SpaceXSI 打造并持续维护最受欢迎团队机器人(用于为用户开通账号与订阅)的经验,总结出构建团队机器人的最佳实践。该机器人服务 GTM、招聘、工程与产品、支持等多个团队,其做法包括把原有 API 包装为 MCP、为机器人创建 onboarding 与行为风格技能、以模拟用户方式自测,并建立支持频道形成反馈闭环。Zakariasson 强调,优秀的团队机器人无法一次成型,应先发布小版本、亲自试用并尽早建立反馈循环。
正在把原文翻译成中文,长文需要一两分钟;先显示原文。
# Best practices for building team Bots
I wanted to jot down some findings I’ve made after creating what became and still is the most popular team bot at SpaceXSI. To give some context, it’s an internal bot for provisioning accounts and subscriptions to users, and has users across
- GTM for setting up prospects with trial accounts
- Recruiters for interviewees on site that need accounts for their work trial
- Engineering & Product for provisioning test accounts
- Support to give credits as a way of saying “thank you and we’re sorry”
Initially, it was just a web interface that required you to sign in, input email addresses, and then click a button. It all worked fine and dandy, but it was hard to put this step in a pipeline and make it part of a workflow. It’s also quite unnatural since most work by these groups is done in Grok Bot these days, and switching tools just caused friction. Step 1 below is mainly for whoever owns the underlying tool or API, while steps 2 through 5 apply to anyone building and shaping a team bot.
## 1. Turn your API into an MCP
The old tool was built as a standard web app backed by an API. That meant we could easily turn it into an MCP (also called an App in Grok Bot, a standard way for bots to connect to your tools and data) by wrapping the API. We could rely on existing sign-in and permissions, so not a lot of heavy lifting needed to be done to stand this up.
If you don’t want to wire this up from scratch, you can hand your API to Tinkabot, a Bot template built to turn APIs into MCP servers and skills. Point it at your endpoints and it will scaffold a working setup, test it locally, and package it as a plugin you can share with your team.
Once the MCP is up, don’t count on the bot to remember all the rules. Build guardrails into the MCP itself, with hard constraints like per-user limits, allowed domains, and approval flows for risky actions, so a tool simply can’t do the wrong thing. When a call hits one of those limits, give the bot proactive feedback on why it failed and what to do next instead of returning a bare error. It also helps to return useful state with each result. When the bot sets up an account, for example, the response also says how many accounts the user has left, so the bot doesn’t need a second call to find out.
Then log every action the bot takes, including who asked, what it called, and what happened, and give the bot access to those logs. That way it can see how it’s performing, notice where it fails, and debug itself when someone asks “did the account get created?”
## 2. Have some onboarding
Even if you’re building an internal Bot, every user will still have a first interaction, and you want that to be as good as possible to save your own time downstream. A good onboarding means less handholding for you, higher trust in the bot and its capabilities, and a happier user.
Ask your bot to create an /onboarding skill, where you say what you want in plain words. In this case, it was something like “Greet the user, explain your capabilities briefly with bullets, and then ask them to connect {your MCP}”
## 3. Behavior & style as skills
Next up is defining the behavior of your bot, and making it self-aware. What can it do, how should it do things, are there any conditionals to its tools that it should know of? For example, if a lookup doesn’t find a user, it should ask if they made a typo.
Like a lot of LLMs, they like to produce a lot of words when answering human questions. I’m personally fond of short, bulleted replies, and I’ve therefore told my bots to answer just like this. It all goes into a skill!
The nice thing with bots is that you can just ask it to do this, and it’ll update the right skills itself. We’ll see more about how we can leverage this later.
## 4. Dogfood by simulating being a user
Once your onboarding and skills are set up, test them before handing the bot to real users. Ask the bot to “Simulate a new onboarding and walk me through what a new user sees” to check the first-run flow, and when you make changes or iterate, ask it to “simulate a conversation and all edge cases”. You can run both over and over until replies look like what you want a real user to see.
As I was building this out and dogfooding it myself, I caught both auth and connection edge cases and plenty of gaps in my own bot and MCP server, like tools failing silently without explaining why or missing simple read-only lookups. Lesson is, always always always dogfood your products. Be kind to your users and don’t let them find these low hanging fruits first, do it yourself (or automate it with a bot)!
What didn’t work was trying to one-shot everything. Simulation gets you far, but you won’t really know until you ship it to users.
## 5. Set up a support channel (and flywheel)
Make it easy for your users to help themselves! One of the highest-leverage things I did was to set up a Slack channel for this bot, and redirect all questions about it there. The bot has a routine (an automated trigger) that looks at each message going into this channel, and tries to answer it using a /help skill I created based on the most common questions I’ve gotten so far. As more and more people started using this, we also got more questions. When the bot can’t answer, it pings me and I can chime in. But it doesn’t scale…
So we set up another routine that every day looks through the questions and answers, and proposes updates to its /help skill based on what solved the problem for the user. For example, early on people kept posting connection errors like “this site can’t be reached” when trying to authorize the internal MCP server, and I had to jump in to tell them it was a VPN or local network issue. Once that got folded into the /help skill, the bot learned to check first whether the service is up, skip generic sign-in loops, and route those users straight to IT help instead. Next time someone hit the same error, the bot diagnosed it right in the thread without me stepping in.
Those updates can be everything from starting a Cloud Agent (a background coding agent) for deep root cause analysis, to just saying “We don’t support this”. The bot also has access to other internal tools, like Databot (our analytics bot), so it can do deeper investigation if someone asks “did the account get created?” or “why is this user not seeing anything?”
This serves as the best source of input for collecting feedback, issues, and updating its own knowledge base.
## tldr
- Make your existing APIs compatible with Bots via MCP (or hand them to Tinkabot)
- Create onboarding for users
- Store behavior and style as skills
- Dogfood by simulating being a user
- Stand up a support channel for your users
If there’s one takeaway, it’s that you can’t one-shot a great team bot. Ship something small, dogfood, and build the feedback loop early!
出处
- A 权威X @ericzakariasson · RSS阅读原文 ↗
Best practices for building team Bots