> 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/security-best-practices/security/data-privacy.md).

# Data Privacy

This guide covers data privacy considerations when using the LayerLens Stratix SDK.

## Data Sent to the API

When using the SDK, the following data is transmitted to LayerLens servers:

* **API key** - Used for authentication (sent in request headers)
* **Trace data** - Contents of trace files you upload via `client.traces.upload()`
* **Evaluation parameters** - Model and benchmark selections, judge configurations
* **Judge definitions** - Evaluation goals and settings for custom judges

## Data Storage

* Uploaded traces are stored in your organization's project scope and are not shared across organizations
* Evaluation results are associated with your organization and project
* API keys are never logged or stored in SDK-side logs

## Sensitive Data in Traces

If your traces contain sensitive information (PII, credentials, proprietary data), consider:

1. **Sanitize before upload** - Remove or redact sensitive fields from trace files before uploading
2. **Use test data** - Use synthetic or anonymized data for development and testing
3. **Review trace contents** - Inspect trace files before upload to ensure no secrets are included

## Logging

The SDK uses Python's standard `logging` module. Sensitive headers (API keys, authorization tokens) are automatically redacted in log output.

```python
import logging

# Enable SDK logging (API keys will be redacted)
logging.basicConfig(level=logging.DEBUG)
```

## Local Data

The SDK does not write any data to disk. All operations are performed in-memory and transmitted directly to the API. Trace files are read from disk for upload but are not modified or cached.

## Environment Variable Security

Store API keys in environment variables rather than in source code:

```bash
export LAYERLENS_STRATIX_API_KEY="your-api-key"
```

See [API Key Management](/stratix-python-sdk/security-best-practices/security/api-key-management.md) and [Environment Variables](/stratix-python-sdk/security-best-practices/security/environment-variables.md) for detailed guidance.


---

# 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/security-best-practices/security/data-privacy.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.
