GuidesDeployment

Deployment Guide

Deploy ThinkHive to production environments.

Prerequisites

  • ThinkHive account with API key
  • Node.js 18+ or Python 3.8+
  • Your AI application

Environment Setup

THINKHIVE_API_KEY=thk_your_production_key
THINKHIVE_ENDPOINT=https://app.thinkhive.ai
THINKHIVE_SERVICE_NAME=my-agent-prod

Deployment Checklist

Verify SDK version

npm list @thinkhive/sdk
# or
pip show thinkhive

Configure environment variables

Securely store your API key using your platform’s secrets management.

Initialize SDK early

// In your app entry point
import { init } from '@thinkhive/sdk';
 
init({
  serviceName: process.env.THINKHIVE_SERVICE_NAME,
  // API key from environment
});

Add graceful shutdown

process.on('SIGTERM', async () => {
  await shutdown();
  process.exit(0);
});

Test tracing

Deploy and verify traces appear in dashboard.

Platform Guides

Vercel

vercel.json
{
  "env": {
    "THINKHIVE_API_KEY": "@thinkhive-api-key"
  }
}

AWS Lambda

serverless.yml
provider:
  environment:
    THINKHIVE_API_KEY: ${ssm:/thinkhive/api-key}

Docker

ENV THINKHIVE_API_KEY=${THINKHIVE_API_KEY}

Monitoring

Best Practice: Use separate API keys for each environment to isolate data and simplify debugging.

Next Steps