LettaAPI.Api.Steps (letta_api v1.0.0)

API calls for all endpoints tagged Steps.

Summary

Functions

List Steps List steps with optional pagination and date filters. Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)

Retrieve Step Get a step by ID.

Update Step Transaction Id Update the transaction ID for a step.

Functions

list_steps(connection, opts \\ [])

@spec list_steps(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, [LettaAPI.Model.Step.t()]}
  | {:ok, LettaAPI.Model.HttpValidationError.t()}
  | {:error, Tesla.Env.t()}

List Steps List steps with optional pagination and date filters. Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :before (String.t): Return steps before this step ID
    • :after (String.t): Return steps after this step ID
    • :limit (integer()): Maximum number of steps to return
    • :order (String.t): Sort order (asc or desc)
    • :start_date (String.t): Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
    • :end_date (String.t): Return steps before this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
    • :model (String.t): Filter by the name of the model used for the step
    • :agent_id (String.t): Filter by the ID of the agent that performed the step
    • :user_id (String.t):

Returns

  • {:ok, [%Step{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

retrieve_step(connection, step_id, opts \\ [])

@spec retrieve_step(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, LettaAPI.Model.HttpValidationError.t()}
  | {:ok, LettaAPI.Model.Step.t()}
  | {:error, Tesla.Env.t()}

Retrieve Step Get a step by ID.

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • step_id (String.t):
  • opts (keyword): Optional parameters
    • :user_id (String.t):

Returns

  • {:ok, LettaAPI.Model.Step.t} on success
  • {:error, Tesla.Env.t} on failure

update_step_transaction_id(connection, step_id, transaction_id, opts \\ [])

@spec update_step_transaction_id(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, LettaAPI.Model.HttpValidationError.t()}
  | {:ok, LettaAPI.Model.Step.t()}
  | {:error, Tesla.Env.t()}

Update Step Transaction Id Update the transaction ID for a step.

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • step_id (String.t):
  • transaction_id (String.t):
  • opts (keyword): Optional parameters
    • :user_id (String.t):

Returns

  • {:ok, LettaAPI.Model.Step.t} on success
  • {:error, Tesla.Env.t} on failure