Skip to main content

Production Deployment Guide

A working agent in the playground is not a production agent. This guide covers what it takes to deploy reliably.

Don’t skip this guide. The most common failure mode is deploying a “good enough” agent that breaks in edge cases real users hit within the first hour. Production readiness is a checklist, not a feeling.

The production readiness standard

Your agent is production-ready when:

It handles failures gracefully

When a tool fails, the agent explains what happened and offers a retry path — it doesn’t crash or hallucinate an answer.

Traces are meaningful

Every run produces a trace that tells you what happened, why, and how to fix it if something went wrong.

Memory works end-to-end

A user can come back hours later and the agent remembers the important context from their last session.

Limits are configured

Rate limits, cost caps, and usage limits are set before real users arrive — not after.

Deployment steps

1

Finalize your HiveLang definition

Your bot’s HiveLang file should be in version control. Every deployment should come from a committed file, not a manual edit in the UI.
2

Configure environment variables

Set all required secrets in Settings → Environment Variables. Never hardcode them in HiveLang.
3

Set rate limits

In your bot settings → Usage Limits:
  • Max runs/user/hour — prevent abuse
  • Max runs/day — protect your budget
  • Max tokens/run — cap response length and cost
Start conservative. You can loosen limits after observing real traffic.
4

Deploy to production

Using the dashboard:
  1. Bot → Deploy → Production
  2. Review the parse output for errors or warnings
  3. Confirm deployment
Using the API:
5

Deploy your first channel

Connect one channel and verify it end-to-end with real messages before adding more. Confirm:
  • Message delivery works
  • Session persistence works across 2+ messages
  • Tool calls succeed
  • Traces appear in the Runs tab
6

Set up monitoring

In Settings → Alerting, configure:
  • High error rate alert (>10% failures in 1 hour → notify via Slack or email)
  • Slow latency alert (P95 > 5s)
  • Tool failure spike (same tool fails 3+ times in 10 minutes)

Environment checklist

Before going live, confirm each item:

Rollback strategy

If a production deployment breaks:
1

Identify the issue

Open Runs → filter by status: error → read the trace.
2

Roll back immediately

In Bot → Deployments, click the last stable deployment → Rollback. This takes ~10 seconds.
3

Fix in staging

Use a staging environment to fix the issue. Only redeploy to production when staging is verified.

Common production issues

Increase instruction specificity. Add explicit rules for edge cases you’ve observed in traces. Consider lowering the model temperature.
Production OAuth tokens may have different scopes or may have expired. Re-authenticate each integration in the production environment settings.
Check that you’re passing a stable X-Session-ID header (for API channel) or that the Telegram/Slack user IDs are consistent. Ephemeral memory clears after each session by design.
This is usually cold-start on the integration layer. Add a before input hook that pre-fetches common data to warm up the context before the model runs.

Next reads

Deploy to Channels

Launch Checklist

Observability