Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Retrieve Trace For Step

steps.trace.retrieve(strstep_id) -> ProviderTrace
get/v1/steps/{step_id}/trace

Retrieve Trace For Step

ParametersExpand Collapse
step_id: str

The ID of the step in the format 'step-'

minLength41
maxLength41
ReturnsExpand Collapse
class ProviderTrace:

Letta's internal representation of a provider trace.

Attributes: id (str): The unique identifier of the provider trace. request_json (Dict[str, Any]): JSON content of the provider request. response_json (Dict[str, Any]): JSON content of the provider response. step_id (str): ID of the step that this trace is associated with. organization_id (str): The unique identifier of the organization. created_at (datetime): The timestamp when the object was created.

request_json: Dict[str, object]

JSON content of the provider request

response_json: Dict[str, object]

JSON content of the provider response

id: Optional[str]

The human-friendly ID of the Provider_trace

created_at: Optional[datetime]

The timestamp when the object was created.

formatdate-time
created_by_id: Optional[str]

The id of the user that made this object.

last_updated_by_id: Optional[str]

The id of the user that made this object.

step_id: Optional[str]

ID of the step that this trace is associated with

updated_at: Optional[datetime]

The timestamp when the object was last updated.

formatdate-time
Retrieve Trace For Step
from letta_client import Letta

client = Letta(
    api_key="My API Key",
)
provider_trace = client.steps.trace.retrieve(
    "step-123e4567-e89b-42d3-8456-426614174000",
)
print(provider_trace.id)
{
  "request_json": {
    "foo": "bar"
  },
  "response_json": {
    "foo": "bar"
  },
  "id": "provider_trace-123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by_id": "created_by_id",
  "last_updated_by_id": "last_updated_by_id",
  "step_id": "step_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "request_json": {
    "foo": "bar"
  },
  "response_json": {
    "foo": "bar"
  },
  "id": "provider_trace-123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by_id": "created_by_id",
  "last_updated_by_id": "last_updated_by_id",
  "step_id": "step_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}