# SDK

The `layerlens` PyPI package (v1.3.0) is the Python client SDK for Stratix. Install, set an API key, and you can do everything the Premium UI does — programmatically.

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>1. Install</strong></td><td>One pip command, three minutes.</td><td><a href="/pages/7fT17sglAgAHyPvSQ6Bi">Start</a></td></tr><tr><td><strong>2. First evaluation via SDK</strong></td><td>Run a benchmark evaluation from Python.</td><td><a href="/pages/VuGsPSSqiCN4lf4OAOGe">Start</a></td></tr></tbody></table>

## Why use the SDK

* **Automate.** CI/CD gates, scheduled trace evaluations, batch jobs.
* **Integrate.** Wire Stratix into your existing data pipeline.
* **Share recipes.** Sample programs across every major AI agent surface — copy, paste, ship.

## Samples for the AI agent ecosystem

Stratix ships first-class samples for the platforms your team is most likely already on:

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>MCP Server</strong></td><td>Evaluate Model Context Protocol servers and tool-use trajectories.</td><td><a href="/pages/Jh9oENPsTfHF9ocXi5bY">Browse</a></td></tr><tr><td><strong>Claude Code Skills</strong></td><td>Score Claude Code skill invocations, deltas, and policy gates.</td><td><a href="/pages/Jh9oENPsTfHF9ocXi5bY">Browse</a></td></tr><tr><td><strong>Claude CoWork</strong></td><td>Trace multi-agent CoWork sessions and compare runs.</td><td><a href="/pages/Jh9oENPsTfHF9ocXi5bY">Browse</a></td></tr><tr><td><strong>CopilotKit</strong></td><td>Wire CopilotKit-powered agents into Stratix traces, judges, and CI gates.</td><td><a href="/pages/Jh9oENPsTfHF9ocXi5bY">Browse</a></td></tr><tr><td><strong>OpenAI Agents SDK</strong></td><td>End-to-end coverage for the OpenAI Agents pattern.</td><td><a href="/pages/Jh9oENPsTfHF9ocXi5bY">Browse</a></td></tr><tr><td><strong>LangChain / LlamaIndex / Haystack / DSPy</strong></td><td>Framework-native instrumentation samples.</td><td><a href="/pages/Jh9oENPsTfHF9ocXi5bY">Browse</a></td></tr></tbody></table>

## What's the SDK shape

```python
from layerlens import Stratix

client = Stratix() # picks up LAYERLENS_STRATIX_API_KEY from env

# 11 resource handlers
client.models # public model catalog
client.benchmarks # public benchmark catalog
client.evaluations # private evaluations
client.scorers # code graders
client.judges # LLM judges
client.judge_optimizations # GEPA runs
client.traces # trace ingest + browse
client.trace_evaluations # score traces
client.results # result browsing
client.public # public-only convenience namespace
client.errors # exception types
```

Every method has a sync and an async form. `client.evaluations.create(...)` and `client.evaluations.acreate(...)`.

## Where to next

* [Install](/2.-get-started/install.md)
* [First evaluation via SDK](/2.-get-started/first-eval-via-sdk.md)
* [Python SDK reference](/6.-build-wire-your-code/sdk-python.md)
* [Samples overview](/2.-get-started/samples-overview.md) — MCP, Claude Code Skills, CoWork, CopilotKit, OpenAI Agents, and framework-native examples
* [Cookbook](/2.-get-started/all-cookbook-recipes.md) — recipes ported from `stratix-python/samples/`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.layerlens.ai/2.-get-started/sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
