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.
- Go to Settings > Secrets.
- Add your key, e.g.,
STRIPE_API_KEY. - In your script, reference it securely:
rubylet 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.
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.