--- id: lunary version: "1.4.41" license: unclear license_treatment: unclear maintenance: active --- # lunary — Python SDK for Lunary, the open-source platform where GenAI teams manage and improve LLM chatbots. License: unclear · Maintenance: active · Downloads: 160.4K/mo ## What it is and what it does Lunary is a monitoring and analytics SDK for Python applications built around large language models and AI agents. It acts as middleware that intercepts calls to LLM providers and custom agent frameworks, capturing interaction data and sending it to the Lunary platform for analysis and debugging. The SDK is designed to work with any LLM model and supports both standard and streaming interactions. The package integrates into existing code through a simple monitor() call on a client object, after which it transparently logs all subsequent LLM interactions. It depends on common libraries like aiohttp, requests, pydantic, and langchain-community, making it straightforward to add to projects already using those tools. The SDK requires Python 3.10 or later and a Lunary account to send data to. Use it for: - Monitor and debug LLM application behavior by capturing all model calls and responses in a centralized dashboard. - Track performance metrics and usage patterns across multiple LLM providers in a single interface. - Integrate observability into langchain-community-based agents to log and analyze multi-step reasoning. - Collect analytics on AI chatbot interactions to identify failure modes and improve prompt engineering. - Stream LLM responses while simultaneously logging them for later analysis and audit trails. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Lunary is a Python SDK that monitors and logs interactions with LLM models and custom agents, integrating with langchain-community and other libraries to capture and send telemetry to the Lunary platform. Yes, if you are building production AI applications and need centralized monitoring of LLM interactions. The low install friction, active maintenance, and support for multiple LLM providers make it a practical choice. However, resolve the unclear license status before use in commercial or compliance-sensitive contexts, and verify that the data-collection model aligns with your privacy and security requirements. ## Install pip install lunary uv add lunary poetry add lunary ## Installing lunary Before you install: Low install friction with a pure-Python wheel and stable maintenance status. The package has 10 runtime dependencies including widely-used libraries like aiohttp, requests, and pydantic, all of which are standard in the Python ecosystem. License in practice: License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Before adopting this in a commercial or copyleft-sensitive project, verify the actual license terms directly with the project repository. Quickstart: pip install lunary import lunary lunary.monitor(client) # Subsequent LLM calls are now monitored and logged Requires Python 3.10 or later and a Lunary project ID obtained by registering at lunary.ai. Verify before relying: - Which LLM providers are supported beyond those shown in the description excerpt. - What data is sent to Lunary's servers and whether it includes prompt/response content or only metadata. - Performance overhead of monitoring on production LLM calls, especially with streaming. - Whether the package works equally with all supported providers or has known limitations. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 160.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llm monitoring sdk, ai agent observability, langchain monitoring, genai telemetry collection, llm chatbot analytics, ai application tracing, llm interaction logging, llm-observability, ai-monitoring, langchain-integration [View on SkillFed](https://skillfed.io/packages/lunary) · [View on PyPI](https://pypi.org/project/lunary/)