deepagents 0.3.8__py3-none-any.whl → 0.3.9__py3-none-any.whl
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/backends/sandbox.py +76 -23
- deepagents/middleware/filesystem.py +455 -521
- deepagents/middleware/summarization.py +9 -4
- {deepagents-0.3.8.dist-info → deepagents-0.3.9.dist-info}/METADATA +7 -7
- {deepagents-0.3.8.dist-info → deepagents-0.3.9.dist-info}/RECORD +7 -7
- {deepagents-0.3.8.dist-info → deepagents-0.3.9.dist-info}/WHEEL +1 -1
- {deepagents-0.3.8.dist-info → deepagents-0.3.9.dist-info}/top_level.txt +0 -0
|
@@ -34,6 +34,7 @@ from __future__ import annotations
|
|
|
34
34
|
|
|
35
35
|
import logging
|
|
36
36
|
import uuid
|
|
37
|
+
import warnings
|
|
37
38
|
from datetime import UTC, datetime
|
|
38
39
|
from typing import TYPE_CHECKING, Any, cast
|
|
39
40
|
|
|
@@ -658,8 +659,10 @@ A condensed summary follows:
|
|
|
658
659
|
backend = self._get_backend(state, runtime)
|
|
659
660
|
file_path = self._offload_to_backend(backend, messages_to_summarize)
|
|
660
661
|
if file_path is None:
|
|
661
|
-
|
|
662
|
-
|
|
662
|
+
warnings.warn(
|
|
663
|
+
"Offloading conversation history to backend failed during summarization.",
|
|
664
|
+
stacklevel=2,
|
|
665
|
+
)
|
|
663
666
|
|
|
664
667
|
# Generate summary
|
|
665
668
|
summary = self._create_summary(messages_to_summarize)
|
|
@@ -740,8 +743,10 @@ A condensed summary follows:
|
|
|
740
743
|
backend = self._get_backend(state, runtime)
|
|
741
744
|
file_path = await self._aoffload_to_backend(backend, messages_to_summarize)
|
|
742
745
|
if file_path is None:
|
|
743
|
-
|
|
744
|
-
|
|
746
|
+
warnings.warn(
|
|
747
|
+
"Offloading conversation history to backend failed during summarization.",
|
|
748
|
+
stacklevel=2,
|
|
749
|
+
)
|
|
745
750
|
|
|
746
751
|
# Generate summary
|
|
747
752
|
summary = await self._acreate_summary(messages_to_summarize)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepagents
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.9
|
|
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
|
|
@@ -11,18 +11,18 @@ Project-URL: Slack, https://www.langchain.com/join-community
|
|
|
11
11
|
Project-URL: Reddit, https://www.reddit.com/r/LangChain/
|
|
12
12
|
Requires-Python: <4.0,>=3.11
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
|
-
Requires-Dist: langchain-core<2.0.0,>=1.2.
|
|
15
|
-
Requires-Dist: langchain<2.0.0,>=1.2.
|
|
14
|
+
Requires-Dist: langchain-core<2.0.0,>=1.2.7
|
|
15
|
+
Requires-Dist: langchain<2.0.0,>=1.2.7
|
|
16
16
|
Requires-Dist: langchain-anthropic<2.0.0,>=1.3.1
|
|
17
|
-
Requires-Dist: langchain-google-genai<5.0.0,>=4.
|
|
17
|
+
Requires-Dist: langchain-google-genai<5.0.0,>=4.2.0
|
|
18
18
|
Requires-Dist: wcmatch
|
|
19
19
|
|
|
20
20
|
# 🧠🤖Deep Agents
|
|
21
21
|
|
|
22
22
|
Using an LLM to call tools in a loop is the simplest form of an agent.
|
|
23
|
-
This architecture, however, can yield agents that are
|
|
23
|
+
This architecture, however, can yield agents that are "shallow" and fail to plan and act over longer, more complex tasks.
|
|
24
24
|
|
|
25
|
-
Applications like
|
|
25
|
+
Applications like "Deep Research", "Manus", and "Claude Code" have gotten around this limitation by implementing a combination of four things:
|
|
26
26
|
a **planning tool**, **sub agents**, access to a **file system**, and a **detailed prompt**.
|
|
27
27
|
|
|
28
28
|
<img src="../../deep_agents.png" alt="deep agent" width="600"/>
|
|
@@ -249,7 +249,7 @@ class CompiledSubAgent(TypedDict):
|
|
|
249
249
|
**CompiledSubAgent fields:**
|
|
250
250
|
|
|
251
251
|
- **name**: This is the name of the subagent, and how the main agent will call the subagent
|
|
252
|
-
- **description**: This is the description of the subagent that is shown to the main agent
|
|
252
|
+
- **description**: This is the description of the subagent that is shown to the main agent
|
|
253
253
|
- **runnable**: A pre-built LangGraph graph/agent that will be used as the subagent. **Important:** The runnable's state schema must include a `messages` key. This is required for the subagent to communicate results back to the main agent.
|
|
254
254
|
|
|
255
255
|
#### Using `SubAgent`
|
|
@@ -4,19 +4,19 @@ deepagents/backends/__init__.py,sha256=BOKu2cQ1OdMyO_l2rLqZQiXppYFmQbx7OIQb7WYwv
|
|
|
4
4
|
deepagents/backends/composite.py,sha256=WZ_dnn63BmrU19ZJ5-m728f99pSa0Uq_CnwZjwmxz1U,26198
|
|
5
5
|
deepagents/backends/filesystem.py,sha256=hiWSxatfJrLqBqVlj22CnXsDxjHB1oX5NJBogGBPiXM,26713
|
|
6
6
|
deepagents/backends/protocol.py,sha256=HUmIrwYGduPfDcs_wtOzVU2QPA9kICZuGO-sUwxzz5I,15997
|
|
7
|
-
deepagents/backends/sandbox.py,sha256=
|
|
7
|
+
deepagents/backends/sandbox.py,sha256=LC-89RawCXy2qQmvOu_UYAHo5mRAylhYhfuZPKmO-7Y,13196
|
|
8
8
|
deepagents/backends/state.py,sha256=Qq4uRjKg6POEqLl4tNnWnXzbmLBpu3bZdMkcUROIgHw,7899
|
|
9
9
|
deepagents/backends/store.py,sha256=9gdUQqPWChYgHVoopOUaocUdyUbFBpf-PxhTiXRXCto,18219
|
|
10
10
|
deepagents/backends/utils.py,sha256=CE_HXddNTr954auqFIVgYLLD4Gdsfr9U8b384g07Wuc,13932
|
|
11
11
|
deepagents/middleware/__init__.py,sha256=tATwi3JI-90-Wuf3Wg-szWkSBuKO9F2iyc5NoHP9q4g,566
|
|
12
12
|
deepagents/middleware/_utils.py,sha256=ojy62kQLASQ2GabevWJaPGLItyccdNxLMPpYV25Lf20,687
|
|
13
|
-
deepagents/middleware/filesystem.py,sha256=
|
|
13
|
+
deepagents/middleware/filesystem.py,sha256=6CGwzwLj62LXFlF5bEZrXPBMIrzKQcOIQeK7g6G2H4M,55779
|
|
14
14
|
deepagents/middleware/memory.py,sha256=D6CNDeh5wUGLuY0CZWubFn_cfW81XuzxEZGJK02vFiU,15860
|
|
15
15
|
deepagents/middleware/patch_tool_calls.py,sha256=PdNhxPaQqwnFkhEAZEE2kEzadTNAOO3_iJRA30WqpGE,1981
|
|
16
16
|
deepagents/middleware/skills.py,sha256=0nOj7knAzPC9FmFK7Po3bsZeMAQJ8VJU6K1BEvoj3NM,24181
|
|
17
17
|
deepagents/middleware/subagents.py,sha256=2pIwqC_0MUptX2TsBtTpr4tFDdQYkOWCG6lwAgPO_cw,27273
|
|
18
|
-
deepagents/middleware/summarization.py,sha256=
|
|
19
|
-
deepagents-0.3.
|
|
20
|
-
deepagents-0.3.
|
|
21
|
-
deepagents-0.3.
|
|
22
|
-
deepagents-0.3.
|
|
18
|
+
deepagents/middleware/summarization.py,sha256=y5oXrepdJ0BkGcqdUQ3qO-cNVHb_QKVWjEFRurUF5sM,29127
|
|
19
|
+
deepagents-0.3.9.dist-info/METADATA,sha256=rQfU0aeLPZqCDOka6yf_LmFaODD59BT_7vWhj0aYsM0,19748
|
|
20
|
+
deepagents-0.3.9.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
21
|
+
deepagents-0.3.9.dist-info/top_level.txt,sha256=drAzchOzPNePwpb3_pbPuvLuayXkN7SNqeIKMBWJoAo,11
|
|
22
|
+
deepagents-0.3.9.dist-info/RECORD,,
|
|
File without changes
|