Skip to content

v0.11.3

Latest

Choose a tag to compare

@stainless-app stainless-app released this 21 May 18:46
84dbf72

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

Filename Overview
src/agentex/lib/adk/_modules/_pydantic_ai_async.py New 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.py New 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.py Tracing 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.py CoalescingBuffer 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.py Generated 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.py Generated SDK resource for agent deployments. All CRUD + preview_rpc + promote endpoints look correct.
src/agentex/resources/checkpoints.py Generated 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.py Example 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)

Fix All in Cursor Fix All in Claude Code Fix 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.