> For the complete documentation index, see [llms.txt](https://layerlens.gitbook.io/stratix-python-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://layerlens.gitbook.io/stratix-python-sdk/code-examples/examples.md).

# Overview

This section provides practical code examples for common SDK use cases. All examples are available as runnable scripts in the [`samples/`](https://github.com/LayerLens/stratix-python/blob/release/samples/README.md) directory.

## Quick Reference

| Sample                                                                                                                                 | Description                                                            |
| -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [`benchmark_evaluation.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/benchmark_evaluation.py)             | Run a model against a benchmark, wait for completion, retrieve results |
| [`quickstart.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/quickstart.py)                                 | Minimal end-to-end trace evaluation                                    |
| [`async_workflow.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/async_workflow.py)                         | Full async evaluation workflow with concurrent operations              |
| [`async_results.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/async_results.py)                           | Fetch results for multiple evaluations concurrently                    |
| [`model_benchmark_management.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/model_benchmark_management.py) | Filter models by name/company/region, add/remove from project          |
| [`evaluation_filtering.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/evaluation_filtering.py)             | Sort and filter evaluations by status, accuracy, date                  |
| [`compare_evaluations.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/compare_evaluations.py)               | Compare two models on a benchmark with outcome filtering               |
| [`paginated_results.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/paginated_results.py)                   | Paginate through results or fetch all at once                          |
| [`custom_model.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/custom_model.py)                             | Register a custom model with an OpenAI-compatible API                  |
| [`custom_benchmark.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/custom_benchmark.py)                     | Create custom and smart benchmarks from data files                     |
| [`create_judge.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/create_judge.py)                             | Create, list, update, and delete judges                                |
| [`basic_trace.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/basic_trace.py)                               | Upload, list, get, and delete traces                                   |
| [`trace_evaluation.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/trace_evaluation.py)                     | Run judges on traces, estimate cost, get results with steps            |
| [`judge_optimization.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/judge_optimization.py)                 | Estimate, run, and apply judge optimizations                           |
| [`public_catalog.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/public_catalog.py)                         | Browse public models, benchmarks, evaluations, and prompts             |
| [`integration_management.py`](https://github.com/LayerLens/stratix-python/blob/release/samples/core/integration_management.py)         | List, inspect, and test configured integrations                        |

## Guides

* [Creating Evaluations](/stratix-python-sdk/code-examples/examples/creating-evaluations.md) -- Sync, async, and parallel evaluations
* [Retrieving Results](/stratix-python-sdk/code-examples/examples/retrieving-results.md) -- Paginated, bulk, and concurrent result fetching
* [Models and Benchmarks](/stratix-python-sdk/code-examples/examples/models-and-benchmarks.md) -- Filtering, custom models, custom/smart benchmarks, project management
* [Judges and Traces](/stratix-python-sdk/code-examples/examples/judges-and-traces.md) -- Judge CRUD, trace uploads, trace evaluations, and optimizations
* [Public API](/stratix-python-sdk/code-examples/examples/public-api.md) -- Public models, benchmarks, evaluations, and comparisons

For the complete samples catalog including industry solutions, OpenClaw agent evaluation, CI/CD integration, and more, see the [Samples Guide](/stratix-python-sdk/samples-and-tutorials/samples-guide.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://layerlens.gitbook.io/stratix-python-sdk/code-examples/examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
