Documentation Index
Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Daytona 提供多语言支持的快速启动沙箱环境。 参见 Daytona docs 了解注册、认证和平台详情。
pip install langchain-daytona
创建沙箱后端
In Python, you create the sandbox using the provider SDK, then wrap it with the deepagents backend.
from daytona import Daytona
from langchain_daytona import DaytonaSandbox
sandbox = Daytona().create()
backend = DaytonaSandbox(sandbox=sandbox)
result = backend.execute("echo hello")
print(result.output)
Use with Deep Agents
from daytona import Daytona
from langchain_anthropic import ChatAnthropic
from deepagents import create_deep_agent
from langchain_daytona import DaytonaSandbox
sandbox = Daytona().create()
backend = DaytonaSandbox(sandbox=sandbox)
agent = create_deep_agent(
model=ChatAnthropic(model="claude-sonnet-4-20250514"),
system_prompt="You are a coding assistant with sandbox access.",
backend=backend,
)
result = agent.invoke(
{
"messages": [
{"role": "user", "content": "Create a hello world Python script and run it"}
]
}
)
Cleanup
You are responsible for managing the sandbox lifecycle via the Daytona SDK.
When you are done, stop or destroy the sandbox.
See also: Sandboxes.