# AttributeError: 'AsyncSandboxClient' object has no attribute 'get\_template'

**URL:** <https://forum.langchain.com/t/attributeerror-asyncsandboxclient-object-has-no-attribute-get-template/3988>\
**Category:** LangGraph\
**Tags:** langsmith-studio, intro-to-langgraph, python-help\
**Created:** [June 20, 2026, 10:18am UTC](https://forum.langchain.com/t/attributeerror-asyncsandboxclient-object-has-no-attribute-get-template/3988 "2026-06-20T10:18:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![encryptman1](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@encryptman1](https://forum.langchain.com/u/encryptman1)\
**Post date:** [June 20, 2026, 10:18am UTC](https://forum.langchain.com/t/attributeerror-asyncsandboxclient-object-has-no-attribute-get-template/3988/1 "2026-06-20T10:18:09Z")

</div>

After creating a new langchain project using langgraph cli, I’m getting an error on the basic deepagent project which is provided as a template.

```  
File “/Users/me/Local/Code/deepagent/agent/src/deep\_agent/sandbox.py”, line 120, in \_ensure\_template  
await client.get\_template(template\_name)  
^^^^^^^^^^^^^^^^^^^  
AttributeError: ‘AsyncSandboxClient’ object has no attribute ‘get\_template’  
```

 ![Screenshot 2026-06-20 at 3.15.03 PM](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/e/e5bf3bd5eb24981bd3cb0eaa2c9174a19dc45545.png)

Langsmith studio suggested me to upgrade langgraph-api in order fix any sort of issue:  
```  
Current Server Version: 0.7.103

Latest Server Version: 0.10.0

Seeing issues? Try upgrading your server by running **pip install -U langgraph-api**.  
```

I’m using UV package manager and attempted to upgrade the langggraph-api, but it’s not working due to project’s default uv.lock and myproject.toml files.

---

<div class="post-metadata">

**Author:** ![keenborder786](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/keenborder786/32/1757_2.png) [@keenborder786](https://forum.langchain.com/u/keenborder786)\
**Post date:** [June 20, 2026, 11:39am UTC](https://forum.langchain.com/t/attributeerror-asyncsandboxclient-object-has-no-attribute-get-template/3988/2 "2026-06-20T11:39:52Z")

</div>

Hello @encryptman1,

This is a **`langsmith` SDK mismatch** , not a `langgraph-api` issue.

The deep-agent template’s `sandbox.py` calls `AsyncSandboxClient.get_template()`, but that method was **removed** from `langsmith` in April 2026 when sandbox **templates** were replaced by **snapshots**. Upgrading `langgraph-api` won’t fix it, the error is in your app code calling a method that no longer exists.

**Why `pip install -U langgraph-api` didn’t help:** With uv, deps come from `pyproject.toml` / `uv.lock`. Use uv to manage upgrades:

```bash
cd your-project
uv sync --dev -U

```

**Quick workaround** (temporary — pins deprecated API):

```bash
uv add "langsmith[sandbox]>=0.7.24,<0.7.34"
uv sync --dev

```

**Proper fix:** Update `sandbox.py` to use the snapshot API instead of `get_template` / `create_template`. See the [Sandbox SDK docs](https://docs.langchain.com/langsmith/sandbox-sdk), create sandboxes with `snapshot_name` or `snapshot_id`, not `template_name`.

Also make sure `LANGSMITH_API_KEY` is set in your environment.

The template code is ahead of (or behind) the current SDK, this should be fixed in the template itself. Until then, pin old `langsmith` or migrate `sandbox.py` to snapshots.
