LangChain Daytona
Daytona sandbox backend integration for LangChain's Deep Agents harness
Repository Health
Technical Analysis
langchain-daytona is the official Daytona sandbox integration for Deep Agents, LangChain’s “batteries-included” agent harness. It provides DaytonaSandbox, a backend that implements Deep Agents’ SandboxBackendProtocol on top of a live Daytona cloud sandbox, letting agents execute shell commands and upload/download files in an isolated remote environment instead of the local filesystem.
The package is a thin adapter layer: it inherits file-operation methods from Deep Agents’ BaseSandbox and implements only the execute() method using Daytona’s API, with configurable command timeouts and sync-polling behavior for waiting on command completion. It’s intended for teams building agents that need to run untrusted or exploratory code (shell commands, scripts) in a sandboxed cloud environment rather than on the host running the agent.
What You Get
DaytonaSandboxbackend implementing Deep Agents’SandboxBackendProtocolfor remote, isolated command execution- Configurable command timeout and sync-polling-interval behavior (fixed delay or custom backoff callable) for waiting on Daytona command completion
- Inherited file upload/download operations from Deep Agents’
BaseSandbox, backed by Daytona’s file transfer API - A minimal, focused API surface — one class, one constructor, one
execute()implementation — for teams that just need a sandboxed backend
Common Use Cases
- Running an LLM agent’s shell/code-execution tool calls in an isolated cloud sandbox instead of the host machine
- Building a coding-assistant agent that needs to install dependencies and run scripts in a disposable environment
- Isolating untrusted or exploratory code execution requested by an agent from production infrastructure
- Swapping a local-filesystem Deep Agents backend for a remote sandboxed one without changing the rest of the agent’s tool logic
Under The Hood
Architecture: The package lives at libs/partners/daytona/ inside the langchain-ai/deepagents monorepo, alongside Deep Agents’ other partner-integration packages. Its only substantial module, langchain_daytona/sandbox.py (~200 lines), defines DaytonaSandbox, a subclass of deepagents.backends.sandbox.BaseSandbox that implements just the execute() method against the daytona SDK’s Sandbox/SessionExecuteRequest API, while inheriting file-transfer operations (FileUploadRequest/FileDownloadRequest) from the base class and deepagents.backends.protocol for its type contracts.
Tech Stack: Python (>=3.11,<4.0), packaged with hatchling, depending directly on deepagents>=0.6.12 (the parent framework) and the daytona SDK. Versioning and dependency locking follow the same conventions as the rest of the langchain-ai monorepo (uv.lock, shared Makefile targets).
Code Quality: 6 test files under tests/unit_tests and tests/integration_tests plus a dedicated test_import.py, consistent with LangChain’s standard partner-package test scaffolding. The package is small and single-purpose, which keeps its surface easy to review, and it’s maintained under the same CI/release pipeline as the fast-growing deepagents monorepo (26.5k+ stars, very active development per GitHub activity).
API Design: The integration is deliberately minimal — construct a Daytona sandbox, wrap it in DaytonaSandbox, and pass it to a Deep Agent as its execution backend; there is no additional configuration surface beyond timeout and polling behavior. This keeps the learning curve low for anyone already using Deep Agents, at the cost of Daytona-specific features not exposed through the shared backend protocol being unavailable through this wrapper.
Used by 2 apps in this directory
deepagents
AI Agents · AI Development
The batteries-included Python agent harness — planning, sub-agents, filesystem, shell, memory, and skills bundled in, built on LangGraph.
SurfSense
Search · AI Assistants
The open-source, unlimited NotebookLM alternative with real-time collaboration, a desktop app, and no vendor lock-in.