deepagents 0.3.7__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepagents-0.3.7 → deepagents-0.3.8}/PKG-INFO +1 -1
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/filesystem.py +35 -6
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents.egg-info/PKG-INFO +1 -1
- {deepagents-0.3.7 → deepagents-0.3.8}/pyproject.toml +1 -1
- {deepagents-0.3.7 → deepagents-0.3.8}/README.md +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/__init__.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/__init__.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/composite.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/filesystem.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/protocol.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/sandbox.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/state.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/store.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/backends/utils.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/graph.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/__init__.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/_utils.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/memory.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/patch_tool_calls.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/skills.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/subagents.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents/middleware/summarization.py +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents.egg-info/SOURCES.txt +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents.egg-info/dependency_links.txt +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents.egg-info/requires.txt +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/deepagents.egg-info/top_level.txt +0 -0
- {deepagents-0.3.7 → deepagents-0.3.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepagents
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: General purpose 'deep agent' with sub-agent spawning, todo list capabilities, and mock file system. Built on LangGraph.
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://docs.langchain.com/oss/python/deepagents/overview
|
|
@@ -20,8 +20,9 @@ from langgraph.types import Command
|
|
|
20
20
|
from typing_extensions import TypedDict
|
|
21
21
|
|
|
22
22
|
from deepagents.backends import StateBackend
|
|
23
|
+
from deepagents.backends.composite import CompositeBackend
|
|
23
24
|
from deepagents.backends.protocol import (
|
|
24
|
-
BACKEND_TYPES as BACKEND_TYPES, # Re-export for backwards compatibility
|
|
25
|
+
BACKEND_TYPES as BACKEND_TYPES, # Re-export type here for backwards compatibility
|
|
25
26
|
BackendProtocol,
|
|
26
27
|
EditResult,
|
|
27
28
|
SandboxBackendProtocol,
|
|
@@ -666,9 +667,6 @@ def _supports_execution(backend: BackendProtocol) -> bool:
|
|
|
666
667
|
Returns:
|
|
667
668
|
True if the backend supports execution, False otherwise.
|
|
668
669
|
"""
|
|
669
|
-
# Import here to avoid circular dependency
|
|
670
|
-
from deepagents.backends.composite import CompositeBackend
|
|
671
|
-
|
|
672
670
|
# For CompositeBackend, check the default backend
|
|
673
671
|
if isinstance(backend, CompositeBackend):
|
|
674
672
|
return isinstance(backend.default, SandboxBackendProtocol)
|
|
@@ -766,6 +764,37 @@ def _execute_tool_generator(
|
|
|
766
764
|
)
|
|
767
765
|
|
|
768
766
|
|
|
767
|
+
# Tools that should be excluded from the large result eviction logic.
|
|
768
|
+
#
|
|
769
|
+
# This tuple contains tools that should NOT have their results evicted to the filesystem
|
|
770
|
+
# when they exceed token limits. Tools are excluded for different reasons:
|
|
771
|
+
#
|
|
772
|
+
# 1. Tools with built-in truncation (ls, glob, grep):
|
|
773
|
+
# These tools truncate their own output when it becomes too large. When these tools
|
|
774
|
+
# produce truncated output due to many matches, it typically indicates the query
|
|
775
|
+
# needs refinement rather than full result preservation. In such cases, the truncated
|
|
776
|
+
# matches are potentially more like noise and the LLM should be prompted to narrow
|
|
777
|
+
# its search criteria instead.
|
|
778
|
+
#
|
|
779
|
+
# 2. Tools with problematic truncation behavior (read_file):
|
|
780
|
+
# read_file is tricky to handle as the failure mode here is single long lines
|
|
781
|
+
# (e.g., imagine a jsonl file with very long payloads on each line). If we try to
|
|
782
|
+
# truncate the result of read_file, the agent may then attempt to re-read the
|
|
783
|
+
# truncated file using read_file again, which won't help.
|
|
784
|
+
#
|
|
785
|
+
# 3. Tools that never exceed limits (edit_file, write_file):
|
|
786
|
+
# These tools return minimal confirmation messages and are never expected to produce
|
|
787
|
+
# output large enough to exceed token limits, so checking them would be unnecessary.
|
|
788
|
+
TOOLS_EXCLUDED_FROM_EVICTION = (
|
|
789
|
+
"ls",
|
|
790
|
+
"glob",
|
|
791
|
+
"grep",
|
|
792
|
+
"read_file",
|
|
793
|
+
"edit_file",
|
|
794
|
+
"write_file",
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
|
|
769
798
|
TOOL_GENERATORS = {
|
|
770
799
|
"ls": _ls_tool_generator,
|
|
771
800
|
"read_file": _read_file_tool_generator,
|
|
@@ -1248,7 +1277,7 @@ class FilesystemMiddleware(AgentMiddleware):
|
|
|
1248
1277
|
Returns:
|
|
1249
1278
|
The raw ToolMessage, or a pseudo tool message with the ToolResult in state.
|
|
1250
1279
|
"""
|
|
1251
|
-
if self.tool_token_limit_before_evict is None or request.tool_call["name"] in
|
|
1280
|
+
if self.tool_token_limit_before_evict is None or request.tool_call["name"] in TOOLS_EXCLUDED_FROM_EVICTION:
|
|
1252
1281
|
return handler(request)
|
|
1253
1282
|
|
|
1254
1283
|
tool_result = handler(request)
|
|
@@ -1268,7 +1297,7 @@ class FilesystemMiddleware(AgentMiddleware):
|
|
|
1268
1297
|
Returns:
|
|
1269
1298
|
The raw ToolMessage, or a pseudo tool message with the ToolResult in state.
|
|
1270
1299
|
"""
|
|
1271
|
-
if self.tool_token_limit_before_evict is None or request.tool_call["name"] in
|
|
1300
|
+
if self.tool_token_limit_before_evict is None or request.tool_call["name"] in TOOLS_EXCLUDED_FROM_EVICTION:
|
|
1272
1301
|
return await handler(request)
|
|
1273
1302
|
|
|
1274
1303
|
tool_result = await handler(request)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepagents
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: General purpose 'deep agent' with sub-agent spawning, todo list capabilities, and mock file system. Built on LangGraph.
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://docs.langchain.com/oss/python/deepagents/overview
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|