Registry / llm-agents / openlayer

openlayer

JSON →
library0.29.1pypypi✓ verified 84d ago

The official Python SDK for the Openlayer API. Provides tools to monitor, debug, and improve AI models with tracing, observability, and data management. Current version: 0.24.0. Release cadence: weekly to multiple times per week.

pip install openlayer
INSTALL
IMPORT
SIG · OPENLAYER
O
openlayer
llm-agentspythonv0.29.1
Install
14.3s avg
Import
975ms
Disk
349MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.29.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.988s · 362.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 14.3s · import 0.962s · 331MB
349MB installed
● package 349MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Openlayer
from openlayer import Openlayer
import openlayer
Openlayer is the main client class, not a module.
Trace
from openlayer import Trace

Initialize the client and create a trace.

from openlayer import Openlayer client = Openlayer(api_key=os.environ.get('OPENLAYER_API_KEY', '')) # Example: create a trace trace = client.traces.create( project_id='your-project-id', model_id='your-model-id', input='What is the capital of France?', output='Paris' ) print(trace.id)
openlayer --version
Debug
Known issues
breakingIn v0.20.0, client initialization changed: the `api_key` parameter is now required (previously optional). Code that relied on environment variable auto-detection without passing it explicitly may break.
fix
Always pass api_key=os.environ.get('OPENLAYER_API_KEY') explicitly.
affects: >=0.20.0
deprecatedThe `openlayer.traces.create` method signature changed in v0.19.0: `project_id` and `model_id` became mandatory keyword-only arguments. Passing them as positional arguments will raise TypeError.
fix
Use named arguments: client.traces.create(project_id='...', model_id='...').
affects: >=0.19.0 <0.19.0? Actually, breaking change introduced at 0.19.0.
gotchaPydantic 2.10+ compatibility fix in v0.20.1: if you use Pydantic v2.10+ without updating openlayer, you may see AttributeError regarding 'by_alias'. Upgrade openlayer to >=0.20.1.
fix
Run: pip install 'openlayer>=0.20.1'
affects: <=0.20.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'openlayer'
The package is not installed, or installed in a different environment.
fix
Run: pip install openlayer
TypeError: create() missing 2 required positional arguments: 'project_id' and 'model_id'
Using old positional argument style with new SDK version (>=0.19.0).
fix
Use: client.traces.create(project_id='...', model_id='...')
openlayer.OpenlayerError: Authentication failed. Invalid API key.
Missing or incorrect API key. The OPENLAYER_API_KEY environment variable is not set, or the key is wrong.
fix
Set OPENLAYER_API_KEY in your environment or pass api_key explicitly.
Upgrade
Version history
0.29.1latest on PyPI · released Jun 5, 2026
Audit
Dependencies
pydanticrequiredUsed for data validation; must be >=2.10 for compatibility (handling by_alias=None).
typing-extensionsrequiredMinimum version required for type hints.
Agent activity
27 hits · last 30 days
node
22
OpenAI (training)
2
Amazon
1
Resources
openlayer — pip install openlayer · libregistry