deepagents 0.0.9__tar.gz → 0.0.11__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.0.9 → deepagents-0.0.11}/PKG-INFO +5 -4
- {deepagents-0.0.9 → deepagents-0.0.11}/README.md +2 -2
- {deepagents-0.0.9 → deepagents-0.0.11}/deepagents.egg-info/PKG-INFO +5 -4
- {deepagents-0.0.9 → deepagents-0.0.11}/deepagents.egg-info/requires.txt +2 -1
- {deepagents-0.0.9 → deepagents-0.0.11}/pyproject.toml +3 -2
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/graph.py +1 -1
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/middleware.py +8 -7
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/tools.py +1 -1
- {deepagents-0.0.9 → deepagents-0.0.11}/tests/test_deepagents.py +1 -1
- {deepagents-0.0.9 → deepagents-0.0.11}/tests/utils.py +1 -1
- {deepagents-0.0.9 → deepagents-0.0.11}/LICENSE +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/deepagents.egg-info/SOURCES.txt +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/deepagents.egg-info/dependency_links.txt +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/deepagents.egg-info/top_level.txt +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/setup.cfg +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/__init__.py +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/model.py +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/prompts.py +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/state.py +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/src/deepagents/types.py +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/tests/test_hitl.py +0 -0
- {deepagents-0.0.9 → deepagents-0.0.11}/tests/test_middleware.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepagents
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.11
|
|
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
|
Requires-Python: <4.0,>=3.11
|
|
@@ -8,8 +8,9 @@ Description-Content-Type: text/markdown
|
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Requires-Dist: langgraph>=1.0.0a3
|
|
10
10
|
Requires-Dist: langchain-anthropic>=0.1.23
|
|
11
|
-
Requires-Dist: langchain>=1.0.
|
|
11
|
+
Requires-Dist: langchain>=1.0.0a12
|
|
12
12
|
Requires-Dist: langgraph-prebuilt>=0.7.0a2
|
|
13
|
+
Requires-Dist: langchain-core>=1.0.0a6
|
|
13
14
|
Provides-Extra: dev
|
|
14
15
|
Requires-Dist: pytest; extra == "dev"
|
|
15
16
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
@@ -163,10 +164,10 @@ agent = create_deep_agent(
|
|
|
163
164
|
For more complex use cases, you can provide your own pre-built LangGraph graph as a subagent:
|
|
164
165
|
|
|
165
166
|
```python
|
|
166
|
-
from
|
|
167
|
+
from langchain.agents import create_agent
|
|
167
168
|
|
|
168
169
|
# Create a custom agent graph
|
|
169
|
-
custom_graph =
|
|
170
|
+
custom_graph = create_agent(
|
|
170
171
|
model=your_model,
|
|
171
172
|
tools=specialized_tools,
|
|
172
173
|
prompt="You are a specialized agent for data analysis..."
|
|
@@ -144,10 +144,10 @@ agent = create_deep_agent(
|
|
|
144
144
|
For more complex use cases, you can provide your own pre-built LangGraph graph as a subagent:
|
|
145
145
|
|
|
146
146
|
```python
|
|
147
|
-
from
|
|
147
|
+
from langchain.agents import create_agent
|
|
148
148
|
|
|
149
149
|
# Create a custom agent graph
|
|
150
|
-
custom_graph =
|
|
150
|
+
custom_graph = create_agent(
|
|
151
151
|
model=your_model,
|
|
152
152
|
tools=specialized_tools,
|
|
153
153
|
prompt="You are a specialized agent for data analysis..."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepagents
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.11
|
|
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
|
Requires-Python: <4.0,>=3.11
|
|
@@ -8,8 +8,9 @@ Description-Content-Type: text/markdown
|
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Requires-Dist: langgraph>=1.0.0a3
|
|
10
10
|
Requires-Dist: langchain-anthropic>=0.1.23
|
|
11
|
-
Requires-Dist: langchain>=1.0.
|
|
11
|
+
Requires-Dist: langchain>=1.0.0a12
|
|
12
12
|
Requires-Dist: langgraph-prebuilt>=0.7.0a2
|
|
13
|
+
Requires-Dist: langchain-core>=1.0.0a6
|
|
13
14
|
Provides-Extra: dev
|
|
14
15
|
Requires-Dist: pytest; extra == "dev"
|
|
15
16
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
@@ -163,10 +164,10 @@ agent = create_deep_agent(
|
|
|
163
164
|
For more complex use cases, you can provide your own pre-built LangGraph graph as a subagent:
|
|
164
165
|
|
|
165
166
|
```python
|
|
166
|
-
from
|
|
167
|
+
from langchain.agents import create_agent
|
|
167
168
|
|
|
168
169
|
# Create a custom agent graph
|
|
169
|
-
custom_graph =
|
|
170
|
+
custom_graph = create_agent(
|
|
170
171
|
model=your_model,
|
|
171
172
|
tools=specialized_tools,
|
|
172
173
|
prompt="You are a specialized agent for data analysis..."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "deepagents"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.11"
|
|
4
4
|
description = "General purpose 'deep agent' with sub-agent spawning, todo list capabilities, and mock file system. Built on LangGraph."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -8,8 +8,9 @@ requires-python = ">=3.11,<4.0"
|
|
|
8
8
|
dependencies = [
|
|
9
9
|
"langgraph>=1.0.0a3",
|
|
10
10
|
"langchain-anthropic>=0.1.23",
|
|
11
|
-
"langchain>=1.0.
|
|
11
|
+
"langchain>=1.0.0a12",
|
|
12
12
|
"langgraph-prebuilt>=0.7.0a2",
|
|
13
|
+
"langchain-core>=1.0.0a6"
|
|
13
14
|
]
|
|
14
15
|
|
|
15
16
|
[project.optional-dependencies]
|
|
@@ -7,8 +7,9 @@ from langchain_core.tools import BaseTool, tool, InjectedToolCallId
|
|
|
7
7
|
from langchain_core.messages import ToolMessage
|
|
8
8
|
from langchain.chat_models import init_chat_model
|
|
9
9
|
from langgraph.types import Command
|
|
10
|
-
from
|
|
11
|
-
from
|
|
10
|
+
from langgraph.runtime import Runtime
|
|
11
|
+
from langchain.tools.tool_node import InjectedState
|
|
12
|
+
from typing import Annotated
|
|
12
13
|
from deepagents.state import PlanningState, FilesystemState
|
|
13
14
|
from deepagents.tools import write_todos, ls, read_file, write_file, edit_file
|
|
14
15
|
from deepagents.prompts import WRITE_TODOS_SYSTEM_PROMPT, TASK_SYSTEM_PROMPT, FILESYSTEM_SYSTEM_PROMPT, TASK_TOOL_DESCRIPTION, BASE_AGENT_PROMPT
|
|
@@ -22,7 +23,7 @@ class PlanningMiddleware(AgentMiddleware):
|
|
|
22
23
|
state_schema = PlanningState
|
|
23
24
|
tools = [write_todos]
|
|
24
25
|
|
|
25
|
-
def modify_model_request(self, request: ModelRequest, agent_state: PlanningState) -> ModelRequest:
|
|
26
|
+
def modify_model_request(self, request: ModelRequest, agent_state: PlanningState, runtime: Runtime) -> ModelRequest:
|
|
26
27
|
request.system_prompt = request.system_prompt + "\n\n" + WRITE_TODOS_SYSTEM_PROMPT
|
|
27
28
|
return request
|
|
28
29
|
|
|
@@ -34,7 +35,7 @@ class FilesystemMiddleware(AgentMiddleware):
|
|
|
34
35
|
state_schema = FilesystemState
|
|
35
36
|
tools = [ls, read_file, write_file, edit_file]
|
|
36
37
|
|
|
37
|
-
def modify_model_request(self, request: ModelRequest, agent_state: FilesystemState) -> ModelRequest:
|
|
38
|
+
def modify_model_request(self, request: ModelRequest, agent_state: FilesystemState, runtime: Runtime) -> ModelRequest:
|
|
38
39
|
request.system_prompt = request.system_prompt + "\n\n" + FILESYSTEM_SYSTEM_PROMPT
|
|
39
40
|
return request
|
|
40
41
|
|
|
@@ -59,7 +60,7 @@ class SubAgentMiddleware(AgentMiddleware):
|
|
|
59
60
|
)
|
|
60
61
|
self.tools = [task_tool]
|
|
61
62
|
|
|
62
|
-
def modify_model_request(self, request: ModelRequest, agent_state: AgentState) -> ModelRequest:
|
|
63
|
+
def modify_model_request(self, request: ModelRequest, agent_state: AgentState, runtime: Runtime) -> ModelRequest:
|
|
63
64
|
request.system_prompt = request.system_prompt + "\n\n" + TASK_SYSTEM_PROMPT
|
|
64
65
|
return request
|
|
65
66
|
|
|
@@ -82,7 +83,7 @@ def _get_agents(
|
|
|
82
83
|
agents = {
|
|
83
84
|
"general-purpose": create_agent(
|
|
84
85
|
model,
|
|
85
|
-
|
|
86
|
+
system_prompt=BASE_AGENT_PROMPT,
|
|
86
87
|
tools=default_subagent_tools,
|
|
87
88
|
checkpointer=False,
|
|
88
89
|
middleware=default_subagent_middleware
|
|
@@ -114,7 +115,7 @@ def _get_agents(
|
|
|
114
115
|
_middleware = default_subagent_middleware
|
|
115
116
|
agents[_agent["name"]] = create_agent(
|
|
116
117
|
sub_model,
|
|
117
|
-
|
|
118
|
+
system_prompt=_agent["prompt"],
|
|
118
119
|
tools=_tools,
|
|
119
120
|
middleware=_middleware,
|
|
120
121
|
checkpointer=False,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from langchain_core.tools import tool, InjectedToolCallId
|
|
2
2
|
from langchain_core.messages import ToolMessage
|
|
3
3
|
from langgraph.types import Command
|
|
4
|
-
from langchain.
|
|
4
|
+
from langchain.tools.tool_node import InjectedState
|
|
5
5
|
from typing import Annotated, Union
|
|
6
6
|
from deepagents.state import Todo, FilesystemState
|
|
7
7
|
from deepagents.prompts import (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from langchain_core.tools import tool, InjectedToolCallId
|
|
2
2
|
from langchain.agents.middleware import AgentMiddleware
|
|
3
3
|
from typing import Annotated
|
|
4
|
-
from langchain.
|
|
4
|
+
from langchain.tools.tool_node import InjectedState
|
|
5
5
|
from langchain.agents.middleware import AgentMiddleware, AgentState
|
|
6
6
|
from langgraph.types import Command
|
|
7
7
|
from langchain_core.messages import ToolMessage
|
|
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
|