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 @@ -19,6 +19,7 @@
McpConfigListParams,
ObjectDownloadParams,
ScenarioUpdateParams,
AgentListPublicParams,
BenchmarkCreateParams,
BenchmarkUpdateParams,
BlueprintCreateParams,
Expand Down Expand Up @@ -191,6 +192,10 @@ class SDKAgentListParams(AgentListParams, BaseRequestOptions):
pass


class SDKAgentListPublicParams(AgentListPublicParams, BaseRequestOptions):
pass


class SDKAxonListParams(AxonListParams, BaseRequestOptions):
pass

Expand Down
16 changes: 16 additions & 0 deletions src/runloop_api_client/sdk/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from ._types import (
BaseRequestOptions,
LongRequestOptions,
)
from .._client import Runloop
from ..types.agent_view import AgentView
Expand Down Expand Up @@ -68,3 +69,18 @@ def get_info(
self._id,
**options,
)

def delete(
self,
**options: Unpack[LongRequestOptions],
) -> object:
"""Delete this agent. This action is irreversible.

:param options: Optional request configuration
:return: API response acknowledging deletion
:rtype: object
"""
return self._client.agents.delete(
self._id,
**options,
)
33 changes: 32 additions & 1 deletion src/runloop_api_client/sdk/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import asyncio
from typing import Dict, Mapping, Optional
from typing import Dict, List, Mapping, Optional
from pathlib import Path
from datetime import timedelta
from typing_extensions import Unpack
Expand All @@ -27,6 +27,7 @@
SDKBenchmarkListParams,
SDKBlueprintListParams,
SDKMcpConfigListParams,
SDKAgentListPublicParams,
SDKBenchmarkCreateParams,
SDKBlueprintCreateParams,
SDKMcpConfigCreateParams,
Expand Down Expand Up @@ -57,6 +58,7 @@
from .async_storage_object import AsyncStorageObject
from .async_scenario_builder import AsyncScenarioBuilder
from ..types.object_create_params import ContentType
from ..types.agent_devbox_counts_view import AgentDevboxCountsView
from ..types.shared_params.agent_source import Git, Npm, Pip, Object


Expand Down Expand Up @@ -805,6 +807,35 @@ async def list(
)
return [AsyncAgent(self._client, item.id, item) for item in page.agents]

async def list_public(
self,
**params: Unpack[SDKAgentListPublicParams],
) -> List[AsyncAgent]:
"""List public agents.

:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAgentListPublicParams` for available parameters
:return: Collection of public agent wrappers
:rtype: list[AsyncAgent]
"""
page = await self._client.agents.list_public(
**params,
)
return [AsyncAgent(self._client, item.id, item) for item in page.agents]

async def devbox_counts(
self,
**options: Unpack[BaseRequestOptions],
) -> AgentDevboxCountsView:
"""Get devbox counts grouped by agent name.

:param options: Optional request configuration
:return: Devbox counts per agent name and total
:rtype: AgentDevboxCountsView
"""
return await self._client.agents.devbox_counts(
**options,
)


class AsyncScenarioOps:
"""Manage scenarios (async). Access via ``runloop.scenario``.
Expand Down
16 changes: 16 additions & 0 deletions src/runloop_api_client/sdk/async_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from ._types import (
BaseRequestOptions,
LongRequestOptions,
)
from .._client import AsyncRunloop
from ..types.agent_view import AgentView
Expand Down Expand Up @@ -68,3 +69,18 @@ async def get_info(
self._id,
**options,
)

async def delete(
self,
**options: Unpack[LongRequestOptions],
) -> object:
"""Delete this agent. This action is irreversible.

:param options: Optional request configuration
:return: API response acknowledging deletion
:rtype: object
"""
return await self._client.agents.delete(
self._id,
**options,
)
33 changes: 32 additions & 1 deletion src/runloop_api_client/sdk/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, Mapping, Optional
from typing import Dict, List, Mapping, Optional
from pathlib import Path
from datetime import timedelta
from typing_extensions import Unpack
Expand All @@ -28,6 +28,7 @@
SDKBenchmarkListParams,
SDKBlueprintListParams,
SDKMcpConfigListParams,
SDKAgentListPublicParams,
SDKBenchmarkCreateParams,
SDKBlueprintCreateParams,
SDKMcpConfigCreateParams,
Expand Down Expand Up @@ -56,6 +57,7 @@
from ..types.secret_view import SecretView
from ..lib.context_loader import TarFilter, build_directory_tar
from ..types.object_create_params import ContentType
from ..types.agent_devbox_counts_view import AgentDevboxCountsView
from ..types.shared_params.agent_source import Git, Npm, Pip, Object


Expand Down Expand Up @@ -830,6 +832,35 @@ def list(
)
return [Agent(self._client, item.id, item) for item in page.agents]

def list_public(
self,
**params: Unpack[SDKAgentListPublicParams],
) -> List[Agent]:
"""List public agents.

:param params: See :typeddict:`~runloop_api_client.sdk._types.SDKAgentListPublicParams` for available parameters
:return: Collection of public agent wrappers
:rtype: list[Agent]
"""
page = self._client.agents.list_public(
**params,
)
return [Agent(self._client, item.id, item) for item in page.agents]

def devbox_counts(
self,
**options: Unpack[BaseRequestOptions],
) -> AgentDevboxCountsView:
"""Get devbox counts grouped by agent name.

:param options: Optional request configuration
:return: Devbox counts per agent name and total
:rtype: AgentDevboxCountsView
"""
return self._client.agents.devbox_counts(
**options,
)


class ScenarioOps:
"""Manage scenarios. Access via ``runloop.scenario``.
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.