DevOps·6 min read

Deploying Bots to Production

Best practices for deploying bots, managing secrets, and monitoring performance.

Deploying Bots to Production

Building a bot in the playground is easy. Deploying it securely to thousands of users requires best practices.

1. Environment Variables (Secrets)

Never hardcode API keys in your prompts or HiveLang scripts. Use the Bothive Secrets Manager.

  1. Go to Settings > Secrets.
  2. Add your key, e.g., STRIPE_API_KEY.
  3. In your script, reference it securely:
ruby
let payment = call Stripe { key: secret.STRIPE_API_KEY }

2. Setting Confidence Thresholds

In production, you want to avoid "hallucinations" leading to bad actions. Use the Confidence Threshold feature. If the agent's confidence drops below 85%, route the request to a human queue.

3. Analytics and Monitoring

Bothive provides a built-in Heatmap in the Dashboard.

  • Monitor your bot's Cost per Run.
  • Track the Success Rate of specific tools.
  • Look out for anomalies in latency. If your Database Agent is taking 10 seconds, it's time to add an index!

Follow these steps, and your bots will be robust enough for enterprise scale.

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.

Deploying Bots to Production