skillfed

lunary

Python SDK for Lunary, the open-source platform where GenAI teams manage and improve LLM chatbots.

lunary v1.4.41 160.4K downloads/30d#10,663 on PyPI
License unclear Active released

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 on this page — 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

lunary on PyPI

pip

pip install lunary

uv

uv add lunary

poetry

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 the current Python release (<4.0.0,>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 10 — aiohttp, chevron, jsonpickle, langchain-community, packaging, pydantic, pyhumps, requests, setuptools, tenacity
Maintenance actively maintained — 128 days since the last release
First released
Downloads 160,369/month — #10,663 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: lunary-1.4.41-py3-none-any.whl

Keywords: Lunary, lunary.ai, Langchain, AI, Analytics, Monitoring, LLM, GenAI, SDK

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

llm monitoring sdkai agent observabilitylangchain monitoringgenai telemetry collectionllm chatbot analyticsai application tracingllm interaction logging
llm-observabilityai-monitoringlangchain-integration

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

langchain

LangChain provides a framework for building…

permissive · top 1,000 on PyPI

langchain-community

Provides third-party integrations for LangChain…

permissive · top 1,000 on PyPI

promptlayer

PromptLayer is a Python SDK for managing,…

permissive · top 15,000 on PyPI

uipath-langchain-client

Provides LangChain-compatible chat models and…

unclear · top 15,000 on PyPI

litellm-enterprise

LiteLLM Enterprise provides a unified Python…

unclear · top 5,000 on PyPI

agentops

AgentOps provides observability and monitoring…

permissive · top 15,000 on PyPI

litellm

LiteLLM provides a unified Python interface to…

permissive · top 100 on PyPI

llama-index-llms-google-genai

Integrates Google's Gemini models into…

permissive · top 15,000 on PyPI

langchain-cli

Command-line interface for building, testing,…

permissive · top 15,000 on PyPI

mlflow-tracing

Instrument GenAI applications with distributed…

permissive · top 1,000 on PyPI