--- id: langwatch version: "1.2.0" license: MIT license_treatment: permissive maintenance: active --- # langwatch — LangWatch Python SDK, for monitoring your LLMs License: permissive · Maintenance: active · Downloads: 332.9K/mo ## What it is and what it does LangWatch is an observability SDK that integrates with Python LLM applications to capture and export traces of LLM interactions. It uses OpenTelemetry as its instrumentation foundation and provides decorators (@langwatch.trace() and @langwatch.span()) to mark entry points and individual operations within your LLM pipeline. The SDK automatically captures function inputs, outputs, and metadata, then sends this telemetry to the LangWatch cloud platform for monitoring and analysis. The package includes built-in instrumentors for popular frameworks—OpenAI, LangChain, Haystack, and CrewAI—allowing automatic capture of LLM calls without manual span creation. You can also manually create spans for custom operations like RAG retrieval or database queries. Traces can be grouped by thread_id for conversation tracking and by user_id for user analytics. The SDK is designed to integrate into existing OpenTelemetry setups or work standalone with minimal configuration. Use it for: - Monitor OpenAI, LangChain, or Haystack LLM calls in production to track latency, errors, and token usage. - Group related LLM operations into conversations using thread_id for multi-turn dialogue analysis. - Capture RAG retrieval steps and other custom pipeline stages as nested spans within a single trace. - Track user interactions and analytics by attaching user_id metadata to traces. - Debug LLM application behavior by exporting detailed traces to the LangWatch dashboard. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. LangWatch is a Python SDK for instrumenting and monitoring LLM applications, capturing traces and spans of LLM interactions to send to the LangWatch observability platform. Yes, if you are building or operating a Python LLM application and want observability into LLM interactions. The SDK is actively maintained, has low install friction, uses a permissive MIT license, and integrates cleanly with popular frameworks. Install only if you have a LangWatch account and API key; the SDK is designed specifically for the LangWatch platform and will not be useful without it. ## Install pip install langwatch uv add langwatch poetry add langwatch ## Installing langwatch Before you install: Low friction install with a pure-Python wheel. Active maintenance (released 7 days ago). Depends on 21 runtime packages including OpenTelemetry, Pydantic, and framework-specific instrumentors for Haystack, LangChain, OpenAI, and CrewAI. License in practice: MIT license (permissive). You can use, modify, and distribute this package with minimal restrictions in commercial and open-source projects. Quickstart: pip install langwatch import langwatch langwatch.setup() # Uses LANGWATCH_API_KEY env var @langwatch.trace() async def my_llm_operation(): # Your LLM code here pass Requires Python 3.10 or later. Requires a LangWatch API key (set via LANGWATCH_API_KEY environment variable or passed to setup()). Verify before relying: - Whether the package automatically instruments all major LLM frameworks or requires explicit setup per framework. - Performance overhead of tracing on typical LLM application throughput. - Data retention and privacy guarantees for traces sent to LangWatch servers. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 332.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llm monitoring sdk, trace instrumentation python, opentelemetry llm observability, langchain openai tracing, application performance monitoring llm, span capture framework, llm pipeline observability, llm-observability, opentelemetry, instrumentation [View on SkillFed](https://skillfed.io/packages/langwatch) · [View on PyPI](https://pypi.org/project/langwatch/)