Build Your First Bot
A bot is a single autonomous agent: it takes a message, reasons, optionally calls tools, and responds. Here's how to build one that searches the web and summarizes the result.
Option A — Describe it to HiveMind
The fastest path. Open HiveMind and type what you want:
"Build a research bot. When someone gives it a topic, it searches the web and replies with a short summary."
HiveMind writes the bot for you and opens it in the builder. Tweak the wording, then save. Skip to Test it.
Option B — Write it in HiveLang
Go to Bots → New Bot and define the bot. In HiveLang v5, a bot declares its instructions, the capabilities (tools) it may use, and what to do on user.message:
hivelangbot Researcher { instructions { A helpful assistant that researches topics online. Search for the requested topic, then summarize what you find. } capabilities { web.search ai.generate } on user.message { call web.search with { query: input } as results call ai.generate with { prompt: "Summarize these search results: " + results } as summary respond with summary } }
What each part does:
- instructions — the bot's persona and standing orders.
- capabilities — the tools it's allowed to use (here, web search and the built-in model).
- on user.message — the entry point. The incoming message is
input. - call … with { } as — invoke a tool and store its result.
- respond with — reply to the caller.
<a id="test-it"></a>Test it
Use the test/chat pane to send the bot a message — e.g. a topic to research — and watch it search, reason, and reply. If a tool needs a connection you haven't set up (like a specific search provider), the builder tells you which integration to connect.
Save & reuse
Save the bot. It now has an ID you'll use to call it from your app, drop it into a workflow as a Bot node, or publish it.
Next steps
- Connect a bot to your app — call it from your own product.
- Understanding HiveLang — the full language.
- Building Your First Swarm — multiple bots as a team.
Use the test pane to iterate quickly. Every change you make is live — no need to save first.
API keys are shown only once. Store them securely and never commit them to version control.
Test your bot with edge cases before deployment. Try empty inputs, long messages, and special characters.
Chain multiple specialized bots in a workflow for better results than one general-purpose bot.