Skip to content
Merged
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.prism.log
.vscode
_dev

__pycache__
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.1"
".": "0.2.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-62a09183a027c64707ad1b9d7a5ccc66c8abf3965e6075282cb5ab72f742a2b3.yml
openapi_spec_hash: 47f43703822077a82e2edf82d4b7e0e5
config_hash: 8d5db979856e35045ae2cdc248ddae47
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-782d59cf134b51ddd5058ae6e1630057093a6034b1d90663ab67836802b67cc6.yml
openapi_spec_hash: 3356926852d5d095d572b4fdce242836
config_hash: 7c1f6794a184ee175dd94f2f7c2b496b
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.importFormat": "relative",
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.2.0 (2025-07-25)

Full Changelog: [v0.1.1...v0.2.0](https://github.com/scaleapi/agentex-python/compare/v0.1.1...v0.2.0)

### Features

* **api:** update typescript sdk with big changes ([2c75d64](https://github.com/scaleapi/agentex-python/commit/2c75d642348df727505778c347efa568930ea4f0))


### Chores

* **project:** add settings file for vscode ([0f926cc](https://github.com/scaleapi/agentex-python/commit/0f926cce7df375de33627f8212caacf64f89b1ed))

## 0.1.1 (2025-07-24)

Full Changelog: [v0.1.0...v0.1.1](https://github.com/scaleapi/agentex-python/compare/v0.1.0...v0.1.1)
Expand Down
1 change: 0 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Types:
from agentex.types import (
AcpType,
Agent,
AgentRpcParams,
AgentRpcRequest,
AgentRpcResponse,
AgentRpcResult,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "agentex-sdk"
version = "0.1.1"
version = "0.2.0"
description = "The official Python library for the agentex API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/agentex/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "agentex"
__version__ = "0.1.1" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version
11 changes: 5 additions & 6 deletions src/agentex/resources/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from ..types import AgentRpcParams, agent_rpc_params, agent_list_params, agent_rpc_by_name_params
from ..types import agent_rpc_params, agent_list_params, agent_rpc_by_name_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
Expand All @@ -20,7 +20,6 @@
)
from ..types.agent import Agent
from .._base_client import make_request_options
from ..types.agent_rpc_params import AgentRpcParams
from ..types.agent_rpc_response import AgentRpcResponse
from ..types.agent_list_response import AgentListResponse

Expand Down Expand Up @@ -221,7 +220,7 @@ def rpc(
agent_id: str,
*,
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
params: AgentRpcParams,
params: agent_rpc_params.Params,
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -269,7 +268,7 @@ def rpc_by_name(
agent_name: str,
*,
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
params: AgentRpcParams,
params: agent_rpc_by_name_params.Params,
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -507,7 +506,7 @@ async def rpc(
agent_id: str,
*,
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
params: AgentRpcParams,
params: agent_rpc_params.Params,
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -555,7 +554,7 @@ async def rpc_by_name(
agent_name: str,
*,
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
params: AgentRpcParams,
params: agent_rpc_by_name_params.Params,
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
60 changes: 55 additions & 5 deletions src/agentex/types/agent_rpc_by_name_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,70 @@

from __future__ import annotations

from typing import Union
from typing_extensions import Literal, Required, TypedDict
from typing import Dict, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from .agent_rpc_params import AgentRpcParams
from .task_message_content_param import TaskMessageContentParam

__all__ = ["AgentRpcByNameParams"]
__all__ = [
"AgentRpcByNameParams",
"Params",
"ParamsCreateTaskRequest",
"ParamsCancelTaskRequest",
"ParamsSendMessageRequest",
"ParamsSendEventRequest",
]


class AgentRpcByNameParams(TypedDict, total=False):
method: Required[Literal["event/send", "task/create", "message/send", "task/cancel"]]

params: Required[AgentRpcParams]
params: Required[Params]
"""The parameters for the agent RPC request"""

id: Union[int, str, None]

jsonrpc: Literal["2.0"]


class ParamsCreateTaskRequest(TypedDict, total=False):
name: Optional[str]
"""The name of the task to create"""

params: Optional[Dict[str, object]]
"""The parameters for the task"""


class ParamsCancelTaskRequest(TypedDict, total=False):
task_id: Optional[str]
"""The ID of the task to cancel. Either this or task_name must be provided."""

task_name: Optional[str]
"""The name of the task to cancel. Either this or task_id must be provided."""


class ParamsSendMessageRequest(TypedDict, total=False):
content: Required[TaskMessageContentParam]
"""The message that was sent to the agent"""

stream: bool
"""Whether to stream the response message back to the client"""

task_id: Optional[str]
"""The ID of the task that the message was sent to"""


class ParamsSendEventRequest(TypedDict, total=False):
content: Optional[TaskMessageContentParam]
"""The content to send to the event"""

task_id: Optional[str]
"""The ID of the task that the event was sent to"""

task_name: Optional[str]
"""The name of the task that the event was sent to"""


Params: TypeAlias = Union[
ParamsCreateTaskRequest, ParamsCancelTaskRequest, ParamsSendMessageRequest, ParamsSendEventRequest
]
34 changes: 27 additions & 7 deletions src/agentex/types/agent_rpc_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,48 @@
from __future__ import annotations

from typing import Dict, Union, Optional
from typing_extensions import Required, TypeAlias, TypedDict
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from .task_message_content_param import TaskMessageContentParam

__all__ = ["AgentRpcParams", "CreateTaskRequest", "CancelTaskRequest", "SendMessageRequest", "SendEventRequest"]
__all__ = [
"AgentRpcParams",
"Params",
"ParamsCreateTaskRequest",
"ParamsCancelTaskRequest",
"ParamsSendMessageRequest",
"ParamsSendEventRequest",
]


class CreateTaskRequest(TypedDict, total=False):
class AgentRpcParams(TypedDict, total=False):
method: Required[Literal["event/send", "task/create", "message/send", "task/cancel"]]

params: Required[Params]
"""The parameters for the agent RPC request"""

id: Union[int, str, None]

jsonrpc: Literal["2.0"]


class ParamsCreateTaskRequest(TypedDict, total=False):
name: Optional[str]
"""The name of the task to create"""

params: Optional[Dict[str, object]]
"""The parameters for the task"""


class CancelTaskRequest(TypedDict, total=False):
class ParamsCancelTaskRequest(TypedDict, total=False):
task_id: Optional[str]
"""The ID of the task to cancel. Either this or task_name must be provided."""

task_name: Optional[str]
"""The name of the task to cancel. Either this or task_id must be provided."""


class SendMessageRequest(TypedDict, total=False):
class ParamsSendMessageRequest(TypedDict, total=False):
content: Required[TaskMessageContentParam]
"""The message that was sent to the agent"""

Expand All @@ -37,7 +55,7 @@ class SendMessageRequest(TypedDict, total=False):
"""The ID of the task that the message was sent to"""


class SendEventRequest(TypedDict, total=False):
class ParamsSendEventRequest(TypedDict, total=False):
content: Optional[TaskMessageContentParam]
"""The content to send to the event"""

Expand All @@ -48,4 +66,6 @@ class SendEventRequest(TypedDict, total=False):
"""The name of the task that the event was sent to"""


AgentRpcParams: TypeAlias = Union[CreateTaskRequest, CancelTaskRequest, SendMessageRequest, SendEventRequest]
Params: TypeAlias = Union[
ParamsCreateTaskRequest, ParamsCancelTaskRequest, ParamsSendMessageRequest, ParamsSendEventRequest
]
21 changes: 0 additions & 21 deletions src/agentex/types/agent_rpc_params1.py

This file was deleted.

Loading