Development·8 min read

Understanding HiveLang

A deep dive into HiveLang's syntax, concepts, and how to write deterministic agent scripts.

Understanding HiveLang

HiveLang is our proprietary orchestration language. It's designed to give you deterministic control over non-deterministic AI models.

Why not just use Python?

Python is great, but it requires boilerplate for LLM calls, retries, and tool parsing. HiveLang treats LLMs and tools as first-class primitives.

Syntax Basics

Calling Agents

You can invoke an agent synchronously and wait for its result:

ruby
let response = call SupportAgent with { query: "I forgot my password" } say response

Tools and APIs

HiveLang makes calling external APIs trivial.

ruby
try let weather = call WeatherAPI.getCurrent { city: "London" } say "It is currently ${weather.temp} degrees." catch say "I couldn't fetch the weather right now." end

Parallel Execution

Need to do three things at once?

ruby
parallel call Calendar.check call CRM.lookup call Slack.status end

HiveLang handles the concurrency and joins the results automatically. Dive into the /docs for the full language reference!

Quick tip

Use the test pane to iterate quickly. Every change you make is live — no need to save first.

Important

API keys are shown only once. Store them securely and never commit them to version control.

Best practice

Test your bot with edge cases before deployment. Try empty inputs, long messages, and special characters.

Pro tip

Chain multiple specialized bots in a workflow for better results than one general-purpose bot.

Understanding HiveLang