--- id: promptlayer version: "1.5.14" license: Apache-2.0 license_treatment: permissive maintenance: active --- # promptlayer — PromptLayer is a platform for prompt engineering and tracks your LLM requests. License: permissive · Maintenance: active · Downloads: 431.9K/mo ## What it is and what it does PromptLayer is a Python SDK that connects your application to the PromptLayer platform for prompt engineering, versioning, and LLM observability. It provides a client interface to retrieve and manage prompt templates, log LLM requests, and optionally auto-instrument OpenAI, Anthropic, Google GenAI, and AWS Bedrock SDKs with OpenTelemetry tracing. Both sync and async APIs are available. The package acts as a proxy around supported provider SDKs, allowing you to send requests through PromptLayer for logging and monitoring without rewriting your code. It includes utilities for template caching, request annotation, group organization, and skill management. When tracing is enabled, spans are exported to PromptLayer using OpenTelemetry, providing visibility into prompt execution and LLM provider calls across your application. Use it for: - Retrieve and version-control prompt templates from PromptLayer for use in production applications. - Auto-instrument OpenAI or Anthropic SDK calls to log and monitor all LLM requests without modifying provider client code. - Export OpenTelemetry spans from your own functions and LLM provider calls to PromptLayer for centralized tracing and debugging. - Test and evaluate prompt variations using PromptLayer's evals and regression sets via the SDK. - Organize and annotate LLM requests with metadata, scores, and group associations for analysis and monitoring. - Set up coding agents (Cursor, Claude Code) with PromptLayer docs and evaluation skills via the setup command. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PromptLayer is a Python SDK for managing, testing, and monitoring LLM prompts and agent requests with built-in tracing, template retrieval, and provider proxy support. Yes, if you use LLMs in production and want centralized prompt management, request logging, and observability. The SDK is actively maintained, has low install friction, and integrates cleanly with major LLM providers via proxy or OpenTelemetry instrumentation. Requires a PromptLayer account and API key. No known vulnerabilities. ## Install pip install promptlayer uv add promptlayer poetry add promptlayer ## Installing promptlayer Before you install: Low install friction with a pure-Python wheel. Active maintenance with a release 7 days ago and recent commits. Supports Python 3.9 through 3.14. License in practice: Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions. Quickstart: pip install promptlayer from promptlayer import PromptLayer pl = PromptLayer(api_key="pl_xxxxx") prompt = pl.templates.get("support-reply", {"input_variables": {"customer_name": "Ada"}}) print(prompt["prompt_template"]) Requires a PromptLayer API key from https://www.promptlayer.com (set via api_key parameter or PROMPTLAYER_API_KEY environment variable). Verify before relying: - Whether the 13 runtime dependencies (aiohttp, httpx, opentelemetry-*, etc.) are all required for basic usage or only for optional features like tracing. - Performance characteristics when caching is enabled via cache_ttl_seconds parameter. - Detailed behavior of throw_on_error=False when API errors occur. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 431.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llm prompt management and monitoring, prompt template versioning and testing, llm request tracing and logging, ai agent observability sdk, prompt engineering platform integration, opentelemetry llm instrumentation, multi-provider llm proxy, llm-observability, prompt-management, opentelemetry [View on SkillFed](https://skillfed.io/packages/promptlayer) · [View on PyPI](https://pypi.org/project/promptlayer/)