Skip to content

Commit bfe8c29

Browse files
authored
Merge branch 'main' into docs-style-improvements-ls
2 parents ad72f59 + 16ceaf8 commit bfe8c29

34 files changed

+629
-559
lines changed

packages.yml

Lines changed: 230 additions & 230 deletions
Large diffs are not rendered by default.

src/code-samples/deepagents/content-builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def load_subagents(config_path: Path) -> list:
140140
def create_content_writer():
141141
"""Create a content writer agent configured by filesystem files."""
142142
return create_deep_agent(
143+
model="openai:gpt-5.4",
143144
memory=["./AGENTS.md"],
144145
skills=["./skills/"],
145146
tools=[generate_cover, generate_social_image],

src/code-samples/package-lock.json

Lines changed: 11 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/langsmith/agent-server-changelog.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ rss: true
1111

1212
[Agent Server](/langsmith/agent-server) is an API platform for creating and managing agent-based applications. It provides built-in persistence, a task queue, and supports deploying, configuring, and running assistants (agentic workflows) at scale. This changelog documents all notable updates, features, and fixes to Agent Server releases.
1313

14+
<Update label="2026-04-10" tags={["agent-server"]}>
15+
## v0.7.100
16+
17+
- Implemented background deletion of checkpoints to improve thread deletion and pruning performance, reducing I/O pressure and enhancing efficiency.
18+
- Bumped `@hono/node-server` from 1.19.12 to 1.19.13 to fix a security issue with the Serve Static Middleware.
19+
- Updated hono from version 4.12.9 to 4.12.12, including critical security patches for middleware and utilities.
20+
- Upgraded the hono library to version 4.12.12, addressing several security vulnerabilities.
21+
- Implemented strict version locking for build dependencies to ensure consistency across builds.
22+
</Update>
23+
1424
<Update label="2026-04-09" tags={["agent-server"]}>
1525
## v0.7.99
1626

src/langsmith/sandbox-sdk.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,60 @@ async def main():
487487
token = await svc.get_token()
488488
```
489489

490+
## Trace sandbox activity
491+
492+
Pass LangSmith tracing environment variables through the `env` parameter on `run()` to send traces from code running inside a sandbox. Call `flush()` before the process exits to ensure all traces are delivered.
493+
494+
<CodeGroup>
495+
496+
```python Python
497+
from langsmith.sandbox import SandboxClient
498+
499+
client = SandboxClient()
500+
501+
tracing_env = {
502+
"LANGSMITH_API_KEY": "lsv2_pt_...",
503+
"LANGSMITH_ENDPOINT": "https://api.smith.langchain.com",
504+
"LANGSMITH_TRACING": "true",
505+
"LANGSMITH_PROJECT": "my-sandbox-traces",
506+
}
507+
508+
with client.sandbox(template_name="my-template") as sandbox:
509+
sandbox.run("pip install langsmith", timeout=120, env=tracing_env)
510+
result = sandbox.run("python3 my_agent.py", env=tracing_env)
511+
print(result.stdout)
512+
```
513+
514+
```ts TypeScript
515+
import { SandboxClient } from "langsmith/experimental/sandbox";
516+
517+
const client = new SandboxClient();
518+
519+
const tracingEnv = {
520+
LANGSMITH_API_KEY: "lsv2_pt_...",
521+
LANGSMITH_ENDPOINT: "https://api.smith.langchain.com",
522+
LANGSMITH_TRACING: "true",
523+
LANGSMITH_PROJECT: "my-sandbox-traces",
524+
};
525+
526+
const sandbox = await client.createSandbox("my-template");
527+
try {
528+
await sandbox.run("pip install langsmith", { timeout: 120, env: tracingEnv });
529+
const result = await sandbox.run("python3 my_agent.py", { env: tracingEnv });
530+
console.log(result.stdout);
531+
} finally {
532+
await sandbox.delete();
533+
}
534+
```
535+
536+
</CodeGroup>
537+
538+
Inside the sandbox, any LangSmith-instrumented code (`@traceable`, LangChain, LangGraph) automatically picks up the tracing configuration from the injected environment variables.
539+
540+
<Warning>
541+
Always call `flush()` before the sandbox process exits — `langsmith.Client().flush()` in Python or `await new Client().flush()` in TypeScript. Without it, traces may be lost because the container is destroyed when the command finishes.
542+
</Warning>
543+
490544
## Error handling
491545

492546
Both SDKs provide typed exceptions for specific error handling:

src/langsmith/trace-deep-agents.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def yearly_balance_schedule(
103103

104104

105105
agent = create_deep_agent(
106+
model="openai:gpt-5.4",
106107
tools=[compute_compound_interest, yearly_balance_schedule],
107108
system_prompt=(
108109
"You are a careful assistant. "
@@ -238,6 +239,7 @@ def yearly_balance_schedule(
238239

239240

240241
agent = create_deep_agent(
242+
model="openai:gpt-5.4",
241243
tools=[compute_compound_interest, yearly_balance_schedule],
242244
system_prompt=(
243245
"You are a careful assistant. "

src/oss/deepagents/acp.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ from deepagents_acp.server import AgentServerACP
5959

6060
async def main() -> None:
6161
agent = create_deep_agent(
62+
model="openai:gpt-5.4",
6263
# You can customize your Deep Agent here: set a custom prompt,
6364
# add your own tools, attach middleware, or compose subagents.
6465
system_prompt="You are a helpful coding assistant",

src/oss/deepagents/backends.mdx

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This page explains how to:
2727
- [choose a backend](#specify-a-backend),
2828
- [route different paths to different backends](#route-to-different-backends),
2929
- [implement your own virtual filesystem](#use-a-virtual-filesystem) (e.g., S3 or Postgres),
30+
- [set permissions](#permissions) on filesystem access,
3031
:::js
3132
- [add policy hooks](#add-policy-hooks),
3233
[work with binary and multimodal files](#multimodal-and-binary-files),
@@ -42,11 +43,11 @@ Here are a few prebuilt filesystem backends that you can quickly use with your d
4243

4344
| Built-in backend | Description |
4445
|---|---|
45-
| [Default](#statebackend-ephemeral) | `agent = create_deep_agent()` <br></br> Ephemeral in state. The default filesystem backend for an agent is stored in `langgraph` state. Note that this filesystem only persists _for a single thread_. |
46-
| [Local filesystem persistence](#filesystembackend-local-disk) | `agent = create_deep_agent(backend=FilesystemBackend(root_dir="/Users/nh/Desktop/"))` <br></br>This gives the deep agent access to your local machine's filesystem. You can specify the root directory that the agent has access to. Note that any provided `root_dir` must be an absolute path. |
47-
| [Durable store (LangGraph store)](#storebackend-langgraph-store) | `agent = create_deep_agent(backend=StoreBackend())` <br></br>This gives the agent access to long-term storage that is _persisted across threads_. This is great for storing longer term memories or instructions that are applicable to the agent over multiple executions. |
48-
| [Sandbox](/oss/deepagents/sandboxes) | `agent = create_deep_agent(backend=sandbox)` <br></br>Execute code in isolated environments. Sandboxes provide filesystem tools plus the `execute` tool for running shell commands. Choose from Modal, Daytona, Deno, or local VFS. |
49-
| [Local shell](#localshellbackend-local-shell) | `agent = create_deep_agent(backend=LocalShellBackend(root_dir=".", env={"PATH": "/usr/bin:/bin"}))` <br></br>Filesystem and shell execution directly on the host. No isolation—use only in controlled development environments. See [security considerations](#localshellbackend-local-shell) below. |
46+
| [Default](#statebackend-ephemeral) | `agent = create_deep_agent(model="openai:gpt-5.4")` <br></br> Ephemeral in state. The default filesystem backend for an agent is stored in `langgraph` state. Note that this filesystem only persists _for a single thread_. |
47+
| [Local filesystem persistence](#filesystembackend-local-disk) | `agent = create_deep_agent(model="openai:gpt-5.4", backend=FilesystemBackend(root_dir="/Users/nh/Desktop/"))` <br></br>This gives the deep agent access to your local machine's filesystem. You can specify the root directory that the agent has access to. Note that any provided `root_dir` must be an absolute path. |
48+
| [Durable store (LangGraph store)](#storebackend-langgraph-store) | `agent = create_deep_agent(model="openai:gpt-5.4", backend=StoreBackend())` <br></br>This gives the agent access to long-term storage that is _persisted across threads_. This is great for storing longer term memories or instructions that are applicable to the agent over multiple executions. |
49+
| [Sandbox](/oss/deepagents/sandboxes) | `agent = create_deep_agent(model="openai:gpt-5.4", backend=sandbox)` <br></br>Execute code in isolated environments. Sandboxes provide filesystem tools plus the `execute` tool for running shell commands. Choose from Modal, Daytona, Deno, or local VFS. |
50+
| [Local shell](#localshellbackend-local-shell) | `agent = create_deep_agent(model="openai:gpt-5.4", backend=LocalShellBackend(root_dir=".", env={"PATH": "/usr/bin:/bin"}))` <br></br>Filesystem and shell execution directly on the host. No isolation—use only in controlled development environments. See [security considerations](#localshellbackend-local-shell) below. |
5051
| [Composite](#compositebackend-router) | Ephemeral by default, `/memories/` persisted. The Composite backend is maximally flexible. You can specify different routes in the filesystem to point towards different backends. See Composite routing below for a ready-to-paste example. |
5152

5253

@@ -342,7 +343,7 @@ Namespace components must contain only alphanumeric characters, hyphens, undersc
342343
## Specify a backend
343344

344345
:::python
345-
- Pass a backend instance to `create_deep_agent(backend=...)`. The filesystem middleware uses it for all tooling.
346+
- Pass a backend instance to `create_deep_agent(model=..., backend=...)`. The filesystem middleware uses it for all tooling.
346347
- The backend must implement `BackendProtocol` (for example, `StateBackend()`, `FilesystemBackend(root_dir=".")`, `StoreBackend()`).
347348
- If omitted, the default is `StateBackend()`.
348349
:::
@@ -368,6 +369,7 @@ from deepagents import create_deep_agent
368369
from deepagents.backends import CompositeBackend, StateBackend, FilesystemBackend
369370

370371
agent = create_deep_agent(
372+
model="openai:gpt-5.4",
371373
backend=CompositeBackend(
372374
default=StateBackend(),
373375
routes={
@@ -400,7 +402,7 @@ Behavior:
400402

401403
Notes:
402404
- Longer prefixes win (for example, route `"/memories/projects/"` can override `"/memories/"`).
403-
- For StoreBackend routing, ensure a store is provided via `create_deep_agent(store=...)` or provisioned by the platform.
405+
- For StoreBackend routing, ensure a store is provided via `create_deep_agent(model=..., store=...)` or provisioned by the platform.
404406

405407
## Use a virtual filesystem
406408

@@ -544,9 +546,43 @@ Postgres-style outline:
544546
- `grep` can fetch candidate rows by extension or last modified time, then scan lines (skip rows where `mime_type` is binary) → return `GrepResult`
545547
:::
546548

549+
## Permissions
550+
551+
Use [permissions](/oss/deepagents/permissions) to declaratively control which files and directories the agent can read or write. Permissions apply to the built-in filesystem tools and are evaluated before the backend is called.
552+
553+
:::python
554+
```python
555+
from deepagents import create_deep_agent, FilesystemPermission
556+
557+
agent = create_deep_agent(
558+
model="openai:gpt-5.4",
559+
backend=CompositeBackend(
560+
default=StateBackend(),
561+
routes={
562+
"/memories/": StoreBackend(
563+
namespace=lambda rt: (rt.server_info.user.identity,),
564+
),
565+
"/policies/": StoreBackend(
566+
namespace=lambda rt: (rt.context.org_id,),
567+
),
568+
},
569+
),
570+
permissions=[
571+
FilesystemPermission(
572+
operations=["write"],
573+
paths=["/policies/**"],
574+
mode="deny",
575+
),
576+
],
577+
)
578+
```
579+
:::
580+
581+
For the full set of options including rule ordering, subagent permissions, and composite backend interactions, see the [permissions guide](/oss/deepagents/permissions).
582+
547583
## Add policy hooks
548584

549-
Enforce enterprise rules by subclassing or wrapping a backend.
585+
For custom validation logic beyond path-based allow/deny rules (rate limiting, audit logging, content inspection), enforce enterprise rules by subclassing or wrapping a backend.
550586

551587
Block writes/edits under selected prefixes (subclass):
552588

@@ -792,6 +828,7 @@ from deepagents import create_deep_agent
792828
from deepagents.backends import CompositeBackend, StateBackend, StoreBackend
793829

794830
agent = create_deep_agent(
831+
model="openai:gpt-5.4",
795832
backend=lambda rt: CompositeBackend(
796833
default=StateBackend(rt),
797834
routes={"/memories/": StoreBackend(rt, namespace=lambda rt: (rt.server_info.user.identity,))},
@@ -800,6 +837,7 @@ agent = create_deep_agent(
800837

801838
# After
802839
agent = create_deep_agent(
840+
model="openai:gpt-5.4",
803841
backend=CompositeBackend(
804842
default=StateBackend(),
805843
routes={"/memories/": StoreBackend(namespace=lambda rt: (rt.server_info.user.identity,))},

0 commit comments

Comments
 (0)