> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/2.-get-started/sdk.md).

# SDK

Stratix Python SDK quickstart — install, authenticate, run an evaluation in code.

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="/2.-get-started/install.md">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="/2.-get-started/first-eval-via-sdk.md">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="/2.-get-started/samples-overview.md">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="/2.-get-started/samples-overview.md">Browse</a></td></tr><tr><td><strong>Claude CoWork</strong></td><td>Trace multi-agent CoWork sessions and compare runs.</td><td><a href="/2.-get-started/samples-overview.md">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="/2.-get-started/samples-overview.md">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="/2.-get-started/samples-overview.md">Browse</a></td></tr><tr><td><strong>LangChain / LlamaIndex / Haystack / DSPy</strong></td><td>Framework-native instrumentation samples.</td><td><a href="/2.-get-started/samples-overview.md">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/`
