Skip to content

Commit 93dc835

Browse files
Merge branch 'next' into SGPINF-1863-implement-span-queue-telemetry
Bring in span queue reliability (bounded queue, retries, drop counting), ACP protocol package move (#371), openai-agents bump (#375), and related next changes without mixing in span-queue telemetry integration. Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents b4fff59 + e1b31d9 commit 93dc835

44 files changed

Lines changed: 1365 additions & 686 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.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.11.2"
2+
".": "0.11.4"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 63
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-5400cbfee7eab6b5ace17d760b4997fd68f8d169470ab5040cf268a185250a0b.yml
3-
openapi_spec_hash: d31d828c46635cbc20165177c7187a70
4-
config_hash: 81470e0e689fe06fa3e013ec01a7f84f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-4d4bf80af19e6a2ef6b890d5d978316b86e9939d8d5116e94b90117525c61325.yml
3+
openapi_spec_hash: 133afeacb42000ed4f9e076abf4b50fd
4+
config_hash: ba5183ca635940fd202d05a2a9fcb630

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
# Changelog
22

3-
## Unreleased
3+
## 0.11.4 (2026-05-26)
4+
5+
Full Changelog: [v0.11.3...v0.11.4](https://github.com/scaleapi/scale-agentex-python/compare/v0.11.3...v0.11.4)
6+
7+
### Chores
8+
9+
* **deps:** relax redis pin to support 6.x/7.x ([#363](https://github.com/scaleapi/scale-agentex-python/issues/363)) ([7817ced](https://github.com/scaleapi/scale-agentex-python/commit/7817ced90b80430a69b6f51a6841aa921a33a093))
10+
* relax requires-python floor to &gt;= 3.11 ([#366](https://github.com/scaleapi/scale-agentex-python/issues/366)) ([a064f92](https://github.com/scaleapi/scale-agentex-python/commit/a064f928c0fac868ec1486ef49382a9baf73b5e0))
11+
12+
## 0.11.3 (2026-05-20)
13+
14+
Full Changelog: [v0.11.2...v0.11.3](https://github.com/scaleapi/scale-agentex-python/compare/v0.11.2...v0.11.3)
415

516
### Features
617

7-
* **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``.
18+
* added Pydantic AI sync, async, temporal integration ([#359](https://github.com/scaleapi/scale-agentex-python/issues/359)) ([781dfe1](https://github.com/scaleapi/scale-agentex-python/commit/781dfe172373c2e01fb642b3c98af6908c98218a))
19+
* **api:** add schedule, checkpoints, and deployment endpoints ([53b5c36](https://github.com/scaleapi/scale-agentex-python/commit/53b5c3673e54ee4b49debd049483f1a1d4b0673d))
20+
21+
22+
### Bug Fixes
23+
24+
* resolve lint and test failures from new endpoints ([#360](https://github.com/scaleapi/scale-agentex-python/issues/360)) ([bdf129c](https://github.com/scaleapi/scale-agentex-python/commit/bdf129c8ab976ed84aa9932d5585a753280a6a34))
825

926
## 0.11.2 (2026-05-13)
1027

CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,27 @@ The package provides the `agentex` CLI with these main commands:
5555

5656
### Code Structure
5757
- `/src/agentex/` - Core SDK and generated API client code
58+
- `/src/agentex/protocol/` - **Canonical** location for wire-protocol shapes
59+
(JSON-RPC envelopes, ACP method-param types). Depends only on `pydantic`
60+
and the Stainless-generated `agentex.types.*` surface, so it is safe to
61+
import from a future slim REST-only install.
62+
- `acp.py` - `RPCMethod`, `CreateTaskParams`, `SendMessageParams`,
63+
`SendEventParams`, `CancelTaskParams`, `RPC_SYNC_METHODS`,
64+
`PARAMS_MODEL_BY_METHOD`
65+
- `json_rpc.py` - `JSONRPCRequest`, `JSONRPCResponse`, `JSONRPCError`
5866
- `/src/agentex/lib/` - Custom library code (not modified by code generator)
5967
- `/cli/` - Command-line interface implementation
6068
- `/core/` - Core services, adapters, and temporal workflows
6169
- `/sdk/` - SDK utilities and FastACP implementation
6270
- `/types/` - Custom type definitions
71+
- `acp.py`, `json_rpc.py` - **back-compat shims** re-exporting from
72+
`agentex.protocol.*`. Existing `from agentex.lib.types.{acp,json_rpc}
73+
import ...` keeps working; new code should import from the canonical
74+
`agentex.protocol.*` paths.
75+
- Other modules (`tracing`, `agent_card`, `credentials`, `fastacp`,
76+
`llm_messages`, `converters`, etc.) stay here — they have heavier
77+
transitive deps (temporal, openai-agents, model_utils/yaml) and
78+
aren't slim-safe.
6379
- `/utils/` - Utility functions
6480
- `/examples/` - Example implementations and tutorials
6581
- `/tests/` - Test suites
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "0",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"from agentex import Agentex\n",
11+
"\n",
12+
"client = Agentex(base_url=\"http://localhost:5003\")"
13+
]
14+
},
15+
{
16+
"cell_type": "code",
17+
"execution_count": null,
18+
"id": "1",
19+
"metadata": {},
20+
"outputs": [],
21+
"source": [
22+
"AGENT_NAME = \"s010-multiturn\""
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": null,
28+
"id": "2",
29+
"metadata": {},
30+
"outputs": [],
31+
"source": [
32+
"# # (Optional) Create a new task. If you don't create a new task, each message will be sent to a new task. The server will create the task for you.\n",
33+
"\n",
34+
"# import uuid\n",
35+
"\n",
36+
"# TASK_ID = str(uuid.uuid4())[:8]\n",
37+
"\n",
38+
"# rpc_response = client.agents.rpc_by_name(\n",
39+
"# agent_name=AGENT_NAME,\n",
40+
"# method=\"task/create\",\n",
41+
"# params={\n",
42+
"# \"name\": f\"{TASK_ID}-task\",\n",
43+
"# \"params\": {}\n",
44+
"# }\n",
45+
"# )\n",
46+
"\n",
47+
"# task = rpc_response.result\n",
48+
"# print(task)"
49+
]
50+
},
51+
{
52+
"cell_type": "code",
53+
"execution_count": null,
54+
"id": "3",
55+
"metadata": {},
56+
"outputs": [],
57+
"source": [
58+
"# Test non streaming response\n",
59+
"from agentex.types import TextContent\n",
60+
"\n",
61+
"# The response is expected to be a list of TaskMessage objects, which is a union of the following types:\n",
62+
"# - TextContent: A message with just text content \n",
63+
"# - DataContent: A message with JSON-serializable data content\n",
64+
"# - ToolRequestContent: A message with a tool request, which contains a JSON-serializable request to call a tool\n",
65+
"# - ToolResponseContent: A message with a tool response, which contains response object from a tool call in its content\n",
66+
"\n",
67+
"# When processing the message/send response, if you are expecting more than TextContent, such as DataContent, ToolRequestContent, or ToolResponseContent, you can process them as well\n",
68+
"\n",
69+
"rpc_response = client.agents.send_message(\n",
70+
" agent_name=AGENT_NAME,\n",
71+
" params={\n",
72+
" \"content\": {\"type\": \"text\", \"author\": \"user\", \"content\": \"Hello what can you do?\"},\n",
73+
" \"stream\": False\n",
74+
" }\n",
75+
")\n",
76+
"\n",
77+
"if not rpc_response or not rpc_response.result:\n",
78+
" raise ValueError(\"No result in response\")\n",
79+
"\n",
80+
"# Extract and print just the text content from the response\n",
81+
"for task_message in rpc_response.result:\n",
82+
" content = task_message.content\n",
83+
" if isinstance(content, TextContent):\n",
84+
" text = content.content\n",
85+
" print(text)\n"
86+
]
87+
},
88+
{
89+
"cell_type": "code",
90+
"execution_count": null,
91+
"id": "4",
92+
"metadata": {},
93+
"outputs": [],
94+
"source": [
95+
"# Test streaming response\n",
96+
"from agentex.types.text_delta import TextDelta\n",
97+
"from agentex.types.task_message_update import StreamTaskMessageFull, StreamTaskMessageDelta\n",
98+
"\n",
99+
"# The result object of message/send will be a TaskMessageUpdate which is a union of the following types:\n",
100+
"# - StreamTaskMessageStart: \n",
101+
"# - An indicator that a streaming message was started, doesn't contain any useful content\n",
102+
"# - StreamTaskMessageDelta: \n",
103+
"# - A delta of a streaming message, contains the text delta to aggregate\n",
104+
"# - StreamTaskMessageDone: \n",
105+
"# - An indicator that a streaming message was done, doesn't contain any useful content\n",
106+
"# - StreamTaskMessageFull: \n",
107+
"# - A non-streaming message, there is nothing to aggregate, since this contains the full message, not deltas\n",
108+
"\n",
109+
"# Whenn processing StreamTaskMessageDelta, if you are expecting more than TextDeltas, such as DataDelta, ToolRequestDelta, or ToolResponseDelta, you can process them as well\n",
110+
"# Whenn processing StreamTaskMessageFull, if you are expecting more than TextContent, such as DataContent, ToolRequestContent, or ToolResponseContent, you can process them as well\n",
111+
"\n",
112+
"for agent_rpc_response_chunk in client.agents.send_message_stream(\n",
113+
" agent_name=AGENT_NAME,\n",
114+
" params={\n",
115+
" \"content\": {\"type\": \"text\", \"author\": \"user\", \"content\": \"Hello what can you do?\"},\n",
116+
" \"stream\": True\n",
117+
" }\n",
118+
"):\n",
119+
" # We know that the result of the message/send when stream is set to True will be a TaskMessageUpdate\n",
120+
" task_message_update = agent_rpc_response_chunk.result\n",
121+
" # Print oly the text deltas as they arrive or any full messages\n",
122+
" if isinstance(task_message_update, StreamTaskMessageDelta):\n",
123+
" delta = task_message_update.delta\n",
124+
" if isinstance(delta, TextDelta):\n",
125+
" print(delta.text_delta, end=\"\", flush=True)\n",
126+
" else:\n",
127+
" print(f\"Found non-text {type(task_message)} object in streaming message.\")\n",
128+
" elif isinstance(task_message_update, StreamTaskMessageFull):\n",
129+
" content = task_message_update.content\n",
130+
" if isinstance(content, TextContent):\n",
131+
" print(content.content)\n",
132+
" else:\n",
133+
" print(f\"Found non-text {type(task_message)} object in full message.\")\n"
134+
]
135+
},
136+
{
137+
"cell_type": "code",
138+
"execution_count": null,
139+
"id": "5",
140+
"metadata": {},
141+
"outputs": [],
142+
"source": []
143+
}
144+
],
145+
"metadata": {
146+
"kernelspec": {
147+
"display_name": ".venv",
148+
"language": "python",
149+
"name": "python3"
150+
},
151+
"language_info": {
152+
"codemirror_mode": {
153+
"name": "ipython",
154+
"version": 3
155+
},
156+
"file_extension": ".py",
157+
"mimetype": "text/x-python",
158+
"name": "python",
159+
"nbconvert_exporter": "python",
160+
"pygments_lexer": "ipython3",
161+
"version": "3.12.9"
162+
}
163+
},
164+
"nbformat": 4,
165+
"nbformat_minor": 5
166+
}

examples/tutorials/00_sync/010_multiturn/dev.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
],
145145
"metadata": {
146146
"kernelspec": {
147-
"display_name": ".venv",
147+
"display_name": "Python 3 (ipykernel)",
148148
"language": "python",
149149
"name": "python3"
150150
},
@@ -158,7 +158,7 @@
158158
"name": "python",
159159
"nbconvert_exporter": "python",
160160
"pygments_lexer": "ipython3",
161-
"version": "3.12.9"
161+
"version": "3.14.2"
162162
}
163163
},
164164
"nbformat": 4,

examples/tutorials/10_async/10_temporal/060_open_ai_agents_sdk_hello_world/tests/test_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ci: touch to re-run tutorial integration tests for the openai-agents>=0.14.3 bump
12
"""
23
Sample tests for AgentEx ACP agent.
34

pyproject.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentex-sdk"
3-
version = "0.11.2"
3+
version = "0.11.4"
44
description = "The official Python library for the agentex API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -20,7 +20,6 @@ dependencies = [
2020
"rich>=13.9.2,<14",
2121
"fastapi>=0.115.0",
2222
"starlette>=0.49.1",
23-
"tornado>=6.5.5",
2423
"uvicorn>=0.31.1",
2524
"watchfiles>=0.24.0,<1.0",
2625
"python-on-whales>=0.73.0,<0.74",
@@ -29,37 +28,31 @@ dependencies = [
2928
"jsonref>=1.1.0,<2",
3029
"temporalio>=1.26.0,<2",
3130
"aiohttp>=3.10.10,<4",
32-
"redis>=5.2.0,<6",
31+
"redis>=5.2.0,<8",
3332
"litellm>=1.83.7,<2",
3433
"kubernetes>=25.0.0,<36.0.0",
3534
"jinja2>=3.1.3,<4",
36-
"mcp[cli]>=1.4.1",
35+
"mcp>=1.4.1",
3736
"scale-gp>=0.1.0a59",
38-
"openai-agents==0.14.1",
37+
"openai-agents>=0.14.3,<0.15",
3938
"pydantic-ai-slim>=1.0,<2",
40-
"tzlocal>=5.3.1",
41-
"tzdata>=2025.2",
42-
"pytest>=8.4.0",
4339
"json_log_formatter>=1.1.1",
44-
"pytest-asyncio>=1.0.0",
4540
"scale-gp-beta>=0.2.0",
46-
"ipykernel>=6.29.5",
4741
"openai>=2.2,<3", # Required by openai-agents; litellm now supports openai 2.x (issue #13711 resolved: https://github.com/BerriAI/litellm/issues/13711)
4842
"cloudpickle>=3.1.1",
49-
"datadog>=0.52.1",
5043
"ddtrace>=3.13.0",
5144
"yaspin>=3.1.0",
5245
"claude-agent-sdk>=0.1.0",
53-
"anthropic>=0.40.0",
5446
"langgraph-checkpoint>=2.0.0",
5547
"opentelemetry-sdk>=1.20.0",
5648
"opentelemetry-api>=1.20.0",
5749
]
5850

59-
requires-python = ">= 3.12,<4"
51+
requires-python = ">= 3.11,<4"
6052
classifiers = [
6153
"Typing :: Typed",
6254
"Intended Audience :: Developers",
55+
"Programming Language :: Python :: 3.11",
6356
"Programming Language :: Python :: 3.12",
6457
"Programming Language :: Python :: 3.13",
6558
"Programming Language :: Python :: 3.14",
@@ -151,6 +144,14 @@ include = [
151144

152145
[tool.hatch.build.targets.wheel]
153146
packages = ["src/agentex"]
147+
# Don't ship internal test files in the wheel. `lib/cli/templates/**/test_agent.py.j2`
148+
# is intentionally kept — those render into user projects.
149+
exclude = [
150+
"src/agentex/lib/**/tests/**",
151+
"src/agentex/lib/**/test_*.py",
152+
"src/agentex/lib/**/conftest.py",
153+
"src/agentex/lib/**/pytest.ini",
154+
]
154155

155156
[tool.hatch.build.targets.sdist]
156157
# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)

0 commit comments

Comments
 (0)