Conversation
…kend The deepagents extra now requires deepagents>=0.7.12,<0.8 (0.7.14 exists but is inside the two-week exclude-newer window). deepagents 0.7 needs langsmith>=0.11.2, so the langsmith extra allows langsmith<0.13; the RunTree.patch overrides follow langsmith 0.12's Optional exclude_inputs so LangSmith's own default applies on every supported version. deepagents 0.7 made delete an optional protocol op and checks support on the wrapper's class (type(backend).delete against the protocol default), which raised AttributeError for TemporalBackend's __getattr__-based ops. The I/O ops are now real class-level methods, and the wrapper picks a subclass mirroring the inner backend's delete support, so deepagents offers the delete tool exactly when the unwrapped backend would.
There was a problem hiding this comment.
🟡 Changes recommended
The new LangSmith default-forwarding behavior needs focused regression coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates Deep Agents integration to 0.7 and preserves optional backend capability detection.
Changes:
- Mirrors
delete/adeletesupport at class level and routes supported operations through Activities. - Updates Deep Agents and LangSmith compatibility ranges.
- Adds backend capability and Activity-routing tests.
File summaries
| File | Description |
|---|---|
temporalio/contrib/deepagents/_tools.py |
Implements class-level optional operation mirroring. |
tests/contrib/deepagents/test_backends.py |
Tests delete detection and Activity routing. |
temporalio/contrib/langsmith/_interceptor.py |
Preserves LangSmith’s patch-input default. |
pyproject.toml |
Updates optional dependency constraints. |
uv.lock |
Locks updated transitive dependencies. |
CHANGELOG.md |
Documents dependency and backend changes. |
Review details
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e2c94c622
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… default Per review. deepagents decides execution support with a nominal isinstance check against SandboxBackendProtocol (an ABC subclass, not a structural Protocol), so no wrapper was ever mistaken for shell-capable; the real gap ran the other way: a wrapped LocalShellBackend lost its shell tool. The mirror class now derives from SandboxBackendProtocol only when deepagents reports the inner backend as execution-capable, with execute/aexecute dispatchers and id forwarded; plain backends stay non-sandbox classes. Mirroring also applies to user subclasses of TemporalBackend (generated as a subclass of theirs; ops they define are left alone) instead of being skipped. The langsmith RunTree.patch tests now pin that a no-argument call forwards exclude_inputs=None so LangSmith's own default applies.
|
@copilot resolve the merge conflicts in this pull request |
Resolved by merging the latest |
|
@copilot resolve the merge conflicts in this pull request |
ab68bd3 to
0fcd22c
Compare
| """Patch the run to LangSmith, skipping during replay. | ||
|
|
||
| ``exclude_inputs`` is forwarded untouched so LangSmith's own default | ||
| applies (a plain ``False`` before 0.12; the |
There was a problem hiding this comment.
Small correction: the Optional default and LANGSMITH_EXCLUDE_INPUTS_ON_PATCH landed in langsmith 0.11.0, not 0.12 (0.10.9 still has exclude_inputs: bool = False). The commit message had it right. The same 0.12 shows up in the new test_background_io.py comment, so both could say 0.11.
There was a problem hiding this comment.
Thanks, confirmed against the wheels: 0.10.9 has def patch(self, *, exclude_inputs: bool = False), 0.11.0 has exclude_inputs: Optional[bool] = None plus _exclude_inputs_on_patch() reading LANGSMITH_EXCLUDE_INPUTS_ON_PATCH. Both comments now say 0.11 (d1f1ae4).
deepagents gates the execute tool's per-command timeout on execute_accepts_timeout(type(backend)), which inspects the signature of the class's execute for a timeout parameter and, unlike the max_count probe, does not accept **kwargs as a stand-in. The wrapper's dispatchers were (*args, **kwargs), so a wrapped LocalShellBackend read False and refused a timeout its unwrapped self accepts. The optional-op dispatchers built in _wrapper_class_for now carry the inner method's signature via __signature__, so every signature probe answers as it does for the inner backend (including a sandbox that does not take timeout). The wrapper-class cache is keyed by the inner class as well, and uses dict.setdefault so concurrent workflow threads building the same key share one class.
deepagents 0.7.0 already has everything the plugin relies on (SandboxBackendProtocol, supports_execution, execute_accepts_timeout, _supports_delete, the optional delete/adelete), and the deepagents test suite passes against it, so the extra allows >=0.7,<0.8 instead of the 0.7.12 that exclude-newer happened to resolve. The langchain / langchain-core (and dev langchain-anthropic) floors were carried over from the deepagents 0.6.12 requirements and sat below what any 0.7.x pulls in; they now match deepagents 0.7.0's own floors (langchain>=1.3.14, langchain-core>=1.5.0, langchain-anthropic>=1.5.3). Only the requires-dist metadata in uv.lock changes; resolved versions are unchanged.
The Optional exclude_inputs default and LANGSMITH_EXCLUDE_INPUTS_ON_PATCH landed in langsmith 0.11.0 (0.10.9 still has exclude_inputs: bool = False), not 0.12.
Re-lock uv.lock after the merge so the project metadata carries both main's google-adk>=2.8.0 pin and this branch's deepagents/langchain floors. The only resolved-version change against this branch is google-adk 2.4.0 -> 2.8.0, inherited from main.
TLDR:
temporalio[deepagents]now requiresdeepagents>=0.7.12,<0.8. deepagents 0.7 decides a backend's optional capabilities (delete, shellexecute) from the wrapper's class, soTemporalBackendnow mirrors the inner backend at class level instead of answering every op through__getattr__— including for user subclasses. Everything else in the plugin worked unchanged.Pins
deepagents>=0.7.12,<0.8. 0.7.14 is the latest release but falls inside the repo's two-weekexclude-newerwindow, so 0.7.12 is the newest version the lock can take today.langsmith<0.13(was<0.9): deepagents 0.7 requireslangsmith>=0.11.2. The langsmith contrib passes unchanged on 0.12.1; its twoRunTree.patchoverrides follow 0.12'sexclude_inputs: bool | None = None, and a test pins that a no-argument call forwardsNoneso LangSmith's own default applies.TemporalBackend
deleteoptional and gates its delete tool ontype(backend).delete is not BackendProtocol.delete. The old__getattr__-based ops made that class-level lookup raiseAttributeError, breaking every agent using built-in file tools. The I/O ops are now real class-level methods, andTemporalBackend(inner)picks a subclass that mirrorsinner's delete support.SandboxBackendProtocolinstance (a plain ABC subclass, not a structural Protocol). A wrappedLocalShellBackendtherefore silently lost its shell tool. When deepagents reports the inner backend as execution-capable, the mirror class also derives fromSandboxBackendProtocol, withexecute/aexecutedispatchers andidforwarded; wrappers around filesystem/store backends stay non-sandbox classes.class MyBackend(TemporalBackend)gets the same mirroring (generated as a subclass ofMyBackend; ops it defines itself are left alone).Verification
tests/contrib/deepagents: 45 passed on deepagents 0.7.12, including new tests for delete/execute mirroring, subclass participation, andaexecuterunning as abackend_opActivity through a realLocalShellBackend.tests/contrib/langsmith: 88 passed on langsmith 0.12.1.