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_historyAsyncCommandHistoryResourceretrieve_output
Method●Since v0.16

retrieve_output

Copy
retrieve_output(
  self,
  command_id: str,
  *,
  sandbox_id: str,
  cursor: str
View source on GitHub
|
Omit
=
omit
,
max_bytes_per_stream
:
int
|
Omit
=
omit
,
max_events_per_stream
:
int
|
Omit
=
omit
,
extra_headers
:
Headers
|
None
=
None
,
extra_query
:
Query
|
None
=
None
,
extra_body
:
Body
|
None
=
None
,
timeout
:
float
|
httpx
.
Timeout
|
None
|
NotGiven
=
not_given
)
->
CommandHistoryRetrieveOutputResponse

Parameters

NameTypeDescription
cursorstr | Omit
Default:omit

Output continuation cursor; omit to start at the beginning

max_bytes_per_streamint | Omit
Default:omit

Maximum bytes returned per stream

max_events_per_streamint | Omit
Default:omit
extra_headersHeaders | None
Default:None
extra_queryQuery | None
Default:None
extra_bodyBody | None
Default:None
timeoutfloat | httpx.Timeout | None | NotGiven
Default:not_given

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.

Maximum timing spans per stream

Send extra headers

Add additional query parameters to the request

Add additional JSON properties to the request

Override the client-level default timeout for this request, in seconds