archastro.platform.v1.resources.trajectories

 1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: 6b286ca5ccb1
 4
 5from __future__ import annotations
 6
 7from ...runtime.http_client import HttpClient, SyncHttpClient
 8from ...types.common import Trajectory
 9
10
11class AsyncTrajectoryResource:
12    def __init__(self, http: HttpClient):
13        self._http = http
14
15    async def get(self, trajectory: str) -> Trajectory:
16        """
17        Retrieve a trajectory
18        Returns the AI trajectory identified by `trajectory`. A trajectory captures
19        the model's full reasoning steps, messages, and metadata for a single AI
20        invocation, including references to the associated team, organization, sandbox,
21        and storage file when present.
22        The authenticated user must have access to the trajectory. Trajectories are
23        scoped to the workspace of the requesting user; attempting to access a
24        trajectory outside that scope returns 404.
25
26        Args:
27            trajectory: Trajectory ID (`trj_...`) of the trajectory to retrieve.
28
29        Returns:
30            The requested trajectory object.
31        """
32        return await self._http.request(
33            f"/api/v1/trajectories/{trajectory}",
34            response_type=Trajectory,
35        )
36
37    async def contents(self, trajectory: str) -> dict[str, str]:
38        """
39        Retrieve raw trajectory contents
40        Returns the raw JSON contents of the trajectory identified by `trajectory`.
41        The response body is the trajectory's stored content blob rendered directly
42        as `application/json`, bypassing the standard schema serialization used by
43        the Show endpoint.
44        Use this endpoint when you need the unprocessed trajectory data for example,
45        to replay or inspect model reasoning steps in full fidelity (eval grading).
46        The authenticated user must have access to the trajectory; trajectories
47        outside the caller's workspace scope return 404.
48
49        Args:
50            trajectory: Trajectory ID (`trj_...`) whose raw contents to retrieve.
51
52        Returns:
53            Raw trajectory JSON blob. The `Content-Type` header is `application/json`.
54        """
55        return await self._http.request_raw(f"/api/v1/trajectories/{trajectory}/contents")
56
57
58class TrajectoryResource:
59    def __init__(self, http: SyncHttpClient):
60        self._http = http
61
62    def get(self, trajectory: str) -> Trajectory:
63        """
64        Retrieve a trajectory
65        Returns the AI trajectory identified by `trajectory`. A trajectory captures
66        the model's full reasoning steps, messages, and metadata for a single AI
67        invocation, including references to the associated team, organization, sandbox,
68        and storage file when present.
69        The authenticated user must have access to the trajectory. Trajectories are
70        scoped to the workspace of the requesting user; attempting to access a
71        trajectory outside that scope returns 404.
72
73        Args:
74            trajectory: Trajectory ID (`trj_...`) of the trajectory to retrieve.
75
76        Returns:
77            The requested trajectory object.
78        """
79        return self._http.request(f"/api/v1/trajectories/{trajectory}", response_type=Trajectory)
80
81    def contents(self, trajectory: str) -> dict[str, str]:
82        """
83        Retrieve raw trajectory contents
84        Returns the raw JSON contents of the trajectory identified by `trajectory`.
85        The response body is the trajectory's stored content blob rendered directly
86        as `application/json`, bypassing the standard schema serialization used by
87        the Show endpoint.
88        Use this endpoint when you need the unprocessed trajectory data for example,
89        to replay or inspect model reasoning steps in full fidelity (eval grading).
90        The authenticated user must have access to the trajectory; trajectories
91        outside the caller's workspace scope return 404.
92
93        Args:
94            trajectory: Trajectory ID (`trj_...`) whose raw contents to retrieve.
95
96        Returns:
97            Raw trajectory JSON blob. The `Content-Type` header is `application/json`.
98        """
99        return self._http.request_raw(f"/api/v1/trajectories/{trajectory}/contents")
class AsyncTrajectoryResource:
12class AsyncTrajectoryResource:
13    def __init__(self, http: HttpClient):
14        self._http = http
15
16    async def get(self, trajectory: str) -> Trajectory:
17        """
18        Retrieve a trajectory
19        Returns the AI trajectory identified by `trajectory`. A trajectory captures
20        the model's full reasoning steps, messages, and metadata for a single AI
21        invocation, including references to the associated team, organization, sandbox,
22        and storage file when present.
23        The authenticated user must have access to the trajectory. Trajectories are
24        scoped to the workspace of the requesting user; attempting to access a
25        trajectory outside that scope returns 404.
26
27        Args:
28            trajectory: Trajectory ID (`trj_...`) of the trajectory to retrieve.
29
30        Returns:
31            The requested trajectory object.
32        """
33        return await self._http.request(
34            f"/api/v1/trajectories/{trajectory}",
35            response_type=Trajectory,
36        )
37
38    async def contents(self, trajectory: str) -> dict[str, str]:
39        """
40        Retrieve raw trajectory contents
41        Returns the raw JSON contents of the trajectory identified by `trajectory`.
42        The response body is the trajectory's stored content blob rendered directly
43        as `application/json`, bypassing the standard schema serialization used by
44        the Show endpoint.
45        Use this endpoint when you need the unprocessed trajectory data for example,
46        to replay or inspect model reasoning steps in full fidelity (eval grading).
47        The authenticated user must have access to the trajectory; trajectories
48        outside the caller's workspace scope return 404.
49
50        Args:
51            trajectory: Trajectory ID (`trj_...`) whose raw contents to retrieve.
52
53        Returns:
54            Raw trajectory JSON blob. The `Content-Type` header is `application/json`.
55        """
56        return await self._http.request_raw(f"/api/v1/trajectories/{trajectory}/contents")
AsyncTrajectoryResource(http: archastro.platform.runtime.http_client.HttpClient)
13    def __init__(self, http: HttpClient):
14        self._http = http
async def get(self, trajectory: str) -> archastro.platform.types.common.Trajectory:
16    async def get(self, trajectory: str) -> Trajectory:
17        """
18        Retrieve a trajectory
19        Returns the AI trajectory identified by `trajectory`. A trajectory captures
20        the model's full reasoning steps, messages, and metadata for a single AI
21        invocation, including references to the associated team, organization, sandbox,
22        and storage file when present.
23        The authenticated user must have access to the trajectory. Trajectories are
24        scoped to the workspace of the requesting user; attempting to access a
25        trajectory outside that scope returns 404.
26
27        Args:
28            trajectory: Trajectory ID (`trj_...`) of the trajectory to retrieve.
29
30        Returns:
31            The requested trajectory object.
32        """
33        return await self._http.request(
34            f"/api/v1/trajectories/{trajectory}",
35            response_type=Trajectory,
36        )

Retrieve a trajectory Returns the AI trajectory identified by trajectory. A trajectory captures the model's full reasoning steps, messages, and metadata for a single AI invocation, including references to the associated team, organization, sandbox, and storage file when present. The authenticated user must have access to the trajectory. Trajectories are scoped to the workspace of the requesting user; attempting to access a trajectory outside that scope returns 404.

Arguments:
  • trajectory: Trajectory ID (trj_...) of the trajectory to retrieve.
Returns:

The requested trajectory object.

async def contents(self, trajectory: str) -> dict[str, str]:
38    async def contents(self, trajectory: str) -> dict[str, str]:
39        """
40        Retrieve raw trajectory contents
41        Returns the raw JSON contents of the trajectory identified by `trajectory`.
42        The response body is the trajectory's stored content blob rendered directly
43        as `application/json`, bypassing the standard schema serialization used by
44        the Show endpoint.
45        Use this endpoint when you need the unprocessed trajectory data for example,
46        to replay or inspect model reasoning steps in full fidelity (eval grading).
47        The authenticated user must have access to the trajectory; trajectories
48        outside the caller's workspace scope return 404.
49
50        Args:
51            trajectory: Trajectory ID (`trj_...`) whose raw contents to retrieve.
52
53        Returns:
54            Raw trajectory JSON blob. The `Content-Type` header is `application/json`.
55        """
56        return await self._http.request_raw(f"/api/v1/trajectories/{trajectory}/contents")

Retrieve raw trajectory contents Returns the raw JSON contents of the trajectory identified by trajectory. The response body is the trajectory's stored content blob rendered directly as application/json, bypassing the standard schema serialization used by the Show endpoint. Use this endpoint when you need the unprocessed trajectory data for example, to replay or inspect model reasoning steps in full fidelity (eval grading). The authenticated user must have access to the trajectory; trajectories outside the caller's workspace scope return 404.

Arguments:
  • trajectory: Trajectory ID (trj_...) whose raw contents to retrieve.
Returns:

Raw trajectory JSON blob. The Content-Type header is application/json.

class TrajectoryResource:
 59class TrajectoryResource:
 60    def __init__(self, http: SyncHttpClient):
 61        self._http = http
 62
 63    def get(self, trajectory: str) -> Trajectory:
 64        """
 65        Retrieve a trajectory
 66        Returns the AI trajectory identified by `trajectory`. A trajectory captures
 67        the model's full reasoning steps, messages, and metadata for a single AI
 68        invocation, including references to the associated team, organization, sandbox,
 69        and storage file when present.
 70        The authenticated user must have access to the trajectory. Trajectories are
 71        scoped to the workspace of the requesting user; attempting to access a
 72        trajectory outside that scope returns 404.
 73
 74        Args:
 75            trajectory: Trajectory ID (`trj_...`) of the trajectory to retrieve.
 76
 77        Returns:
 78            The requested trajectory object.
 79        """
 80        return self._http.request(f"/api/v1/trajectories/{trajectory}", response_type=Trajectory)
 81
 82    def contents(self, trajectory: str) -> dict[str, str]:
 83        """
 84        Retrieve raw trajectory contents
 85        Returns the raw JSON contents of the trajectory identified by `trajectory`.
 86        The response body is the trajectory's stored content blob rendered directly
 87        as `application/json`, bypassing the standard schema serialization used by
 88        the Show endpoint.
 89        Use this endpoint when you need the unprocessed trajectory data for example,
 90        to replay or inspect model reasoning steps in full fidelity (eval grading).
 91        The authenticated user must have access to the trajectory; trajectories
 92        outside the caller's workspace scope return 404.
 93
 94        Args:
 95            trajectory: Trajectory ID (`trj_...`) whose raw contents to retrieve.
 96
 97        Returns:
 98            Raw trajectory JSON blob. The `Content-Type` header is `application/json`.
 99        """
100        return self._http.request_raw(f"/api/v1/trajectories/{trajectory}/contents")
TrajectoryResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
60    def __init__(self, http: SyncHttpClient):
61        self._http = http
def get(self, trajectory: str) -> archastro.platform.types.common.Trajectory:
63    def get(self, trajectory: str) -> Trajectory:
64        """
65        Retrieve a trajectory
66        Returns the AI trajectory identified by `trajectory`. A trajectory captures
67        the model's full reasoning steps, messages, and metadata for a single AI
68        invocation, including references to the associated team, organization, sandbox,
69        and storage file when present.
70        The authenticated user must have access to the trajectory. Trajectories are
71        scoped to the workspace of the requesting user; attempting to access a
72        trajectory outside that scope returns 404.
73
74        Args:
75            trajectory: Trajectory ID (`trj_...`) of the trajectory to retrieve.
76
77        Returns:
78            The requested trajectory object.
79        """
80        return self._http.request(f"/api/v1/trajectories/{trajectory}", response_type=Trajectory)

Retrieve a trajectory Returns the AI trajectory identified by trajectory. A trajectory captures the model's full reasoning steps, messages, and metadata for a single AI invocation, including references to the associated team, organization, sandbox, and storage file when present. The authenticated user must have access to the trajectory. Trajectories are scoped to the workspace of the requesting user; attempting to access a trajectory outside that scope returns 404.

Arguments:
  • trajectory: Trajectory ID (trj_...) of the trajectory to retrieve.
Returns:

The requested trajectory object.

def contents(self, trajectory: str) -> dict[str, str]:
 82    def contents(self, trajectory: str) -> dict[str, str]:
 83        """
 84        Retrieve raw trajectory contents
 85        Returns the raw JSON contents of the trajectory identified by `trajectory`.
 86        The response body is the trajectory's stored content blob rendered directly
 87        as `application/json`, bypassing the standard schema serialization used by
 88        the Show endpoint.
 89        Use this endpoint when you need the unprocessed trajectory data for example,
 90        to replay or inspect model reasoning steps in full fidelity (eval grading).
 91        The authenticated user must have access to the trajectory; trajectories
 92        outside the caller's workspace scope return 404.
 93
 94        Args:
 95            trajectory: Trajectory ID (`trj_...`) whose raw contents to retrieve.
 96
 97        Returns:
 98            Raw trajectory JSON blob. The `Content-Type` header is `application/json`.
 99        """
100        return self._http.request_raw(f"/api/v1/trajectories/{trajectory}/contents")

Retrieve raw trajectory contents Returns the raw JSON contents of the trajectory identified by trajectory. The response body is the trajectory's stored content blob rendered directly as application/json, bypassing the standard schema serialization used by the Show endpoint. Use this endpoint when you need the unprocessed trajectory data for example, to replay or inspect model reasoning steps in full fidelity (eval grading). The authenticated user must have access to the trajectory; trajectories outside the caller's workspace scope return 404.

Arguments:
  • trajectory: Trajectory ID (trj_...) whose raw contents to retrieve.
Returns:

Raw trajectory JSON blob. The Content-Type header is application/json.