Skip to content

Commit 521c60d

Browse files
stainless-app[bot]declan-scaleclaudeOpenAI
authored
chore: release main (#443)
Co-authored-by: Declan Brady <declan.brady@scale.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: OpenAI <openai@example.com> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent b30a90b commit 521c60d

186 files changed

Lines changed: 11178 additions & 2456 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/harness-integration.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
paths:
88
- "src/agentex/lib/core/harness/**"
99
- "src/agentex/lib/adk/_modules/**"
10-
- "tests/lib/core/harness/test_harness_pydantic_ai_*.py"
11-
- "tests/lib/core/harness/test_harness_langgraph_*.py"
10+
- "tests/lib/core/harness/test_harness_*.py"
1211
- ".github/workflows/harness-integration.yml"
1312

1413
jobs:
@@ -34,14 +33,15 @@ jobs:
3433
run: ./scripts/test tests/lib/core/harness/ -v
3534

3635
# Offline harness integration tests (sync / async / temporal channels) for each
37-
# migrated harness. These use fake streams / TestModel + fake streaming/tracing
38-
# and require no live infrastructure. Future harness migration PRs (6-8) add
39-
# their harness to the matrix below and their test paths to the triggers above.
36+
# harness. These use fake streams / TestModel + fake streaming/tracing and
37+
# require no live infrastructure. All five harnesses are now covered; the
38+
# trigger above uses a `test_harness_*.py` glob so new suites are picked up
39+
# automatically.
4040
live-matrix:
4141
runs-on: ubuntu-latest
4242
strategy:
4343
matrix:
44-
harness: [pydantic_ai, langgraph]
44+
harness: [pydantic_ai, langgraph, openai, claude_code, codex]
4545
channel: [sync, async, temporal]
4646
fail-fast: false
4747
name: ${{ matrix.harness }}-${{ matrix.channel }}

.release-please-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
".": "0.15.0",
3-
"adk": "0.14.0"
2+
".": "0.16.0",
3+
"adk": "0.15.0"
44
}

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,46 @@
22

33
## Unreleased
44

5+
### ⚠ BREAKING CHANGES
6+
7+
* **harness:** removed the deprecated bespoke LangGraph tracing handler `create_langgraph_tracing_handler` (and its `AgentexLangGraphTracingHandler` class) from the public `agentex.lib.adk` surface. Span tracing is now derived from the canonical `StreamTaskMessage*` stream by `UnifiedEmitter` — wrap your run in the harness `*Turn` and drive `UnifiedEmitter.yield_turn` / `auto_send_turn`. The `agentex init` templates were migrated accordingly.
8+
* **harness:** removed the deprecated bespoke Pydantic-AI tracing handler `create_pydantic_ai_tracing_handler` (and its `AgentexPydanticAITracingHandler` class) from the public `agentex.lib.adk` surface. Span tracing is now derived from the canonical `StreamTaskMessage*` stream by `UnifiedEmitter` — wrap your run in `PydanticAITurn` and drive `UnifiedEmitter.yield_turn` / `auto_send_turn`. The `agentex init` templates were migrated accordingly.
9+
* **harness:** each harness now exposes exactly `_<harness>_sync.py` + `_<harness>_turn.py` under `agentex.lib.adk._modules`. The OpenAI harness `OpenAITurn` and `convert_openai_to_agentex_events` moved to `agentex.lib.adk._modules._openai_turn` / `_openai_sync`; back-compat shims remain at `agentex.lib.adk.providers._modules.{openai_turn,sync_provider}` for one release. Public facade names (`stream_pydantic_ai_events`, `stream_langgraph_events`, `emit_langgraph_messages`, etc.) are unchanged.
10+
511
### Features
612

713
* **tracing:** emit OTel metrics for async span queue depth, batch drain, and SGP export success/failure (HTTP status labels). Disable SDK-side recording with ``AGENTEX_TRACING_METRICS=0``.
814

15+
## 0.16.0 (2026-06-24)
16+
17+
Full Changelog: [agentex-client-v0.15.0...agentex-client-v0.16.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-client-v0.15.0...agentex-client-v0.16.0)
18+
19+
### ⚠ BREAKING CHANGES
20+
21+
* **harness:** consolidate the Pydantic-AI harness + remove tracing handler ([#431](https://github.com/scaleapi/scale-agentex-python/issues/431))
22+
* **harness:** consolidate the LangGraph harness + remove tracing handler ([#430](https://github.com/scaleapi/scale-agentex-python/issues/430))
23+
24+
### Features
25+
26+
* **cli:** add claude-code init templates (sync / async / temporal) ([#435](https://github.com/scaleapi/scale-agentex-python/issues/435)) ([fd9bc4a](https://github.com/scaleapi/scale-agentex-python/commit/fd9bc4a81417b9d75ad692b779293720f8435d37))
27+
* **cli:** add codex init templates (sync / async / temporal) ([#436](https://github.com/scaleapi/scale-agentex-python/issues/436)) ([0fadfd7](https://github.com/scaleapi/scale-agentex-python/commit/0fadfd7a113536d49a99894a3b80ed0915a0e0fb))
28+
* **cli:** add default-openai-agents init template (async base) ([#434](https://github.com/scaleapi/scale-agentex-python/issues/434)) ([624e9c8](https://github.com/scaleapi/scale-agentex-python/commit/624e9c8f3b4c4288a7037bc83651970cfb02e6b0))
29+
* **openai-agents:** single-emit + input-bearing tool spans + run_turn ([#445](https://github.com/scaleapi/scale-agentex-python/issues/445)) ([53ab8ef](https://github.com/scaleapi/scale-agentex-python/commit/53ab8efaaf65590e71abe07149582ea59814921b))
30+
* **openai-temporal:** render hosted/server-side tool calls in TemporalStreamingModel ([#442](https://github.com/scaleapi/scale-agentex-python/issues/442)) ([5dce9f0](https://github.com/scaleapi/scale-agentex-python/commit/5dce9f097723d3436a0e40277139e7cce68580ef))
31+
32+
33+
### Bug Fixes
34+
35+
* **cli:** harden init templates per Greptile feedback (suite-wide) ([#444](https://github.com/scaleapi/scale-agentex-python/issues/444)) ([2d85eb0](https://github.com/scaleapi/scale-agentex-python/commit/2d85eb0952f2298e6c412ab44b9c59255431cb84))
36+
* **harness:** harden Claude Code + OpenAI taps and span tracing ([#446](https://github.com/scaleapi/scale-agentex-python/issues/446)) ([5b4359d](https://github.com/scaleapi/scale-agentex-python/commit/5b4359dcf28f390f780215ed954fa52e8cb4dd7c))
37+
38+
39+
### Refactors
40+
41+
* **harness:** consolidate the LangGraph harness + remove tracing handler ([#430](https://github.com/scaleapi/scale-agentex-python/issues/430)) ([a3fb5ad](https://github.com/scaleapi/scale-agentex-python/commit/a3fb5ad51f6392a48cbb8324f15c9619f10244b6))
42+
* **harness:** consolidate the Pydantic-AI harness + remove tracing handler ([#431](https://github.com/scaleapi/scale-agentex-python/issues/431)) ([48c3da8](https://github.com/scaleapi/scale-agentex-python/commit/48c3da8777ae20a9ca6d544238dccd64d6c62c2b))
43+
* **harness:** move OpenAI harness into adk/_modules + facade export ([#432](https://github.com/scaleapi/scale-agentex-python/issues/432)) ([58bdb16](https://github.com/scaleapi/scale-agentex-python/commit/58bdb16b4b18db22188a29d5d1b31759f9d0dd4e))
44+
945
## 0.15.0 (2026-06-23)
1046

1147
Full Changelog: [agentex-client-v0.14.0...agentex-client-v0.15.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-client-v0.14.0...agentex-client-v0.15.0)

adk/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 0.15.0 (2026-06-24)
4+
5+
Full Changelog: [agentex-sdk-v0.14.0...agentex-sdk-v0.15.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-sdk-v0.14.0...agentex-sdk-v0.15.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* **harness:** consolidate the LangGraph harness + remove tracing handler ([#430](https://github.com/scaleapi/scale-agentex-python/issues/430))
10+
11+
### Bug Fixes
12+
13+
* **harness:** harden Claude Code + OpenAI taps and span tracing ([#446](https://github.com/scaleapi/scale-agentex-python/issues/446)) ([5b4359d](https://github.com/scaleapi/scale-agentex-python/commit/5b4359dcf28f390f780215ed954fa52e8cb4dd7c))
14+
15+
16+
### Refactors
17+
18+
* **harness:** consolidate the LangGraph harness + remove tracing handler ([#430](https://github.com/scaleapi/scale-agentex-python/issues/430)) ([a3fb5ad](https://github.com/scaleapi/scale-agentex-python/commit/a3fb5ad51f6392a48cbb8324f15c9619f10244b6))
19+
320
## 0.14.0 (2026-06-23)
421

522
Full Changelog: [agentex-sdk-v0.13.2...agentex-sdk-v0.14.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-sdk-v0.13.2...agentex-sdk-v0.14.0)

adk/docs/harness.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ Every harness tap produces a sequence of these. Everything downstream (delivery,
3939

4040
## Per-harness taps: `convert_<harness>_to_agentex_events`
4141

42-
A tap is an async generator that translates the harness's native event stream into `StreamTaskMessage*` events. The currently shipped taps are:
42+
A tap is an async generator that translates the harness's native event stream into `StreamTaskMessage*` events. The shipped taps are:
4343

4444
| Harness | Tap function | Exported from |
4545
|---|---|---|
4646
| pydantic-ai | `convert_pydantic_ai_to_agentex_events` | `agentex.lib.adk` |
4747
| LangGraph | `convert_langgraph_to_agentex_events` | `agentex.lib.adk` |
48+
| claude-code | `convert_claude_code_to_agentex_events` | `agentex.lib.adk` |
49+
| codex | `convert_codex_to_agentex_events` | `agentex.lib.adk` |
50+
| OpenAI Agents | `convert_openai_to_agentex_events` | `agentex.lib.adk.providers._modules.sync_provider` |
4851

49-
Taps for claude-code and codex will be added in subsequent PRs (AGX1-420, AGX1-421) and exported from `agentex.lib.adk` in the same way.
52+
Each harness also provides a `HarnessTurn` wrapper that pairs its tap's event stream with usage extraction: `PydanticAITurn`, `LangGraphTurn`, `ClaudeCodeTurn`, `CodexTurn`, and `OpenAITurn`.
5053

5154
---
5255

@@ -157,11 +160,13 @@ Spans are derived from the canonical stream by `SpanDeriver` (pure, no `adk` dep
157160

158161
## Usage examples by channel
159162

160-
### Sync ACP (pydantic-ai tap)
163+
### Sync ACP (`yield_turn`)
164+
165+
Build the harness's `HarnessTurn` wrapper and iterate `emitter.yield_turn(turn)` — the emitter forwards each event to the caller and traces spans as a side effect:
161166

162167
```python
163168
import agentex.lib.adk as adk
164-
from agentex.lib.adk import UnifiedEmitter, convert_pydantic_ai_to_agentex_events
169+
from agentex.lib.adk import UnifiedEmitter, ClaudeCodeTurn
165170

166171
@acp.on_message_send
167172
async def handle(params):
@@ -172,13 +177,12 @@ async def handle(params):
172177
trace_id=task_id,
173178
parent_span_id=turn_span.id if turn_span else None,
174179
)
175-
tap = convert_pydantic_ai_to_agentex_events(pydantic_stream)
176-
# wrap tap in a HarnessTurn then yield_turn, or yield directly:
177-
async for event in tap:
180+
turn = ClaudeCodeTurn(claude_code_stream) # any HarnessTurn
181+
async for event in emitter.yield_turn(turn):
178182
yield event
179183
```
180184

181-
For the pre-unified sync path the tap is still yielded directly; `UnifiedEmitter.yield_turn` is the forward-looking integration point when a `HarnessTurn` wrapper is available.
185+
Every harness follows the same shape — swap `ClaudeCodeTurn` for `PydanticAITurn`, `LangGraphTurn`, `CodexTurn`, or `OpenAITurn` and feed it that harness's native stream.
182186

183187
### Async Temporal (auto-send)
184188

@@ -194,3 +198,9 @@ result = await emitter.auto_send_turn(turn, created_at=workflow.now())
194198
# result.final_text — last text segment
195199
# result.usage — TurnUsage (tokens, cost, ...)
196200
```
201+
202+
---
203+
204+
## Migration
205+
206+
- [Migrating to `agentex-client` 0.16.0 / `agentex-sdk` 0.15.0](./migration-0.16.0.md) — removed LangGraph/Pydantic-AI tracing handlers (tracing is now derived from the canonical stream), private `_modules` path moves, the OpenAI harness facade relocation, and the new `run_turn` Temporal entry point.

0 commit comments

Comments
 (0)