soothe-deepagents 0.7.16__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.
Files changed (62) hide show
  1. soothe_deepagents-0.7.16/PKG-INFO +140 -0
  2. soothe_deepagents-0.7.16/README.md +101 -0
  3. soothe_deepagents-0.7.16/pyproject.toml +174 -0
  4. soothe_deepagents-0.7.16/setup.cfg +4 -0
  5. soothe_deepagents-0.7.16/soothe_deepagents/__init__.py +50 -0
  6. soothe_deepagents-0.7.16/soothe_deepagents/_api/__init__.py +5 -0
  7. soothe_deepagents-0.7.16/soothe_deepagents/_api/deprecation.py +131 -0
  8. soothe_deepagents-0.7.16/soothe_deepagents/_excluded_middleware.py +225 -0
  9. soothe_deepagents-0.7.16/soothe_deepagents/_messages_reducer.py +90 -0
  10. soothe_deepagents-0.7.16/soothe_deepagents/_models.py +211 -0
  11. soothe_deepagents-0.7.16/soothe_deepagents/_tools.py +65 -0
  12. soothe_deepagents-0.7.16/soothe_deepagents/_version.py +7 -0
  13. soothe_deepagents-0.7.16/soothe_deepagents/backends/__init__.py +28 -0
  14. soothe_deepagents-0.7.16/soothe_deepagents/backends/composite.py +861 -0
  15. soothe_deepagents-0.7.16/soothe_deepagents/backends/context_hub.py +374 -0
  16. soothe_deepagents-0.7.16/soothe_deepagents/backends/filesystem.py +1209 -0
  17. soothe_deepagents-0.7.16/soothe_deepagents/backends/langsmith.py +279 -0
  18. soothe_deepagents-0.7.16/soothe_deepagents/backends/local_shell.py +387 -0
  19. soothe_deepagents-0.7.16/soothe_deepagents/backends/protocol.py +992 -0
  20. soothe_deepagents-0.7.16/soothe_deepagents/backends/sandbox.py +1363 -0
  21. soothe_deepagents-0.7.16/soothe_deepagents/backends/state.py +408 -0
  22. soothe_deepagents-0.7.16/soothe_deepagents/backends/store.py +882 -0
  23. soothe_deepagents-0.7.16/soothe_deepagents/backends/utils.py +917 -0
  24. soothe_deepagents-0.7.16/soothe_deepagents/graph.py +1033 -0
  25. soothe_deepagents-0.7.16/soothe_deepagents/middleware/__init__.py +104 -0
  26. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_fs_interrupt.py +183 -0
  27. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_message_eviction.py +162 -0
  28. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_overflow_clip.py +206 -0
  29. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_state.py +30 -0
  30. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_tool_exclusion.py +65 -0
  31. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_utils.py +23 -0
  32. soothe_deepagents-0.7.16/soothe_deepagents/middleware/_video.py +404 -0
  33. soothe_deepagents-0.7.16/soothe_deepagents/middleware/async_subagents.py +956 -0
  34. soothe_deepagents-0.7.16/soothe_deepagents/middleware/filesystem.py +3102 -0
  35. soothe_deepagents-0.7.16/soothe_deepagents/middleware/memory.py +441 -0
  36. soothe_deepagents-0.7.16/soothe_deepagents/middleware/patch_tool_calls.py +46 -0
  37. soothe_deepagents-0.7.16/soothe_deepagents/middleware/permissions.py +5 -0
  38. soothe_deepagents-0.7.16/soothe_deepagents/middleware/rubric.py +805 -0
  39. soothe_deepagents-0.7.16/soothe_deepagents/middleware/skills.py +1085 -0
  40. soothe_deepagents-0.7.16/soothe_deepagents/middleware/subagents.py +871 -0
  41. soothe_deepagents-0.7.16/soothe_deepagents/middleware/summarization.py +2190 -0
  42. soothe_deepagents-0.7.16/soothe_deepagents/profiles/__init__.py +61 -0
  43. soothe_deepagents-0.7.16/soothe_deepagents/profiles/_builtin_profiles.py +236 -0
  44. soothe_deepagents-0.7.16/soothe_deepagents/profiles/_keys.py +42 -0
  45. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/__init__.py +22 -0
  46. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/_anthropic_haiku_4_5.py +52 -0
  47. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/_anthropic_opus_4_7.py +56 -0
  48. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/_anthropic_sonnet_4_6.py +52 -0
  49. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/_nvidia_nemotron_3_ultra.py +1811 -0
  50. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/_openai_codex.py +68 -0
  51. soothe_deepagents-0.7.16/soothe_deepagents/profiles/harness/harness_profiles.py +1325 -0
  52. soothe_deepagents-0.7.16/soothe_deepagents/profiles/provider/__init__.py +15 -0
  53. soothe_deepagents-0.7.16/soothe_deepagents/profiles/provider/_nvidia.py +50 -0
  54. soothe_deepagents-0.7.16/soothe_deepagents/profiles/provider/_openai.py +24 -0
  55. soothe_deepagents-0.7.16/soothe_deepagents/profiles/provider/_openrouter.py +130 -0
  56. soothe_deepagents-0.7.16/soothe_deepagents/profiles/provider/provider_profiles.py +455 -0
  57. soothe_deepagents-0.7.16/soothe_deepagents/py.typed +0 -0
  58. soothe_deepagents-0.7.16/soothe_deepagents.egg-info/PKG-INFO +140 -0
  59. soothe_deepagents-0.7.16/soothe_deepagents.egg-info/SOURCES.txt +60 -0
  60. soothe_deepagents-0.7.16/soothe_deepagents.egg-info/dependency_links.txt +1 -0
  61. soothe_deepagents-0.7.16/soothe_deepagents.egg-info/requires.txt +16 -0
  62. soothe_deepagents-0.7.16/soothe_deepagents.egg-info/top_level.txt +1 -0
@@ -0,0 +1,140 @@
1
+ Metadata-Version: 2.4
2
+ Name: soothe-deepagents
3
+ Version: 0.7.16
4
+ Summary: General purpose 'deep agent' with sub-agent spawning, todo list capabilities, and mock file system. Built on LangGraph.
5
+ License: MIT
6
+ Project-URL: Homepage, https://docs.langchain.com/oss/python/deepagents/overview
7
+ Project-URL: Documentation, https://reference.langchain.com/python/deepagents/
8
+ Project-URL: Repository, https://github.com/mirasoth/soothe-deepagents
9
+ Project-URL: Issues, https://github.com/mirasoth/soothe-deepagents/issues
10
+ Project-URL: Twitter, https://x.com/langchain_oss
11
+ Project-URL: Slack, https://www.langchain.com/join-community
12
+ Project-URL: Reddit, https://www.reddit.com/r/LangChain/
13
+ Keywords: agents,ai,llm,langgraph,langchain,deep-agent,sub-agents,agentic
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: <4.0,>=3.11
25
+ Description-Content-Type: text/markdown
26
+ Requires-Dist: langchain<2.0.0,>=1.3.12
27
+ Requires-Dist: langchain-core<2.0.0,>=1.4.9
28
+ Requires-Dist: langchain-anthropic<2.0.0,>=1.4.8
29
+ Requires-Dist: langchain-google-genai<5.0.0,>=4.2.7
30
+ Requires-Dist: langsmith>=0.9.3
31
+ Requires-Dist: wcmatch>=10.1
32
+ Provides-Extra: aws
33
+ Requires-Dist: langchain-aws<2.0.0,>=1.6.2; extra == "aws"
34
+ Provides-Extra: quickjs
35
+ Requires-Dist: langchain-quickjs>=0.3.2; extra == "quickjs"
36
+ Provides-Extra: video
37
+ Requires-Dist: av<18.0.0,>=17.0.0; extra == "video"
38
+ Requires-Dist: pillow<13.0.0,>=10.0.0; extra == "video"
39
+
40
+ # 🧠🤖 Deep Agents Enhanced by Soothe
41
+
42
+ [![PyPI - Version](https://img.shields.io/pypi/v/soothe-deepagents?label=%20)](https://pypi.org/project/soothe-deepagents/#history)
43
+ [![PyPI - License](https://img.shields.io/pypi/l/soothe-deepagents)](https://opensource.org/licenses/MIT)
44
+ [![PyPI - Downloads](https://img.shields.io/pepy/dt/soothe-deepagents)](https://pypistats.org/packages/soothe-deepagents)
45
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchain_oss.svg?style=social&label=Follow%20%40LangChain)](https://x.com/langchain_oss)
46
+
47
+ Looking for the JS/TS version? Check out [Deep Agents.js](https://github.com/langchain-ai/deepagentsjs).
48
+
49
+ To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
50
+ LangSmith is a unified developer platform for building, testing, and monitoring LLM applications.
51
+
52
+ ## Quick Install
53
+
54
+ ```bash
55
+ uv add soothe-deepagents
56
+ ```
57
+
58
+ ## 🤔 What is this?
59
+
60
+ Deep Agents is an open source agent harness — an opinionated agent that runs out of the box. Extend, override, or replace any piece.
61
+
62
+ **Principles:**
63
+
64
+ - **Opinionated** — defaults tuned for long-horizon, multi-step work
65
+ - **Extensible** — override or replace any piece without forking
66
+ - **Model-agnostic** — works with any LLM that supports tool calling: frontier, open-weight, or local
67
+ - **Production-ready** — built on LangGraph (streaming, persistence, checkpointing) with first-class tracing, evaluation, and deployment via LangSmith
68
+
69
+ **Features include:**
70
+
71
+ - **Sub-agents** — delegate tasks to agents with isolated context windows
72
+ - **Filesystem** — read, write, edit, or search over pluggable local, sandboxed, or remote backends
73
+ - **Context management** — summarize long threads and offload tool outputs to disk
74
+ - **Shell access** — run commands in your sandbox of choice
75
+ - **Persistent memory** — pluggable state and store backends for cross-session recall
76
+ - **Human-in-the-loop** — approve, edit, or reject tool calls before they run
77
+ - **Skills** — reusable behaviors the agent can load on demand
78
+ - **Tools** — bring your own functions or any MCP server
79
+
80
+ ```python
81
+ from soothe_deepagents import create_deep_agent
82
+
83
+ # Legacy imports remain supported:
84
+ # from soothe_deepagents import create_deep_agent
85
+
86
+ agent = create_deep_agent(
87
+ model="openai:gpt-5.5",
88
+ tools=[my_custom_tool],
89
+ system_prompt="You are a research assistant.",
90
+ )
91
+ result = agent.invoke({"messages": "Research LangGraph and write a summary"})
92
+ ```
93
+
94
+ The agent can plan, read/write files, and manage its own context. Add your own tools, swap models, customize prompts, configure sub-agents, and more. For a full overview and quickstart of Deep Agents, the best resource is our [docs](https://docs.langchain.com/oss/python/deepagents/overview).
95
+
96
+ **Acknowledgements: This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.**
97
+
98
+ ## ❓ FAQ
99
+
100
+ ### How is this different from LangGraph or LangChain?
101
+
102
+ LangGraph is the graph runtime. LangChain's `create_agent` is a minimal agent harness on top of it. Deep Agents is a more opinionated harness on top of `create_agent` — same building blocks, but with filesystem, sub-agents, context management, and skills bundled in. For how the three relate, see the [LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products).
103
+
104
+ ### Does this work with open-weight or local models?
105
+
106
+ Yes. Any model that supports tool calling works — frontier APIs (OpenAI, Anthropic, Google), open-weight models hosted on providers like Baseten or Fireworks, and self-hosted models via Ollama, vLLM, or llama.cpp. Use any [LangChain chat model](https://docs.langchain.com/oss/python/langchain/models).
107
+
108
+ ### Can I use this in production?
109
+
110
+ Yes! Deep Agents is built on LangGraph, designed for production agent deployments. Pair it with [LangSmith](https://docs.langchain.com/langsmith/home) for tracing, evaluation, and monitoring. See [Going to production](https://docs.langchain.com/oss/python/deepagents/going-to-production) for the full guide.
111
+
112
+ ### When should I use Deep Agents vs. LangChain or LangGraph directly?
113
+
114
+ All three are layers in the same stack — see the [LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products) for how they relate. Use **Deep Agents** when you want the full harness — planning, context management, delegation — out of the box. Use [**LangChain's `create_agent`**](https://docs.langchain.com/oss/python/langchain/agents) when you want a lighter harness without the bundled middleware. Drop to [**LangGraph**](https://docs.langchain.com/oss/python/langgraph/overview) when the agent loop itself isn't the right shape and you need a custom graph.
115
+
116
+ The layers compose: any LangGraph `CompiledStateGraph` can be passed in as a sub-agent to a Deep Agent, so custom orchestration plugs in alongside the harness's defaults.
117
+
118
+ ## 📖 Resources
119
+
120
+ - **[Documentation](https://docs.langchain.com/oss/python/deepagents)** — Full documentation
121
+ - **[LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products)** — how Deep Agents, LangChain, LangGraph, and LangSmith fit together
122
+ - **[API Reference](https://reference.langchain.com/python/deepagents/)** — Full SDK reference documentation
123
+ - **[Examples](https://github.com/mirasoth/soothe-deepagents/tree/main/examples)** — Working agents and patterns
124
+ - **[Discussions](https://forum.langchain.com/c/oss-product-help-lc-and-lg/deep-agents/18)** — Community forum for technical questions, ideas, and feedback
125
+ - [LangChain Academy](https://academy.langchain.com/) — Comprehensive, free courses on LangChain libraries and products, made by the LangChain team.
126
+ - [Code of Conduct](https://github.com/langchain-ai/langchain/?tab=coc-ov-file) — community guidelines and standards
127
+
128
+ ## 📕 Releases & Versioning
129
+
130
+ See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning](https://docs.langchain.com/oss/python/versioning) policies.
131
+
132
+ ## 🔒 Security
133
+
134
+ Deep Agents follows a "trust the LLM" model. The agent can do anything its tools allow. Enforce boundaries at the tool/sandbox level, not by expecting the model to self-police. See the [security policy](https://github.com/mirasoth/soothe-deepagents?tab=security-ov-file) for more information.
135
+
136
+ ## 💁 Contributing
137
+
138
+ As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
139
+
140
+ For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview).
@@ -0,0 +1,101 @@
1
+ # 🧠🤖 Deep Agents Enhanced by Soothe
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/soothe-deepagents?label=%20)](https://pypi.org/project/soothe-deepagents/#history)
4
+ [![PyPI - License](https://img.shields.io/pypi/l/soothe-deepagents)](https://opensource.org/licenses/MIT)
5
+ [![PyPI - Downloads](https://img.shields.io/pepy/dt/soothe-deepagents)](https://pypistats.org/packages/soothe-deepagents)
6
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchain_oss.svg?style=social&label=Follow%20%40LangChain)](https://x.com/langchain_oss)
7
+
8
+ Looking for the JS/TS version? Check out [Deep Agents.js](https://github.com/langchain-ai/deepagentsjs).
9
+
10
+ To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
11
+ LangSmith is a unified developer platform for building, testing, and monitoring LLM applications.
12
+
13
+ ## Quick Install
14
+
15
+ ```bash
16
+ uv add soothe-deepagents
17
+ ```
18
+
19
+ ## 🤔 What is this?
20
+
21
+ Deep Agents is an open source agent harness — an opinionated agent that runs out of the box. Extend, override, or replace any piece.
22
+
23
+ **Principles:**
24
+
25
+ - **Opinionated** — defaults tuned for long-horizon, multi-step work
26
+ - **Extensible** — override or replace any piece without forking
27
+ - **Model-agnostic** — works with any LLM that supports tool calling: frontier, open-weight, or local
28
+ - **Production-ready** — built on LangGraph (streaming, persistence, checkpointing) with first-class tracing, evaluation, and deployment via LangSmith
29
+
30
+ **Features include:**
31
+
32
+ - **Sub-agents** — delegate tasks to agents with isolated context windows
33
+ - **Filesystem** — read, write, edit, or search over pluggable local, sandboxed, or remote backends
34
+ - **Context management** — summarize long threads and offload tool outputs to disk
35
+ - **Shell access** — run commands in your sandbox of choice
36
+ - **Persistent memory** — pluggable state and store backends for cross-session recall
37
+ - **Human-in-the-loop** — approve, edit, or reject tool calls before they run
38
+ - **Skills** — reusable behaviors the agent can load on demand
39
+ - **Tools** — bring your own functions or any MCP server
40
+
41
+ ```python
42
+ from soothe_deepagents import create_deep_agent
43
+
44
+ # Legacy imports remain supported:
45
+ # from soothe_deepagents import create_deep_agent
46
+
47
+ agent = create_deep_agent(
48
+ model="openai:gpt-5.5",
49
+ tools=[my_custom_tool],
50
+ system_prompt="You are a research assistant.",
51
+ )
52
+ result = agent.invoke({"messages": "Research LangGraph and write a summary"})
53
+ ```
54
+
55
+ The agent can plan, read/write files, and manage its own context. Add your own tools, swap models, customize prompts, configure sub-agents, and more. For a full overview and quickstart of Deep Agents, the best resource is our [docs](https://docs.langchain.com/oss/python/deepagents/overview).
56
+
57
+ **Acknowledgements: This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.**
58
+
59
+ ## ❓ FAQ
60
+
61
+ ### How is this different from LangGraph or LangChain?
62
+
63
+ LangGraph is the graph runtime. LangChain's `create_agent` is a minimal agent harness on top of it. Deep Agents is a more opinionated harness on top of `create_agent` — same building blocks, but with filesystem, sub-agents, context management, and skills bundled in. For how the three relate, see the [LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products).
64
+
65
+ ### Does this work with open-weight or local models?
66
+
67
+ Yes. Any model that supports tool calling works — frontier APIs (OpenAI, Anthropic, Google), open-weight models hosted on providers like Baseten or Fireworks, and self-hosted models via Ollama, vLLM, or llama.cpp. Use any [LangChain chat model](https://docs.langchain.com/oss/python/langchain/models).
68
+
69
+ ### Can I use this in production?
70
+
71
+ Yes! Deep Agents is built on LangGraph, designed for production agent deployments. Pair it with [LangSmith](https://docs.langchain.com/langsmith/home) for tracing, evaluation, and monitoring. See [Going to production](https://docs.langchain.com/oss/python/deepagents/going-to-production) for the full guide.
72
+
73
+ ### When should I use Deep Agents vs. LangChain or LangGraph directly?
74
+
75
+ All three are layers in the same stack — see the [LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products) for how they relate. Use **Deep Agents** when you want the full harness — planning, context management, delegation — out of the box. Use [**LangChain's `create_agent`**](https://docs.langchain.com/oss/python/langchain/agents) when you want a lighter harness without the bundled middleware. Drop to [**LangGraph**](https://docs.langchain.com/oss/python/langgraph/overview) when the agent loop itself isn't the right shape and you need a custom graph.
76
+
77
+ The layers compose: any LangGraph `CompiledStateGraph` can be passed in as a sub-agent to a Deep Agent, so custom orchestration plugs in alongside the harness's defaults.
78
+
79
+ ## 📖 Resources
80
+
81
+ - **[Documentation](https://docs.langchain.com/oss/python/deepagents)** — Full documentation
82
+ - **[LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products)** — how Deep Agents, LangChain, LangGraph, and LangSmith fit together
83
+ - **[API Reference](https://reference.langchain.com/python/deepagents/)** — Full SDK reference documentation
84
+ - **[Examples](https://github.com/mirasoth/soothe-deepagents/tree/main/examples)** — Working agents and patterns
85
+ - **[Discussions](https://forum.langchain.com/c/oss-product-help-lc-and-lg/deep-agents/18)** — Community forum for technical questions, ideas, and feedback
86
+ - [LangChain Academy](https://academy.langchain.com/) — Comprehensive, free courses on LangChain libraries and products, made by the LangChain team.
87
+ - [Code of Conduct](https://github.com/langchain-ai/langchain/?tab=coc-ov-file) — community guidelines and standards
88
+
89
+ ## 📕 Releases & Versioning
90
+
91
+ See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning](https://docs.langchain.com/oss/python/versioning) policies.
92
+
93
+ ## 🔒 Security
94
+
95
+ Deep Agents follows a "trust the LLM" model. The agent can do anything its tools allow. Enforce boundaries at the tool/sandbox level, not by expecting the model to self-police. See the [security policy](https://github.com/mirasoth/soothe-deepagents?tab=security-ov-file) for more information.
96
+
97
+ ## 💁 Contributing
98
+
99
+ As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
100
+
101
+ For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview).
@@ -0,0 +1,174 @@
1
+ [project]
2
+ name = "soothe-deepagents"
3
+ dynamic = ["version"]
4
+
5
+ description = "General purpose 'deep agent' with sub-agent spawning, todo list capabilities, and mock file system. Built on LangGraph."
6
+ readme = "README.md"
7
+ license = { text = "MIT" }
8
+ requires-python = ">=3.11,<4.0"
9
+ keywords = ["agents", "ai", "llm", "langgraph", "langchain", "deep-agent", "sub-agents", "agentic"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
20
+ "Topic :: Software Development :: Libraries :: Python Modules",
21
+ ]
22
+ dependencies = [
23
+ "langchain>=1.3.12,<2.0.0",
24
+ "langchain-core>=1.4.9,<2.0.0",
25
+ "langchain-anthropic>=1.4.8,<2.0.0",
26
+ "langchain-google-genai>=4.2.7,<5.0.0",
27
+ "langsmith>=0.9.3",
28
+ "wcmatch>=10.1",
29
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ aws = ["langchain-aws>=1.6.2,<2.0.0"]
33
+ quickjs = ["langchain-quickjs>=0.3.2"]
34
+ video = ["av>=17.0.0,<18.0.0", "pillow>=10.0.0,<13.0.0"]
35
+
36
+ [project.urls]
37
+ Homepage = "https://docs.langchain.com/oss/python/deepagents/overview"
38
+ Documentation = "https://reference.langchain.com/python/deepagents/"
39
+ Repository = "https://github.com/mirasoth/soothe-deepagents"
40
+ Issues = "https://github.com/mirasoth/soothe-deepagents/issues"
41
+ Twitter = "https://x.com/langchain_oss"
42
+ Slack = "https://www.langchain.com/join-community"
43
+ Reddit = "https://www.reddit.com/r/LangChain/"
44
+
45
+
46
+ [dependency-groups]
47
+ test = [
48
+ "pytest",
49
+ "pytest-benchmark",
50
+ "pytest-codspeed>=5.0.3,<6.0.0",
51
+ "pytest-cov",
52
+ "pytest-xdist",
53
+ "pytest-timeout>=2.4.0,<3.0.0",
54
+ "pytest-socket",
55
+ "pytest-watcher>=0.6.3,<1.0.0",
56
+ "ruff>=0.15.20,<0.16.0",
57
+ "ty>=0.0.54,<1.0.0",
58
+ "pytest-asyncio>=1.4.0",
59
+ "langchain-tests>=1.1.9",
60
+ "langchain-openai",
61
+ "twine",
62
+ "build",
63
+ # Lazy-imported at runtime so the core package does
64
+ # not depend on them. ty still sees the import names and
65
+ # needs stubs, so we install them into the type-checker venv.
66
+ "av>=17.0.0,<18.0.0",
67
+ "pillow>=10.0.0,<13.0.0",
68
+ ]
69
+ [build-system]
70
+ requires = ["setuptools>=82.0.1", "wheel"]
71
+ build-backend = "setuptools.build_meta"
72
+
73
+ [tool.setuptools.packages.find]
74
+ include = ["soothe_deepagents*"]
75
+
76
+ [tool.setuptools.package-data]
77
+ "*" = ["py.typed", "*.md"]
78
+
79
+ [tool.setuptools.dynamic]
80
+ version = { attr = "soothe_deepagents._version.__version__" }
81
+
82
+ [tool.ruff]
83
+ line-length = 150
84
+
85
+ [tool.ruff.format]
86
+ docstring-code-format = true # Formats code blocks in docstrings
87
+
88
+ [tool.ruff.lint]
89
+ select = [
90
+ "ALL" # Enable all rules by default
91
+ ]
92
+ ignore = [
93
+ "COM812", # Trailing comma missing — conflicts with the ruff formatter
94
+ "ISC001", # Implicit string concatenation on one line — conflicts with the ruff formatter
95
+ "PERF203", # `try`-`except` within a loop — incurs overhead only when exceptions are common
96
+ "SLF001", # Access to a private member of an external class
97
+ "PLR0913", # Too many arguments to function definition
98
+ "PLC0414", # Import alias does not rename original package — conflicts with type-checker re-export conventions
99
+ ]
100
+ unfixable = ["B028"] # Rules that shouldn't be auto-fixed
101
+ extend-safe-fixes = ["PLR6201"]
102
+
103
+ [tool.ruff.lint.pyupgrade]
104
+ keep-runtime-typing = true
105
+
106
+ [tool.ruff.lint.flake8-annotations]
107
+ allow-star-arg-any = true
108
+
109
+ [tool.ruff.lint.flake8-tidy-imports]
110
+ ban-relative-imports = "all"
111
+
112
+ [tool.ruff.lint.isort]
113
+ force-single-line = false
114
+ combine-as-imports = true
115
+ known-first-party = ["soothe_deepagents"]
116
+
117
+ [tool.ruff.lint.pydocstyle]
118
+ convention = "google" # Google-style docstrings
119
+ ignore-var-parameters = true
120
+
121
+ [tool.ruff.lint.per-file-ignores]
122
+ # Tests: relax annotations, docstrings, magic values, security, and assertion style
123
+ "tests/**" = [
124
+ "ANN001", # Missing type annotation for function argument
125
+ "ANN201", # Missing return type annotation for public function
126
+ "ANN202", # Missing return type annotation for private function
127
+ "ARG002", # Unused method argument — common for pytest fixtures
128
+ "D1", # Missing docstrings
129
+ "PLR2004", # Magic value used in comparison — fine in test assertions
130
+ "PT018", # Assertion should be broken down into multiple parts
131
+ "S101", # Use of `assert` detected
132
+ "S311", # Pseudo-random generator not suitable for security — fine in tests
133
+ ]
134
+ # Scripts: allow prints, broad exceptions, and standalone modules
135
+ "scripts/**" = [
136
+ "BLE001", # Blind exception catch — resilience in standalone scripts
137
+ "INP001", # Missing `__init__.py` — scripts are standalone
138
+ ]
139
+
140
+ [tool.pytest.ini_options]
141
+ asyncio_mode = "auto"
142
+ addopts = "-m 'not benchmark'"
143
+ filterwarnings = [
144
+ "ignore:Passing `model=None` to `create_deep_agent`:DeprecationWarning",
145
+ # Tests intentionally exercise the legacy `list[str]` store content format
146
+ # for backwards-compat coverage; the deprecation fires from internal code.
147
+ "ignore:Store item with `list\\[str\\]` content is deprecated:DeprecationWarning",
148
+ # `files_update` is exercised by middleware tests verifying internal handling.
149
+ "ignore:`files_update` was deprecated:DeprecationWarning",
150
+ # Legacy `FileData` `list[str]` content shape, exercised for compat coverage.
151
+ "ignore:`FileData` with `list\\[str\\]` content is deprecated:DeprecationWarning",
152
+ # Filesystem middleware tests still exercise the factory/runtime backend path.
153
+ "ignore:Passing a callable \\(factory\\) as `backend` is deprecated:DeprecationWarning",
154
+ "ignore:Passing `runtime` to `StateBackend` is deprecated:DeprecationWarning",
155
+ # `virtual_mode` default-change notice; tests assert legacy behavior explicitly.
156
+ "ignore:`LocalShellBackend` `virtual_mode` default will change:DeprecationWarning",
157
+ "ignore:`FilesystemBackend` `virtual_mode` default will change:DeprecationWarning",
158
+ # `langsmith.sandbox` is alpha upstream; the FutureWarning fires on import.
159
+ "ignore:langsmith.sandbox is in alpha:FutureWarning",
160
+ # pytest-cov complains when invoked with `--no-cov` (used for fast runs).
161
+ "ignore::pytest_cov.plugin.CovDisabledWarning",
162
+ ]
163
+ markers = [
164
+ "benchmark: wall-time benchmarks for construction performance",
165
+ ]
166
+
167
+ [tool.ty.environment]
168
+ python-version = "3.11"
169
+
170
+ [tool.ty.rules]
171
+ # Most rules are enabled by default. Enable rules that are disabled by default:
172
+ division-by-zero = "error"
173
+ # Add rules here to ignore, e.g.:
174
+ # possibly-unresolved-reference = "ignore"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,50 @@
1
+ """Deep Agents package."""
2
+
3
+ from soothe_deepagents._version import __version__
4
+ from soothe_deepagents.graph import (
5
+ DeepAgentState,
6
+ SystemPromptConfig,
7
+ create_deep_agent,
8
+ )
9
+ from soothe_deepagents.middleware.async_subagents import AsyncSubAgent, AsyncSubAgentMiddleware
10
+ from soothe_deepagents.middleware.filesystem import FilesystemMiddleware, FilesystemPermission, FsToolName
11
+ from soothe_deepagents.middleware.memory import MemoryMiddleware
12
+ from soothe_deepagents.middleware.rubric import RubricMiddleware
13
+ from soothe_deepagents.middleware.subagents import (
14
+ CompiledSubAgent,
15
+ SubAgent,
16
+ SubAgentMiddleware,
17
+ )
18
+ from soothe_deepagents.profiles.harness.harness_profiles import (
19
+ GeneralPurposeSubagentProfile,
20
+ HarnessProfile,
21
+ HarnessProfileConfig,
22
+ register_harness_profile,
23
+ )
24
+ from soothe_deepagents.profiles.provider.provider_profiles import (
25
+ ProviderProfile,
26
+ register_provider_profile,
27
+ )
28
+
29
+ __all__ = [
30
+ "AsyncSubAgent",
31
+ "AsyncSubAgentMiddleware",
32
+ "CompiledSubAgent",
33
+ "DeepAgentState",
34
+ "FilesystemMiddleware",
35
+ "FilesystemPermission",
36
+ "FsToolName",
37
+ "GeneralPurposeSubagentProfile",
38
+ "HarnessProfile",
39
+ "HarnessProfileConfig",
40
+ "MemoryMiddleware",
41
+ "ProviderProfile",
42
+ "RubricMiddleware",
43
+ "SubAgent",
44
+ "SubAgentMiddleware",
45
+ "SystemPromptConfig",
46
+ "__version__",
47
+ "create_deep_agent",
48
+ "register_harness_profile",
49
+ "register_provider_profile",
50
+ ]
@@ -0,0 +1,5 @@
1
+ """Internal helpers for `soothe_deepagents`.
2
+
3
+ Modules under this package are private. Their API is allowed to change between
4
+ minor releases without deprecation.
5
+ """
@@ -0,0 +1,131 @@
1
+ """Adapter for `langchain_core`'s private deprecation helpers.
2
+
3
+ Centralizes the import surface so an upstream rename or move is a one-file
4
+ change.
5
+
6
+ Re-exports:
7
+ - `deprecated`: decorator for callables, classes, and properties.
8
+ - `warn_deprecated`: helper for parameter/value-level deprecations where the
9
+ callable itself isn't being deprecated. Wraps the upstream helper to
10
+ accept a `stacklevel` argument (the upstream version hardcodes
11
+ `stacklevel=4`, which mis-attributes warnings emitted directly from a
12
+ deprecated method body).
13
+ - `suppress_langchain_deprecation_warning`: context manager that silences
14
+ emissions from this module's helpers (use sparingly — it is type-wide).
15
+ - `LangChainDeprecationWarning`: warning class emitted by the helpers above
16
+ (subclass of `DeprecationWarning`).
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ import warnings
22
+
23
+ from langchain_core._api.deprecation import (
24
+ LangChainDeprecationWarning,
25
+ deprecated,
26
+ suppress_langchain_deprecation_warning,
27
+ warn_deprecated as _lc_warn_deprecated,
28
+ )
29
+
30
+ __all__ = [
31
+ "LangChainDeprecationWarning",
32
+ "deprecated",
33
+ "reset_deprecation_dedupe",
34
+ "suppress_langchain_deprecation_warning",
35
+ "warn_deprecated",
36
+ ]
37
+
38
+
39
+ def warn_deprecated(
40
+ since: str,
41
+ *,
42
+ message: str = "",
43
+ name: str = "",
44
+ alternative: str = "",
45
+ alternative_import: str = "",
46
+ pending: bool = False,
47
+ obj_type: str = "",
48
+ addendum: str = "",
49
+ removal: str = "",
50
+ package: str = "",
51
+ stacklevel: int = 2,
52
+ ) -> None:
53
+ """Emit a deprecation warning with caller-controlled stack attribution.
54
+
55
+ `langchain_core.warn_deprecated` formats a standard message but hardcodes
56
+ `stacklevel=4` in its internal `warnings.warn` call. That value targets a
57
+ decorator-wrapped frame layout; when called directly from a deprecated
58
+ method's body the warning is attributed one frame too high (above the
59
+ user's call site). This wrapper captures the formatted upstream warning
60
+ and re-emits it with an explicit `stacklevel`, so the warning points at
61
+ the user's call site.
62
+
63
+ Args:
64
+ since: Release at which this API became deprecated.
65
+ message: Override the default deprecation message. See upstream
66
+ `langchain_core.warn_deprecated` for supported format specifiers.
67
+ name: Name of the deprecated object.
68
+ alternative: Alternative API the user may use instead.
69
+ alternative_import: Alternative import path the user may use instead.
70
+ pending: If `True`, uses a `PendingDeprecationWarning` instead of a
71
+ `DeprecationWarning`. Cannot be combined with `removal`.
72
+ obj_type: Object type label (e.g., `"function"`, `"class"`).
73
+ addendum: Additional text appended to the final message.
74
+ removal: Expected removal version. Cannot be combined with `pending`.
75
+ package: Package name attribution for the deprecation message.
76
+ stacklevel: Frames above this call to attribute the warning to,
77
+ using the same convention as `warnings.warn` (`1` = this call,
78
+ `2` = the caller of the method body that invoked us, etc.).
79
+ """
80
+ with warnings.catch_warnings(record=True) as captured:
81
+ warnings.simplefilter("always")
82
+ _lc_warn_deprecated(
83
+ since,
84
+ message=message,
85
+ name=name,
86
+ alternative=alternative,
87
+ alternative_import=alternative_import,
88
+ pending=pending,
89
+ obj_type=obj_type,
90
+ addendum=addendum,
91
+ removal=removal,
92
+ package=package,
93
+ )
94
+ if not captured:
95
+ return
96
+ record = captured[0]
97
+ warnings.warn(record.message, category=record.category, stacklevel=stacklevel + 1)
98
+
99
+
100
+ def reset_deprecation_dedupe(*targets: object) -> None:
101
+ """Reset the `@deprecated` decorator's dedupe flag for testing.
102
+
103
+ The langchain_core `@deprecated` decorator emits each warning at most once
104
+ per process via a closure-bound `warned` flag. Tests that assert per-call
105
+ emission must reset that flag between cases — otherwise the assertions
106
+ become reorder-sensitive (notably under `pytest -n auto`).
107
+
108
+ Accepts decorated functions, methods, and `property` objects (in which
109
+ case the `fget` closure is reset). Targets without the expected `warned`
110
+ freevar are silently skipped, so passing non-decorated callables is safe.
111
+
112
+ Args:
113
+ *targets: Decorated callables (or properties wrapping them) to reset.
114
+ """
115
+ for target in targets:
116
+ fn = target.fget if isinstance(target, property) else target
117
+ code = getattr(fn, "__code__", None)
118
+ closure = getattr(fn, "__closure__", None)
119
+ if code is None or closure is None:
120
+ continue
121
+ try:
122
+ index = code.co_freevars.index("warned")
123
+ except ValueError:
124
+ continue
125
+ cell = closure[index]
126
+ try:
127
+ current = cell.cell_contents
128
+ except ValueError: # empty cell
129
+ continue
130
+ if isinstance(current, bool):
131
+ cell.cell_contents = False