> 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/10.-integrate-connect-your-stack/framework-dspy.md).

# DSPy

DSPy integration — emit traces from DSPy programs.

{% hint style="warning" %}
**Private preview.** This surface is not yet generally available. Adapters live in the Python SDK today and the rendering / configuration UX is under iteration. Contact <support@layerlens.ai> to request access to the private preview.
{% endhint %}

DSPy programs emit a structured trace per `dspy.Predict` call. Map to Stratix trace via a callback that fires on each compiled program execution.

```python
from layerlens import Stratix
client = Stratix()

# After dspy program runs, capture the trace
client.traces.create(id=run_id, name="dspy-program", inputs={...}, outputs={...}, spans=[...])
```
