Skip to content
Open
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
14 changes: 7 additions & 7 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"packages/client": "0.1.3",
"packages/client": "0.2.0",
"packages/ai": "0.1.3",
"packages/claude-agents": "0.1.4",
"packages/claude-messages": "0.1.4",
"packages/openai-agents": "0.1.4",
"packages/openai-messages": "0.1.4",
"packages/langchain-agents": "0.1.4",
"packages/langchain-messages": "0.1.4"
"packages/claude-agents": "0.2.0",
"packages/claude-messages": "0.2.0",
"packages/openai-agents": "0.2.0",
"packages/openai-messages": "0.2.0",
"packages/langchain-agents": "0.2.0",
"packages/langchain-messages": "0.2.0"
}
29 changes: 29 additions & 0 deletions packages/claude-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [0.2.0](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-claude-agents-0.1.4...launchdarkly-ai-claude-agents-0.2.0) (2026-08-14)


### ⚠ BREAKING CHANGES

* **claude-agents:** stop an empty tool list switching off the built-ins
* **claude-agents:** the span this handler emits is renamed from `claude.query` and `claude.query.stream` to `invoke_agent`. Queries selecting on the old names will not match. Prompt and completion content is no longer on spans unless the caller passes capture_content=True.

### Features

* **claude-agents:** emit invoke_agent, chat and execute_tool spans ([7831c81](https://github.com/launchdarkly/python-ai-sdk/commit/7831c8129bdeedb6440685a55a40280daf63b35d))


### Bug Fixes

* **claude-agents:** an abandoned stream is not an error for its tool spans ([10b8158](https://github.com/launchdarkly/python-ai-sdk/commit/10b81583650ae5356045cfa444313d8adde79bb5))
* **claude-agents:** an empty run must not claim it cost nothing ([85c73ff](https://github.com/launchdarkly/python-ai-sdk/commit/85c73ffb9cb0af85304f38d93e3a896855f2c61a))
* **claude-agents:** keep a tool span trackable when its content will not serialise ([0738606](https://github.com/launchdarkly/python-ai-sdk/commit/07386063f5e8157b44819fbadb2ebbd882ed859b))
* **claude-agents:** keep the spans of a cancelled run ([b7dddfa](https://github.com/launchdarkly/python-ai-sdk/commit/b7dddfac2099fafed29870790cd48f48f96d10b1))
* **claude-agents:** put the input content write inside the guard too ([f0160c2](https://github.com/launchdarkly/python-ai-sdk/commit/f0160c29f11b6b8965c07f209e09463414bca48a))
* **claude-agents:** report a cancelled stream as cancelled, not abandoned ([d4f1b6f](https://github.com/launchdarkly/python-ai-sdk/commit/d4f1b6f76bf703e2bbfd24d4cfc007de0f9be4ba))
* **claude-agents:** stop an empty tool list switching off the built-ins ([50e82fd](https://github.com/launchdarkly/python-ai-sdk/commit/50e82fd8903aa4fbd9c83697fa48f4ddb8c05d8d))


### Documentation

* describe the span tree the SDK now emits ([bc7815a](https://github.com/launchdarkly/python-ai-sdk/commit/bc7815a61e46c96df9cd786b20bfceb7d8b13334))
* describe the span tree the SDK now emits ([#37](https://github.com/launchdarkly/python-ai-sdk/issues/37)) ([6a82ef5](https://github.com/launchdarkly/python-ai-sdk/commit/6a82ef5d1fdbae2b1228f9325d960979bcf50881))

## [0.1.4](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-claude-agents-0.1.3...launchdarkly-ai-claude-agents-0.1.4) (2026-08-07)


Expand Down
2 changes: 1 addition & 1 deletion packages/claude-agents/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "launchdarkly-ai-claude-agents"
version = "0.1.4"
version = "0.2.0"
requires-python = ">=3.12"
dependencies = [
"launchdarkly-ai-server",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""LaunchDarkly AI SDK - integration for Claude agents."""

__version__ = "0.1.4" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version

from . import native_graph # noqa: F401
from .builtins import (
Expand Down
32 changes: 32 additions & 0 deletions packages/claude-messages/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## [0.2.0](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-claude-messages-0.1.4...launchdarkly-ai-claude-messages-0.2.0) (2026-08-14)


### ⚠ BREAKING CHANGES

* **claude-messages:** the span this handler emits is renamed from `claude.messages` and `claude.messages.stream` to `invoke_agent`. Queries that select on the old names will not match. Prompt and completion content is no longer on spans unless the caller passes capture_content=True.

### Features

* **claude-messages:** emit invoke_agent, chat and execute_tool spans ([d4b5b6e](https://github.com/launchdarkly/python-ai-sdk/commit/d4b5b6eccb4714fd78384d78d8c1647c356d4c9c))


### Bug Fixes

* **claude-messages:** close the tool span a cancelled tool leaves open ([4f23cf4](https://github.com/launchdarkly/python-ai-sdk/commit/4f23cf439c449f33e13fce6b78681233f85f9ba2))
* **claude-messages:** do not invent the cache figures Anthropic did not send ([db417b1](https://github.com/launchdarkly/python-ai-sdk/commit/db417b1ce2d47aef4ffa10f0bf2ac4056e2d008a))
* **claude-messages:** fail the streaming chat span instead of abandoning it ([2f0e565](https://github.com/launchdarkly/python-ai-sdk/commit/2f0e565230c5130f0dc6206c634284ad146a74b3))
* **claude-messages:** forward capture_content from the convenience wrapper ([b7531d3](https://github.com/launchdarkly/python-ai-sdk/commit/b7531d39ff3a60337c8a3552c34b9428bdfed573))
* **claude-messages:** guard the streaming chat span's input write ([6e358dd](https://github.com/launchdarkly/python-ai-sdk/commit/6e358ddf7e5ac134737a590655ff6663063c7201))
* **claude-messages:** keep every blocking chat-span write inside the guard ([21fb591](https://github.com/launchdarkly/python-ai-sdk/commit/21fb5918ee0508dd1dbc658c9fb212723e64ca81))
* **claude-messages:** keep the spans of a cancelled run ([bb2e52f](https://github.com/launchdarkly/python-ai-sdk/commit/bb2e52f13f96d40d080ce51cf4025189bb83d3ac))
* **claude-messages:** keep the streaming turn's billed tokens on a content failure ([1933374](https://github.com/launchdarkly/python-ai-sdk/commit/19333749371fd10551a76b2bae19f7aa1e4b6ccb))
* **claude-messages:** put the input content write inside the guard too ([4aaa497](https://github.com/launchdarkly/python-ai-sdk/commit/4aaa497250db5c19c25ade189298418050347eae))
* **claude-messages:** record a tool result inside the guard that ends its span ([19d932e](https://github.com/launchdarkly/python-ai-sdk/commit/19d932ebffeb23e2059a407b35a7acd9688a27a1))
* **claude-messages:** report a cancelled stream as cancelled, not abandoned ([2d3379a](https://github.com/launchdarkly/python-ai-sdk/commit/2d3379ab2085b0dce53bda4a9f729bd50918b47d))


### Documentation

* describe the span tree the SDK now emits ([bc7815a](https://github.com/launchdarkly/python-ai-sdk/commit/bc7815a61e46c96df9cd786b20bfceb7d8b13334))
* describe the span tree the SDK now emits ([#37](https://github.com/launchdarkly/python-ai-sdk/issues/37)) ([6a82ef5](https://github.com/launchdarkly/python-ai-sdk/commit/6a82ef5d1fdbae2b1228f9325d960979bcf50881))

## [0.1.4](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-claude-messages-0.1.3...launchdarkly-ai-claude-messages-0.1.4) (2026-08-07)


Expand Down
2 changes: 1 addition & 1 deletion packages/claude-messages/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "launchdarkly-ai-claude-messages"
version = "0.1.4"
version = "0.2.0"
requires-python = ">=3.12"
dependencies = [
"launchdarkly-ai-server",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""LaunchDarkly AI SDK - integration for Claude messages."""

__version__ = "0.1.4" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version

from .handler import claude_messages, create_claude_messages_handler

Expand Down
31 changes: 31 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## [0.2.0](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-server-0.1.3...launchdarkly-ai-server-0.2.0) (2026-08-14)


### ⚠ BREAKING CHANGES

* **client:** once the handlers move onto this layer, prompt and completion content will be absent from spans unless the caller passes capture_content=True. Anyone reading gen_ai.prompt.0.content today will need to opt in.

### Features

* **client:** cache-aware token accounting and a reusable span lifecycle ([f54ef59](https://github.com/launchdarkly/python-ai-sdk/commit/f54ef596c8d5c8dea5bdb555af49538e9da7b0cd))
* **client:** end spans a cancelled run would otherwise strand ([dff27f6](https://github.com/launchdarkly/python-ai-sdk/commit/dff27f60915f6ea6fb24e0351c9eb5faec83ff27))
* **client:** put conversation content on spans behind an opt-in flag ([2bb8310](https://github.com/launchdarkly/python-ai-sdk/commit/2bb8310bad322ebf9915c2214b8e7ca367d5878b))
* **client:** tell a cancelled stream apart from an abandoned one ([14ed066](https://github.com/launchdarkly/python-ai-sdk/commit/14ed0668708bac31f110451cdf25d748e4076063))


### Bug Fixes

* **client:** a tool that returned nothing does not return null ([eb61eb2](https://github.com/launchdarkly/python-ai-sdk/commit/eb61eb2000d51fb8dd523eab6f7cfbaeafb1db99))
* **client:** carry the cache breakdown into the public UsageDict ([c60fa7c](https://github.com/launchdarkly/python-ai-sdk/commit/c60fa7c6ade65542cbbbaefd440eca13e56088a4))
* **client:** guard the fourth content writer, and assert the family rule ([d637b95](https://github.com/launchdarkly/python-ai-sdk/commit/d637b955290f0c9c671af62774018a8cb343e454))
* **client:** keep the plain text a LangChain message holds in a list ([c11adca](https://github.com/launchdarkly/python-ai-sdk/commit/c11adca31cfe9a165441dca992496b10ab28a501))
* **client:** make end_span_once a no-op on a None span ([a1772c1](https://github.com/launchdarkly/python-ai-sdk/commit/a1772c1a59c4f45e322d9805986ad494c2ef5bcc))
* **client:** read a LangChain ChatMessage's own speaker ([d56103a](https://github.com/launchdarkly/python-ai-sdk/commit/d56103a615b7d6e4c93004209d257e3fe5771fa0))
* **client:** read a LangChain message's role from the field, not only the method ([641f8e1](https://github.com/launchdarkly/python-ai-sdk/commit/641f8e194cfaf705e38cdd8820f4f9d90f8e1110))
* **client:** stop the content carriers disagreeing, and stop them crashing ([b32d3fc](https://github.com/launchdarkly/python-ai-sdk/commit/b32d3fc7116abd35e9db090668962365c21fd932))


### Documentation

* describe the span tree the SDK now emits ([#37](https://github.com/launchdarkly/python-ai-sdk/issues/37)) ([6a82ef5](https://github.com/launchdarkly/python-ai-sdk/commit/6a82ef5d1fdbae2b1228f9325d960979bcf50881))

## [0.1.3](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-server-0.1.2...launchdarkly-ai-server-0.1.3) (2026-08-07)


Expand Down
2 changes: 1 addition & 1 deletion packages/client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "launchdarkly-ai-server"
version = "0.1.3"
version = "0.2.0"
requires-python = ">=3.12"
dependencies = ["opentelemetry-api>=1.25"]
description = "LaunchDarkly AI SDK core client for Python"
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/launchdarkly_ai_server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""LaunchDarkly AI SDK - core client for Python."""

__version__ = "0.1.3" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version

from .client import ConfigInstance, config
from .content import (
Expand Down
33 changes: 33 additions & 0 deletions packages/langchain-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## [0.2.0](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-langchain-agents-0.1.4...launchdarkly-ai-langchain-agents-0.2.0) (2026-08-14)


### ⚠ BREAKING CHANGES

* **langchain-agents:** the span this handler emits is renamed from `langchain.agent` and `langchain.agent.stream` to `invoke_agent`. Queries selecting on the old names will not match. Prompt and completion content is no longer on spans unless the caller passes capture_content=True. gen_ai.system changes value; see below.

### Features

* **langchain-agents:** emit invoke_agent, chat and execute_tool spans ([7683c9d](https://github.com/launchdarkly/python-ai-sdk/commit/7683c9df9cae4f9f4a7f2a5cdb0b3af07d322721))


### Bug Fixes

* **langchain-agents:** a callback that raises must not leave a span unreachable ([2169a05](https://github.com/launchdarkly/python-ai-sdk/commit/2169a05147511bc72e0f1ab81fa9f6fbeb65ad2a))
* **langchain-agents:** a reported zero token count is not a missing one ([0d5e38c](https://github.com/launchdarkly/python-ai-sdk/commit/0d5e38c1d4ed44dbca0e2729d72314e6e4483647))
* **langchain-agents:** an abandoned stream marks its open spans, it does not fail them ([d087d73](https://github.com/launchdarkly/python-ai-sdk/commit/d087d737382b6dd3660aa0a32ff36bb5a5be57f5))
* **langchain-agents:** forward capture_content from the convenience wrapper ([06b210d](https://github.com/launchdarkly/python-ai-sdk/commit/06b210d0bab68e72b2734ea07c2a980af8b8c5e8))
* **langchain-agents:** keep a turn's billed tokens when its content write fails ([485db67](https://github.com/launchdarkly/python-ai-sdk/commit/485db678ed9769a2f9750f0e2736040e15167218))
* **langchain-agents:** keep the spans of a cancelled run ([ff53cc6](https://github.com/launchdarkly/python-ai-sdk/commit/ff53cc6d22c103ca524734839e7470ee5c6ee874))
* **langchain-agents:** make a successful run's total agree with its own spans ([6333808](https://github.com/launchdarkly/python-ai-sdk/commit/6333808dea92c312643deceef2cabbf0a18d1c45))
* **langchain-agents:** put the input content write inside the guard too ([0fa4ed1](https://github.com/launchdarkly/python-ai-sdk/commit/0fa4ed1c1a827315aa7f554cfea9279afde5d27c))
* **langchain-agents:** record the root completion the way the chat span does ([1f4242b](https://github.com/launchdarkly/python-ai-sdk/commit/1f4242bf6baed11349466f4bce7df30e997d6558))
* **langchain-agents:** report a cancelled stream as cancelled, not abandoned ([010a9ca](https://github.com/launchdarkly/python-ai-sdk/commit/010a9ca3f760b9cd8ed708a4e8be3e4a5142a7e5))
* **langchain-agents:** total the streaming root from the callbacks when the messages report nothing ([6ff5a94](https://github.com/launchdarkly/python-ai-sdk/commit/6ff5a94586b889d205794abda60d44a646b5967f))
* **langchain-agents:** track the chat span before writing content that can raise ([883da7b](https://github.com/launchdarkly/python-ai-sdk/commit/883da7b6ba09faf279a06d9e5d047b4cc8ec83a4))


### Documentation

* describe the span tree the SDK now emits ([bc7815a](https://github.com/launchdarkly/python-ai-sdk/commit/bc7815a61e46c96df9cd786b20bfceb7d8b13334))
* describe the span tree the SDK now emits ([#37](https://github.com/launchdarkly/python-ai-sdk/issues/37)) ([6a82ef5](https://github.com/launchdarkly/python-ai-sdk/commit/6a82ef5d1fdbae2b1228f9325d960979bcf50881))

## [0.1.4](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-langchain-agents-0.1.3...launchdarkly-ai-langchain-agents-0.1.4) (2026-08-07)


Expand Down
2 changes: 1 addition & 1 deletion packages/langchain-agents/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "launchdarkly-ai-langchain-agents"
version = "0.1.4"
version = "0.2.0"
requires-python = ">=3.12"
dependencies = [
"launchdarkly-ai-server",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""LaunchDarkly AI SDK - integration for LangChain agents."""

__version__ = "0.1.4" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version

from .graph import langchain_graph
from .handler import create_langchain_agents_handler, langchain_agents
Expand Down
35 changes: 35 additions & 0 deletions packages/langchain-messages/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog

## [0.2.0](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-langchain-messages-0.1.4...launchdarkly-ai-langchain-messages-0.2.0) (2026-08-14)


### ⚠ BREAKING CHANGES

* **langchain-messages:** the span this handler emits is renamed from `langchain.invoke` and `langchain.stream` to `invoke_agent`. Queries selecting on the old names will not match. Prompt and completion content is no longer on spans unless the caller passes capture_content=True. gen_ai.system changes value; see below.

### Features

* **langchain-messages:** emit invoke_agent, chat and execute_tool spans ([51032b5](https://github.com/launchdarkly/python-ai-sdk/commit/51032b5f004d0977d4e38971822b38f28eb3c6b4))


### Bug Fixes

* **langchain-messages:** close the tool span a cancelled tool leaves open ([53c7f9a](https://github.com/launchdarkly/python-ai-sdk/commit/53c7f9a65006f06217e69830f2c7cf30a6e20eec))
* **langchain-messages:** do not serialise the output nobody asked for ([0c9a5dd](https://github.com/launchdarkly/python-ai-sdk/commit/0c9a5ddba5b0bd2be4bae9bc36aa43351de7d225))
* **langchain-messages:** fail the streaming chat span, and keep its tokens ([b084536](https://github.com/launchdarkly/python-ai-sdk/commit/b084536655b27799b957a595615b44bf9b4e2b5e))
* **langchain-messages:** forward capture_content from the convenience wrapper ([79d8030](https://github.com/launchdarkly/python-ai-sdk/commit/79d8030b583f02ecb1e1d7a5d64cedbb266443be))
* **langchain-messages:** guard the per-turn chat span's input write too ([2b901b4](https://github.com/launchdarkly/python-ai-sdk/commit/2b901b4349b34d276018d544a0b4c041ad23f4bb))
* **langchain-messages:** guard the streaming root's output write ([178891a](https://github.com/launchdarkly/python-ai-sdk/commit/178891a337cf12abfdc7f931ff1615d10821b54d))
* **langchain-messages:** keep every structured-turn write inside the guard ([de76f8b](https://github.com/launchdarkly/python-ai-sdk/commit/de76f8be4621abed38112a99fc3a2186a54bfffa))
* **langchain-messages:** keep the spans of a cancelled run ([9c30fb3](https://github.com/launchdarkly/python-ai-sdk/commit/9c30fb377499f0f9218ec134c124e42e16118a19))
* **langchain-messages:** one structured strategy, and don't report zeros as spend ([d7129d4](https://github.com/launchdarkly/python-ai-sdk/commit/d7129d44363a3ce2c41c2d3d0cd276ca8553538c))
* **langchain-messages:** put the input content write inside the guard too ([a68fdff](https://github.com/launchdarkly/python-ai-sdk/commit/a68fdff9271565f9fa2dbc4bbb22691619588c5b))
* **langchain-messages:** record a tool result inside the guard that ends its span ([72c7481](https://github.com/launchdarkly/python-ai-sdk/commit/72c7481d9fbde2d5bfc2f7dad7ce24593be12675))
* **langchain-messages:** report a cancelled stream as cancelled, not abandoned ([9b8e10d](https://github.com/launchdarkly/python-ai-sdk/commit/9b8e10dafe6328505e5273ff16464dfd5e8141ab))
* **langchain-messages:** two more ways a run misreported itself ([ad90d70](https://github.com/launchdarkly/python-ai-sdk/commit/ad90d709c36357ce4183503e074cba4269ead9d2))
* **langchain-messages:** two ways a run could vanish from its own trace ([b8bdfaf](https://github.com/launchdarkly/python-ai-sdk/commit/b8bdfaf6813e33b4e7fc25c6b2930ffd1371458d))


### Documentation

* describe the span tree the SDK now emits ([bc7815a](https://github.com/launchdarkly/python-ai-sdk/commit/bc7815a61e46c96df9cd786b20bfceb7d8b13334))
* describe the span tree the SDK now emits ([#37](https://github.com/launchdarkly/python-ai-sdk/issues/37)) ([6a82ef5](https://github.com/launchdarkly/python-ai-sdk/commit/6a82ef5d1fdbae2b1228f9325d960979bcf50881))

## [0.1.4](https://github.com/launchdarkly/python-ai-sdk/compare/launchdarkly-ai-langchain-messages-0.1.3...launchdarkly-ai-langchain-messages-0.1.4) (2026-08-07)


Expand Down
2 changes: 1 addition & 1 deletion packages/langchain-messages/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "launchdarkly-ai-langchain-messages"
version = "0.1.4"
version = "0.2.0"
requires-python = ">=3.12"
dependencies = [
"launchdarkly-ai-server",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""LaunchDarkly AI SDK - integration for LangChain messages."""

__version__ = "0.1.4" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version

from .handler import create_langchain_messages_handler, langchain_messages

Expand Down
Loading