Skip to content

release: 0.11.3 - #358

Merged
michael-chou359 merged 4 commits into
mainfrom
release-please--branches--main--changes--next
May 21, 2026
Merged

release: 0.11.3#358
michael-chou359 merged 4 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app

@stainless-appstainless-appBot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Automated Release PR

0.11.3 (2026-05-20)

Full Changelog: v0.11.2...v0.11.3

Features

  • added Pydantic AI sync, async, temporal integration (#359) (781dfe1)
  • api: add schedule, checkpoints, and deployment endpoints (53b5c36)

Bug Fixes

  • resolve lint and test failures from new endpoints (#360) (bdf129c)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

This release (0.11.3) adds Pydantic AI integration for sync, async, and Temporal agent workflows, new API endpoints for agent schedules, deployments, and checkpoints, and a fix to the CoalescingBuffer shutdown sequence that eliminated duplicate-tail streaming events on the UI.

  • Pydantic AI ADK modules: Three new modules (_pydantic_ai_sync.py, _pydantic_ai_async.py, _pydantic_ai_tracing.py) map pydantic-ai event streams to Agentex streaming events, matching the existing LangGraph convention. Tracing handler uses deterministic span IDs derived from (trace_id, tool_call_id) to support Temporal activity boundaries.
  • New API resources: CheckpointsResource, DeploymentsResource, and SchedulesResource are fully generated from the OpenAPI spec and follow the established Stainless SDK patterns.
  • CoalescingBuffer fix: Replaces task cancellation with graceful natural-exit shutdown (while True + if self._closed: return at loop bottom) to prevent duplicate Redis publishes caused by re-enqueueing items whose writes had already completed before the CancelledError was raised.

Confidence Score: 5/5

Safe to merge — all changes are additive new features or targeted bug fixes with no modifications to existing behaviour for current users.

The pydantic-ai modules are self-contained additions that do not touch existing code paths; the generated SDK resources follow the established Stainless patterns with no structural deviations; and the CoalescingBuffer fix is a well-motivated, well-documented improvement to the streaming shutdown sequence. The only trade-off introduced (no timeout on _on_flush in close()) is acceptable provided the underlying Redis client carries its own timeouts.

src/agentex/lib/core/services/adk/streaming.py — the CoalescingBuffer shutdown change is the most behaviour-sensitive modification in the PR and warrants a second set of eyes on the Redis client timeout configuration.

Important Files Changed

FilenameOverview
src/agentex/lib/adk/_modules/_pydantic_ai_async.pyNew async streaming helper that pushes Pydantic AI events to Redis. Solid logic; stream parameter is untyped (intentional for lazy imports) and TextContent is imported from a different path than the sync sibling.
src/agentex/lib/adk/_modules/_pydantic_ai_sync.pyNew async-generator sync helper that converts pydantic-ai events to Agentex StreamTaskMessage* events. Event mapping is thorough and the tracing integration is correct.
src/agentex/lib/adk/_modules/_pydantic_ai_tracing.pyTracing handler for pydantic-ai tool calls. Clever use of deterministic UUIDv5 span IDs for Temporal activity-boundary resilience.
src/agentex/lib/core/services/adk/streaming.pyCoalescingBuffer shutdown refactored from cancel-and-requeue to graceful natural-exit. Fix is correct and eliminates duplicate-tail publishing; trade-off is that a permanently blocking _on_flush will now hang close() indefinitely.
src/agentex/resources/agents/schedules.pyGenerated SDK resource for agent schedules (CRUD + pause/unpause/trigger). Follows established Stainless patterns; path params correctly excluded from body transforms.
src/agentex/resources/agents/deployments.pyGenerated SDK resource for agent deployments. All CRUD + preview_rpc + promote endpoints look correct.
src/agentex/resources/checkpoints.pyGenerated checkpoint resource for LangGraph-style thread checkpointing. list/get-tuple/put/put-writes/delete-thread all follow the established pattern.
examples/tutorials/10_async/00_base/110_pydantic_ai/project/acp.pyExample async ACP handler demonstrating correct multi-turn memory persistence and tracing integration with the new pydantic-ai helpers.

Sequence Diagram

sequenceDiagram
participant Agent as Pydantic AI Agent
participant Helper as stream_pydantic_ai_events / convert_pydantic_ai_to_agentex_events
participant Redis as CoalescingBuffer / Redis
participant Agentex as Agentex API
Agent->>Helper: PartStartEvent(TextPart)
Helper->>Agentex: "messages.create (streaming_status=IN_PROGRESS)"
Helper->>Redis: StreamTaskMessageStart
Agent->>Helper: PartDeltaEvent(TextPartDelta)
Helper->>Redis: StreamTaskMessageDelta (buffered/coalesced)
Agent->>Helper: PartEndEvent
Helper->>Redis: CoalescingBuffer.close() final flush
Helper->>Redis: StreamTaskMessageDone
Helper->>Agentex: messages.update (final content)
Agent->>Helper: PartStartEvent(ToolCallPart)
Note over Helper: Accumulates args until PartEndEvent
Agent->>Helper: PartEndEvent(ToolCallPart)
Helper->>Agentex: messages.create (ToolRequestContent, full args)
Helper->>Agentex: spans.create (tracing_handler.on_tool_start)
Agent->>Helper: FunctionToolResultEvent
Helper->>Agentex: messages.create (ToolResponseContent)
Helper->>Agentex: spans.update (tracing_handler.on_tool_end)
Loading

Fix All in CursorFix All in Claude CodeFix All in Codex

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---### Issue 1 of 2
src/agentex/lib/adk/_modules/_pydantic_ai_async.py:30-34
The `stream` parameter has no type annotation, which makes IDE autocompletion and static analysis significantly less useful for callers. Since `pydantic-ai` is an optional dependency and the import is lazy, the annotation can use a string forward reference to avoid an unconditional import at module load time — matching how the `tracing_handler` parameter is already handled.
```suggestionasync def stream_pydantic_ai_events( stream: "AsyncIterator[Any]", task_id: str, tracing_handler: "AgentexPydanticAITracingHandler | None" = None,) -> str:```### Issue 2 of 2
src/agentex/lib/core/services/adk/streaming.py:211-232
**Potential indefinite hang when `_on_flush` blocks**
The old implementation called `_task.cancel()` before `await self._task`, which would interrupt a stuck `_on_flush` (e.g. a Redis write that never resolves). The new approach waits for the task to exit naturally, so `close()` will block indefinitely if `_on_flush` ever hangs. Given the motivation (avoid duplicate-tail publishing from a write that completed but whose `await` hadn't returned yet), this is a reasonable trade-off — but it implicitly relies on the Redis client having its own connection-level timeout configured. Worth confirming that the `StreamRepository` implementation's write calls carry a timeout so this path can never deadlock in production.

Reviews (3): Last reviewed commit: "release: 0.11.3" | Re-trigger Greptile

@declan-scaledeclan-scale changed the title release: 0.12.0release: 0.11.3May 18, 2026
@stainless-app

Copy link
Copy Markdown
ContributorAuthor

Release version edited manually

The Pull Request version has been manually set to 0.11.3 and will be used for the release.

If you instead want to use the version number 0.12.0 generated from conventional commits, just remove the label autorelease: custom version from this Pull Request.

@stainless-app
stainless-appBotforce-pushed the release-please--branches--main--changes--next branch from b4a6a9e to 58a77efCompareMay 18, 2026 22:43
Comment threadsrc/agentex/types/agents/deployment_preview_rpc_params.py
@stainless-app
stainless-appBotforce-pushed the release-please--branches--main--changes--next branch from 58a77ef to 6cde3e9CompareMay 19, 2026 16:07
Comment threadsrc/agentex/types/agents/schedule_pause_params.py
@stainless-app
stainless-appBotforce-pushed the release-please--branches--main--changes--next branch from 6cde3e9 to 2f9a3e3CompareMay 20, 2026 17:21
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

DiffPackageSupply Chain
Security
VulnerabilityQualityMaintenanceLicense
Addedpydantic-ai-slim@​1.99.099100100100100

View full report

@michael-chou359
michael-chou359 merged commit 84dbf72 into mainMay 21, 2026
46 checks passed
@michael-chou359
michael-chou359 deleted the release-please--branches--main--changes--next branch May 21, 2026 18:46
@stainless-app

Copy link
Copy Markdown
ContributorAuthor

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@declan-scale@michael-chou359