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

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithsandbox_sandboxSandboxread
Method●Since v0.6

read

Read a file from the sandbox.

Copy
read(
  self,
  path: str,
  *,
  timeout: int = 60,
  headers: RequestHeaders = None
) -> bytes

Parameters

NameTypeDescription
path*str

File path to read. Supports both absolute paths (e.g., /tmp/file.txt) and relative paths (resolved from /home/user/).

timeoutint
Default:60

Request timeout in seconds.

View source on GitHub