Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ BRAINTRUST_API_KEY=<YOUR_API_KEY> braintrust eval tutorial_eval.py
| [Strands](py/src/braintrust/integrations/strands/) | Yes | `strands-agents>=1.20.0` |
| [Agno](py/src/braintrust/integrations/agno/) | Yes | `agno>=2.1.0` |
| [AgentScope](py/src/braintrust/integrations/agentscope/) | Yes | `agentscope>=1.0.0` |
| [Temporal](py/src/braintrust/integrations/temporal/) | Yes | `temporalio>=1.19.0` |
| [pytest plugin](py/src/braintrust/wrappers/pytest_plugin/README.md) | No | `pytest>=8` |

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion py/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def test_mistral(session, version):
def test_temporal(session, version):
_install_test_deps(session)
_install_matrix_dep(session, "temporalio", version)
_run_tests(session, "braintrust/contrib/temporal")
_run_tests(session, f"{INTEGRATION_DIR}/temporal")


PYTEST_VERSIONS = _get_matrix_versions("pytest-matrix")
Expand Down
2 changes: 2 additions & 0 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ otel = [
performance = [
"orjson; platform_python_implementation != 'PyPy'",
]
# Deprecated: Temporal is now available via braintrust.auto_instrument();
# keep this extra as a compatibility alias until a future major release.
temporal = [
"temporalio>=1.19.0; python_version>='3.10'",
]
Expand Down
5 changes: 5 additions & 0 deletions py/src/braintrust/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
OpenRouterIntegration,
PydanticAIIntegration,
StrandsIntegration,
TemporalIntegration,
)
from braintrust.integrations.base import BaseIntegration

Expand Down Expand Up @@ -68,6 +69,7 @@ def auto_instrument(
autogen: bool = True,
crewai: bool = True,
strands: bool = True,
temporal: bool = True,
) -> dict[str, bool]:
"""
Auto-instrument supported AI/ML libraries for Braintrust tracing.
Expand Down Expand Up @@ -98,6 +100,7 @@ def auto_instrument(
autogen: Enable AutoGen instrumentation (default: True)
crewai: Enable CrewAI instrumentation (default: True)
strands: Enable Strands Agents instrumentation (default: True)
temporal: Enable Temporal instrumentation (default: True)

Returns:
Dict mapping integration name to whether it was successfully instrumented.
Expand Down Expand Up @@ -183,6 +186,8 @@ def auto_instrument(
results["crewai"] = _instrument_integration(CrewAIIntegration)
if strands:
results["strands"] = _instrument_integration(StrandsIntegration)
if temporal:
results["temporal"] = _instrument_integration(TemporalIntegration)

return results

Expand Down
Loading