archastro.platform.v1.resources.agent_routine_runs

  1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
  2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
  3# Content hash: 3e91531f101a
  4
  5from __future__ import annotations
  6
  7import builtins
  8
  9from ...runtime.http_client import HttpClient, SyncHttpClient
 10from ...types.common import AgentRoutineRunListResponse
 11
 12
 13class AsyncAgentRoutineRunResource:
 14    def __init__(self, http: HttpClient):
 15        self._http = http
 16
 17    async def list(
 18        self,
 19        *,
 20        agent: builtins.list[str] | None = None,
 21        status: str | None = None,
 22        limit: int | None = None,
 23        before_cursor: str | None = None,
 24        after_cursor: str | None = None,
 25    ) -> AgentRoutineRunListResponse:
 26        """
 27        List agent routine runs
 28        Returns a paginated list of agent routine runs across all routines visible to
 29        the authenticated app scope. Results are ordered by creation time descending
 30        (most recent first).
 31        Use the `agent` parameter to filter runs to one or more specific agents. Use
 32        `status` to narrow results to runs in a particular state. Pagination is
 33        bidirectional: supply `after_cursor` to page forward through newer runs or
 34        `before_cursor` to page backward through older runs.
 35        This endpoint requires an app scope. Requests without a valid app credential
 36        return 403.
 37
 38        Args:
 39            agent: Filter by one or more agent IDs (`agi_...`) or `lookup_key` values. Repeat the parameter (e.g. `?agent[]=agi_a&agent[]=agi_b`) to OR multiple agents. Omit to return runs for all agents.
 40            status: Filter by run status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. Omit to return runs in any status.
 41            limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
 42            before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns the page of runs older than that cursor position.
 43            after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns the page of runs newer than that cursor position.
 44
 45        Returns:
 46            Paginated list of agent routine runs.
 47        """
 48        query: dict[str, object] = {}
 49        if agent is not None:
 50            query["agent"] = agent
 51        if status is not None:
 52            query["status"] = status
 53        if limit is not None:
 54            query["limit"] = limit
 55        if before_cursor is not None:
 56            query["before_cursor"] = before_cursor
 57        if after_cursor is not None:
 58            query["after_cursor"] = after_cursor
 59        return await self._http.request(
 60            "/api/v1/agent_routine_runs",
 61            query=query,
 62            response_type=AgentRoutineRunListResponse,
 63        )
 64
 65
 66class AgentRoutineRunResource:
 67    def __init__(self, http: SyncHttpClient):
 68        self._http = http
 69
 70    def list(
 71        self,
 72        *,
 73        agent: builtins.list[str] | None = None,
 74        status: str | None = None,
 75        limit: int | None = None,
 76        before_cursor: str | None = None,
 77        after_cursor: str | None = None,
 78    ) -> AgentRoutineRunListResponse:
 79        """
 80        List agent routine runs
 81        Returns a paginated list of agent routine runs across all routines visible to
 82        the authenticated app scope. Results are ordered by creation time descending
 83        (most recent first).
 84        Use the `agent` parameter to filter runs to one or more specific agents. Use
 85        `status` to narrow results to runs in a particular state. Pagination is
 86        bidirectional: supply `after_cursor` to page forward through newer runs or
 87        `before_cursor` to page backward through older runs.
 88        This endpoint requires an app scope. Requests without a valid app credential
 89        return 403.
 90
 91        Args:
 92            agent: Filter by one or more agent IDs (`agi_...`) or `lookup_key` values. Repeat the parameter (e.g. `?agent[]=agi_a&agent[]=agi_b`) to OR multiple agents. Omit to return runs for all agents.
 93            status: Filter by run status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. Omit to return runs in any status.
 94            limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
 95            before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns the page of runs older than that cursor position.
 96            after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns the page of runs newer than that cursor position.
 97
 98        Returns:
 99            Paginated list of agent routine runs.
100        """
101        query: dict[str, object] = {}
102        if agent is not None:
103            query["agent"] = agent
104        if status is not None:
105            query["status"] = status
106        if limit is not None:
107            query["limit"] = limit
108        if before_cursor is not None:
109            query["before_cursor"] = before_cursor
110        if after_cursor is not None:
111            query["after_cursor"] = after_cursor
112        return self._http.request(
113            "/api/v1/agent_routine_runs",
114            query=query,
115            response_type=AgentRoutineRunListResponse,
116        )
class AsyncAgentRoutineRunResource:
14class AsyncAgentRoutineRunResource:
15    def __init__(self, http: HttpClient):
16        self._http = http
17
18    async def list(
19        self,
20        *,
21        agent: builtins.list[str] | None = None,
22        status: str | None = None,
23        limit: int | None = None,
24        before_cursor: str | None = None,
25        after_cursor: str | None = None,
26    ) -> AgentRoutineRunListResponse:
27        """
28        List agent routine runs
29        Returns a paginated list of agent routine runs across all routines visible to
30        the authenticated app scope. Results are ordered by creation time descending
31        (most recent first).
32        Use the `agent` parameter to filter runs to one or more specific agents. Use
33        `status` to narrow results to runs in a particular state. Pagination is
34        bidirectional: supply `after_cursor` to page forward through newer runs or
35        `before_cursor` to page backward through older runs.
36        This endpoint requires an app scope. Requests without a valid app credential
37        return 403.
38
39        Args:
40            agent: Filter by one or more agent IDs (`agi_...`) or `lookup_key` values. Repeat the parameter (e.g. `?agent[]=agi_a&agent[]=agi_b`) to OR multiple agents. Omit to return runs for all agents.
41            status: Filter by run status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. Omit to return runs in any status.
42            limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
43            before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns the page of runs older than that cursor position.
44            after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns the page of runs newer than that cursor position.
45
46        Returns:
47            Paginated list of agent routine runs.
48        """
49        query: dict[str, object] = {}
50        if agent is not None:
51            query["agent"] = agent
52        if status is not None:
53            query["status"] = status
54        if limit is not None:
55            query["limit"] = limit
56        if before_cursor is not None:
57            query["before_cursor"] = before_cursor
58        if after_cursor is not None:
59            query["after_cursor"] = after_cursor
60        return await self._http.request(
61            "/api/v1/agent_routine_runs",
62            query=query,
63            response_type=AgentRoutineRunListResponse,
64        )
AsyncAgentRoutineRunResource(http: archastro.platform.runtime.http_client.HttpClient)
15    def __init__(self, http: HttpClient):
16        self._http = http
async def list( self, *, agent: list[str] | None = None, status: str | None = None, limit: int | None = None, before_cursor: str | None = None, after_cursor: str | None = None) -> archastro.platform.types.common.AgentRoutineRunListResponse:
18    async def list(
19        self,
20        *,
21        agent: builtins.list[str] | None = None,
22        status: str | None = None,
23        limit: int | None = None,
24        before_cursor: str | None = None,
25        after_cursor: str | None = None,
26    ) -> AgentRoutineRunListResponse:
27        """
28        List agent routine runs
29        Returns a paginated list of agent routine runs across all routines visible to
30        the authenticated app scope. Results are ordered by creation time descending
31        (most recent first).
32        Use the `agent` parameter to filter runs to one or more specific agents. Use
33        `status` to narrow results to runs in a particular state. Pagination is
34        bidirectional: supply `after_cursor` to page forward through newer runs or
35        `before_cursor` to page backward through older runs.
36        This endpoint requires an app scope. Requests without a valid app credential
37        return 403.
38
39        Args:
40            agent: Filter by one or more agent IDs (`agi_...`) or `lookup_key` values. Repeat the parameter (e.g. `?agent[]=agi_a&agent[]=agi_b`) to OR multiple agents. Omit to return runs for all agents.
41            status: Filter by run status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. Omit to return runs in any status.
42            limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
43            before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns the page of runs older than that cursor position.
44            after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns the page of runs newer than that cursor position.
45
46        Returns:
47            Paginated list of agent routine runs.
48        """
49        query: dict[str, object] = {}
50        if agent is not None:
51            query["agent"] = agent
52        if status is not None:
53            query["status"] = status
54        if limit is not None:
55            query["limit"] = limit
56        if before_cursor is not None:
57            query["before_cursor"] = before_cursor
58        if after_cursor is not None:
59            query["after_cursor"] = after_cursor
60        return await self._http.request(
61            "/api/v1/agent_routine_runs",
62            query=query,
63            response_type=AgentRoutineRunListResponse,
64        )

List agent routine runs Returns a paginated list of agent routine runs across all routines visible to the authenticated app scope. Results are ordered by creation time descending (most recent first). Use the agent parameter to filter runs to one or more specific agents. Use status to narrow results to runs in a particular state. Pagination is bidirectional: supply after_cursor to page forward through newer runs or before_cursor to page backward through older runs. This endpoint requires an app scope. Requests without a valid app credential return 403.

Arguments:
  • agent: Filter by one or more agent IDs (agi_...) or lookup_key values. Repeat the parameter (e.g. ?agent[]=agi_a&agent[]=agi_b) to OR multiple agents. Omit to return runs for all agents.
  • status: Filter by run status. One of "pending", "running", "completed", "failed", "skipped", or "cancelled". Omit to return runs in any status.
  • limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
  • before_cursor: Opaque cursor from a previous response's before_cursor field. Returns the page of runs older than that cursor position.
  • after_cursor: Opaque cursor from a previous response's after_cursor field. Returns the page of runs newer than that cursor position.
Returns:

Paginated list of agent routine runs.

class AgentRoutineRunResource:
 67class AgentRoutineRunResource:
 68    def __init__(self, http: SyncHttpClient):
 69        self._http = http
 70
 71    def list(
 72        self,
 73        *,
 74        agent: builtins.list[str] | None = None,
 75        status: str | None = None,
 76        limit: int | None = None,
 77        before_cursor: str | None = None,
 78        after_cursor: str | None = None,
 79    ) -> AgentRoutineRunListResponse:
 80        """
 81        List agent routine runs
 82        Returns a paginated list of agent routine runs across all routines visible to
 83        the authenticated app scope. Results are ordered by creation time descending
 84        (most recent first).
 85        Use the `agent` parameter to filter runs to one or more specific agents. Use
 86        `status` to narrow results to runs in a particular state. Pagination is
 87        bidirectional: supply `after_cursor` to page forward through newer runs or
 88        `before_cursor` to page backward through older runs.
 89        This endpoint requires an app scope. Requests without a valid app credential
 90        return 403.
 91
 92        Args:
 93            agent: Filter by one or more agent IDs (`agi_...`) or `lookup_key` values. Repeat the parameter (e.g. `?agent[]=agi_a&agent[]=agi_b`) to OR multiple agents. Omit to return runs for all agents.
 94            status: Filter by run status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. Omit to return runs in any status.
 95            limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
 96            before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns the page of runs older than that cursor position.
 97            after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns the page of runs newer than that cursor position.
 98
 99        Returns:
100            Paginated list of agent routine runs.
101        """
102        query: dict[str, object] = {}
103        if agent is not None:
104            query["agent"] = agent
105        if status is not None:
106            query["status"] = status
107        if limit is not None:
108            query["limit"] = limit
109        if before_cursor is not None:
110            query["before_cursor"] = before_cursor
111        if after_cursor is not None:
112            query["after_cursor"] = after_cursor
113        return self._http.request(
114            "/api/v1/agent_routine_runs",
115            query=query,
116            response_type=AgentRoutineRunListResponse,
117        )
AgentRoutineRunResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
68    def __init__(self, http: SyncHttpClient):
69        self._http = http
def list( self, *, agent: list[str] | None = None, status: str | None = None, limit: int | None = None, before_cursor: str | None = None, after_cursor: str | None = None) -> archastro.platform.types.common.AgentRoutineRunListResponse:
 71    def list(
 72        self,
 73        *,
 74        agent: builtins.list[str] | None = None,
 75        status: str | None = None,
 76        limit: int | None = None,
 77        before_cursor: str | None = None,
 78        after_cursor: str | None = None,
 79    ) -> AgentRoutineRunListResponse:
 80        """
 81        List agent routine runs
 82        Returns a paginated list of agent routine runs across all routines visible to
 83        the authenticated app scope. Results are ordered by creation time descending
 84        (most recent first).
 85        Use the `agent` parameter to filter runs to one or more specific agents. Use
 86        `status` to narrow results to runs in a particular state. Pagination is
 87        bidirectional: supply `after_cursor` to page forward through newer runs or
 88        `before_cursor` to page backward through older runs.
 89        This endpoint requires an app scope. Requests without a valid app credential
 90        return 403.
 91
 92        Args:
 93            agent: Filter by one or more agent IDs (`agi_...`) or `lookup_key` values. Repeat the parameter (e.g. `?agent[]=agi_a&agent[]=agi_b`) to OR multiple agents. Omit to return runs for all agents.
 94            status: Filter by run status. One of `"pending"`, `"running"`, `"completed"`, `"failed"`, `"skipped"`, or `"cancelled"`. Omit to return runs in any status.
 95            limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
 96            before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns the page of runs older than that cursor position.
 97            after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns the page of runs newer than that cursor position.
 98
 99        Returns:
100            Paginated list of agent routine runs.
101        """
102        query: dict[str, object] = {}
103        if agent is not None:
104            query["agent"] = agent
105        if status is not None:
106            query["status"] = status
107        if limit is not None:
108            query["limit"] = limit
109        if before_cursor is not None:
110            query["before_cursor"] = before_cursor
111        if after_cursor is not None:
112            query["after_cursor"] = after_cursor
113        return self._http.request(
114            "/api/v1/agent_routine_runs",
115            query=query,
116            response_type=AgentRoutineRunListResponse,
117        )

List agent routine runs Returns a paginated list of agent routine runs across all routines visible to the authenticated app scope. Results are ordered by creation time descending (most recent first). Use the agent parameter to filter runs to one or more specific agents. Use status to narrow results to runs in a particular state. Pagination is bidirectional: supply after_cursor to page forward through newer runs or before_cursor to page backward through older runs. This endpoint requires an app scope. Requests without a valid app credential return 403.

Arguments:
  • agent: Filter by one or more agent IDs (agi_...) or lookup_key values. Repeat the parameter (e.g. ?agent[]=agi_a&agent[]=agi_b) to OR multiple agents. Omit to return runs for all agents.
  • status: Filter by run status. One of "pending", "running", "completed", "failed", "skipped", or "cancelled". Omit to return runs in any status.
  • limit: Maximum number of runs to return. Defaults to 50; maximum is 100.
  • before_cursor: Opaque cursor from a previous response's before_cursor field. Returns the page of runs older than that cursor position.
  • after_cursor: Opaque cursor from a previous response's after_cursor field. Returns the page of runs newer than that cursor position.
Returns:

Paginated list of agent routine runs.