ThinkHive SDKs
ThinkHive provides official SDKs for the most popular AI development environments. Each SDK offers the same core functionality with language-idiomatic interfaces.
Available SDKs
Feature Comparison
| Feature | JavaScript | Python | MCP Server |
|---|---|---|---|
| LLM Tracing | ✅ | ✅ | ✅ |
| Retrieval Tracing | ✅ | ✅ | ✅ |
| Tool Tracing | ✅ | ✅ | ✅ |
| Auto-instrumentation | ✅ OpenAI, LangChain, Anthropic | ✅ OpenAI, LangChain, LlamaIndex, Anthropic | N/A |
| V3 APIs (Runs, Claims) | ✅ | JS only | ✅ |
| Guardrails | ✅ | ✅ | N/A |
| Business Metrics | ✅ | JS only | N/A |
| ROI Analytics | ✅ | ✅ | ✅ |
| Issues & Fixes | ✅ | JS only | ✅ |
| Human Review | ✅ | JS only | N/A |
| Nondeterminism | ✅ | JS only | N/A |
| Eval Health | ✅ | JS only | N/A |
| Deterministic Graders | ✅ | JS only | N/A |
| Conversation Eval | ✅ | JS only | N/A |
| Transcript Patterns | ✅ | JS only | N/A |
| Quality Metrics | ✅ | ✅ | ✅ |
| API Keys Management | ✅ | JS only | N/A |
| Linking & Customer Context | ✅ | JS only | N/A |
| OpenTelemetry Export | ✅ | ✅ | N/A |
| Explainability Analysis | ✅ | ✅ | ✅ |
| RAG Evaluation | ✅ | ✅ | ✅ |
| Hallucination Detection | ✅ | ✅ | ✅ |
Quick Start
JavaScript/TypeScript
import { init, traceLLM } from '@thinkhive/sdk';
init({ serviceName: 'my-agent' });
const response = await traceLLM({
name: 'chat-completion',
modelName: 'gpt-4',
provider: 'openai',
}, async () => {
return await openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello!' }],
});
});Python
import thinkhive
thinkhive.init(service_name="my-agent")
@thinkhive.trace_llm(model_name="gpt-4", provider="openai")
def chat(message: str) -> str:
response = openai.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": message}],
)
return response.choices[0].message.contentMCP Server (Claude Code)
Add to your Claude Code settings:
{
"mcpServers": {
"thinkhive": {
"command": "npx",
"args": ["@thinkhive/mcp-explainer"],
"env": {
"THINKHIVE_API_KEY": "thk_your_key"
}
}
}
}Environment Variables
All SDKs support these environment variables:
| Variable | Description | Required |
|---|---|---|
THINKHIVE_API_KEY | Your API key | Yes |
THINKHIVE_ENDPOINT | Custom API endpoint | No |
THINKHIVE_SERVICE_NAME | Service identifier | No |
THINKHIVE_AGENT_ID | Agent identifier | No |
Direct API Access
If you need to integrate with a language we don’t have an SDK for, you can use our REST API directly:
curl -X POST https://app.thinkhive.ai/api/traces \
-H "Authorization: Bearer thk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"spans": [{
"name": "my-llm-call",
"type": "llm",
"input": "Hello!",
"output": "Hi there!",
"model": "gpt-4"
}]
}'See the API Reference for complete documentation.
Getting Help
Need help with integration? Check the specific SDK documentation or reach out to support@thinkhive.ai.