Writing HiveLang in the Hive IDE
The visual builders are great, but sometimes you want to write the bot yourself. The Hive IDE (under Developer) is a code-first editor for HiveLang.
Why use it
- Full control over a bot's
instructions,capabilities, and logic. - Use language features the form builders don't surface —
parallel,retry/fallback,remember/recall,delegate. - Copy/paste and version your bot definitions as plain text.
A complete bot
hivelangbot SupportTriage { instructions { Triage incoming support messages. Classify urgency and draft a reply. } capabilities { ai.generate knowledge.search } on user.message { call knowledge.search with { query: input } as context call ai.generate with { prompt: "Using this context: " + context + "\nDraft a helpful reply to: " + input } as reply respond with reply } }
Handy patterns
- Resilience: wrap a flaky call in
retry … with backoff exponential max attempts 3 fallback { … }. - Speed: run independent calls inside
parallel { … }. - State:
remember "key" as valueandrecall "key" as v default fallbackto persist across turns.
Run & iterate
Run the bot right in the IDE, read the output, and refine. When it's right, save — it joins your bot list like any other, ready to deploy or drop into a workflow.
Learn the language
See Understanding HiveLang and the HiveLang docs for the full reference.
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.