LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithresourcessandboxescommand_historyCommandHistoryResource
Class●Since v0.16

CommandHistoryResource

Copy
CommandHistoryResource(
    self,
    client: Langsmith,
)

Bases

SyncAPIResource

Methods

View source on GitHub
method
with_raw_response
method
with_streaming_response
method
retrieve
method
query
method
retrieve_output

This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.

For more information, see https://www.github.com/langchain-ai/langsmith-python#accessing-raw-response-data-eg-headers

An alternative to .with_raw_response that doesn't eagerly read the response body.

For more information, see https://www.github.com/langchain-ai/langsmith-python#with_streaming_response

Beta: these log reads may change in incompatible ways before general availability. Return metadata for one retained Execute API command. History remains readable while the sandbox is stopped. Access requires the sandbox creator or sandboxes:exec. Capture and retention may be incomplete; UNKNOWN status has no known exit result.

GET with body payload — no resources created.

Returns the commands matching the query passed as the request payload: retained Execute API commands, newest first. Beta: these log reads may change in incompatible ways before general availability. A cursor continues the first page's listing; even a short or empty page may return next_cursor. Continue until next_cursor is null. cursor and since are mutually exclusive. Every response carries a tail_cursor; a request with since set to it returns the commands that started or changed since, with tail_overflow when more changed than page_size; reload the first page when tail_overflow is true. History remains readable while the sandbox is stopped. Access requires the sandbox creator or sandboxes:exec. Capture and retention may be incomplete; UNKNOWN status has no known exit result.

Beta: these log reads may change in incompatible ways before general availability. Return retained stdout and stderr with timing spans, continuing from an opaque byte-position cursor. Each stream's data is base64-encoded arbitrary bytes; offsets and sizes refer to decoded bytes. Events describe spans within those bytes, with optional observation timestamps in Unix microseconds. A truncated stream may skip bytes. is_eof describes the current captured output, not command completion; more output may arrive later. Output remains readable while the sandbox is stopped. Access requires the sandbox creator or sandboxes:exec.