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
5 changes: 5 additions & 0 deletions src/runloop_api_client/sdk/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from ..types import (
InputContext,
ScenarioView,
AxonListParams,
AgentListParams,
AxonCreateParams,
DevboxListParams,
Expand Down Expand Up @@ -190,6 +191,10 @@ class SDKAgentListParams(AgentListParams, BaseRequestOptions):
pass


class SDKAxonListParams(AxonListParams, BaseRequestOptions):
pass


class SDKAxonCreateParams(AxonCreateParams, LongRequestOptions):
pass

Expand Down
12 changes: 9 additions & 3 deletions src/runloop_api_client/sdk/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import httpx

from ._types import (
SDKAxonListParams,
BaseRequestOptions,
LongRequestOptions,
SDKAgentListParams,
Expand Down Expand Up @@ -544,9 +545,14 @@ def from_id(self, axon_id: str) -> AsyncAxon:
"""Get an AsyncAxon instance for an existing axon ID."""
return AsyncAxon(self._client, axon_id)

async def list(self, **options: Unpack[BaseRequestOptions]) -> list[AsyncAxon]:
"""[Beta] List all active axons."""
result = await self._client.axons.list(**options)
async def list(self, **params: Unpack[SDKAxonListParams]) -> list[AsyncAxon]:
"""[Beta] List all active axons.

:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAxonListParams` for available parameters
:return: Collection of axon wrappers
:rtype: list[AsyncAxon]
"""
result = await self._client.axons.list(**params)
return [AsyncAxon(self._client, axon.id) for axon in result.axons]


Expand Down
12 changes: 9 additions & 3 deletions src/runloop_api_client/sdk/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .axon import Axon
from .agent import Agent
from ._types import (
SDKAxonListParams,
BaseRequestOptions,
LongRequestOptions,
SDKAgentListParams,
Expand Down Expand Up @@ -539,9 +540,14 @@ def from_id(self, axon_id: str) -> Axon:
"""Get an Axon instance for an existing axon ID."""
return Axon(self._client, axon_id)

def list(self, **options: Unpack[BaseRequestOptions]) -> list[Axon]:
"""[Beta] List all active axons."""
result = self._client.axons.list(**options)
def list(self, **params: Unpack[SDKAxonListParams]) -> list[Axon]:
"""[Beta] List all active axons.

:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAxonListParams` for available parameters
:return: Collection of axon wrappers
:rtype: list[Axon]
"""
result = self._client.axons.list(**params)
return [Axon(self._client, axon.id) for axon in result.axons]


Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.