Skip to main content

AI agent observability SDK supporting 25 trace formats

Project description

ThinkHive Python SDK

OpenTelemetry-based observability SDK for AI agents supporting 25 trace formats including LangSmith, Langfuse, Opik, Braintrust, Datadog, MLflow, and more.

Installation

pip install thinkhive

Quick Start

import thinkhive

# Initialize SDK
thinkhive.init(
    api_key="your-api-key",  # or set THINKHIVE_API_KEY
    service_name="my-ai-agent"
)

# Trace LLM calls
@thinkhive.trace_llm(model_name="gpt-4", provider="openai")
def call_llm(prompt):
    response = openai.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": prompt}]
    )
    return response

# Trace retrieval operations
@thinkhive.trace_retrieval()
def search_documents(query):
    results = vector_db.search(query)
    return results

# Trace tool calls
@thinkhive.trace_tool(tool_name="web_search")
def search_web(query):
    return requests.get(f"https://api.example.com/search?q={query}")

Environment Variables

  • THINKHIVE_API_KEY: Your ThinkHive API key
  • THINKHIVE_AGENT_ID: Your agent ID (alternative to API key)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thinkhive-3.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thinkhive-3.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file thinkhive-3.0.1.tar.gz.

File metadata

  • Download URL: thinkhive-3.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for thinkhive-3.0.1.tar.gz
Algorithm Hash digest
SHA256 bc0acd652ccf999b9aac4089864d9446112f11ce7a880e896b5098cc12b54bda
MD5 fedb0c930922d2ad5ca298217ac27f52
BLAKE2b-256 9f1937852cc585c0e26aed1fb6e072a1f7b8d29927132ffecf67b6a0eab83c22

See more details on using hashes here.

File details

Details for the file thinkhive-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: thinkhive-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for thinkhive-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3a5573ee29e9774962fa5bc79eabfe552d67d3a8e6d8e69cafb01d3ca5f0467
MD5 81443e7df8d75e335e29a03096647b54
BLAKE2b-256 df8892c23c8de218bdf8812708197a92fa8fa41565f9b7919fc885e15c80c1d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page