deepagent-code 0.1.5__tar.gz → 0.2.0__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.
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 deepagent-code contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 deepagent-code contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,164 +1,193 @@
1
- Metadata-Version: 2.4
2
- Name: deepagent-code
3
- Version: 0.1.5
4
- Summary: A Claude Code-style CLI for running LangGraph agents from the terminal
5
- Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/dkedar7/deepagent-code
8
- Project-URL: Repository, https://github.com/dkedar7/deepagent-code
9
- Project-URL: Issues, https://github.com/dkedar7/deepagent-code/issues
10
- Keywords: langgraph,cli,agents,llm,ai,claude-code
11
- Classifier: Development Status :: 3 - Alpha
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Programming Language :: Python :: 3.13
17
- Classifier: Programming Language :: Python :: 3.14
18
- Requires-Python: >=3.11
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: langgraph>=0.2.0
22
- Requires-Dist: click>=8.0.0
23
- Requires-Dist: python-dotenv
24
- Requires-Dist: deepagents
25
- Provides-Extra: dev
26
- Requires-Dist: pytest>=7.0.0; extra == "dev"
27
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
28
- Requires-Dist: black>=23.0.0; extra == "dev"
29
- Requires-Dist: ruff>=0.1.0; extra == "dev"
30
- Requires-Dist: mypy>=1.0.0; extra == "dev"
31
- Dynamic: license-file
32
-
33
- # deepagent-code
34
-
35
- A Claude Code-style CLI for running LangGraph agents from the terminal.
36
-
37
- ![deepagent-code](examples/image.png)
38
-
39
- ## Installation
40
-
41
- ```bash
42
- pip install deepagent-code
43
- ```
44
-
45
- Or install directly from GitHub:
46
- ```bash
47
- pip install git+https://github.com/dkedar7/deepagent-code.git
48
- ```
49
-
50
- ## Quick Start
51
-
52
- Run with the default agent (requires `ANTHROPIC_API_KEY`):
53
- ```bash
54
- export ANTHROPIC_API_KEY="your_api_key"
55
- deepagent-code
56
- ```
57
-
58
- Or specify your own agent:
59
- ```bash
60
- deepagent-code -a path/to/your_agent.py:graph
61
- ```
62
-
63
- This launches an interactive conversation loop with your agent.
64
-
65
- ## Usage
66
-
67
- ```bash
68
- # Use the default agent
69
- deepagent-code
70
-
71
- # Send a message directly
72
- deepagent-code "Hello, agent!"
73
-
74
- # Specify a custom agent file
75
- deepagent-code -a my_agent.py:graph
76
-
77
- # Use a module path
78
- deepagent-code -a mypackage.agents:chatbot
79
-
80
- # Read message from a file
81
- deepagent-code -f ./prompt.md
82
-
83
- # Non-interactive mode (auto-approve tool calls)
84
- deepagent-code --no-interactive
85
-
86
- # Verbose output
87
- deepagent-code -v
88
- ```
89
-
90
- ## Commands
91
-
92
- In the interactive loop:
93
- - `/q` or `/quit` - Exit
94
- - `/c` - Clear conversation history
95
- - `/h` or `/help` - Show help
96
-
97
- ## Environment Variables
98
-
99
- ```bash
100
- # Agent location (path/to/file.py:variable_name or module:variable)
101
- export DEEPAGENT_SPEC="my_agent.py:graph"
102
- deepagent-code
103
-
104
- # Working directory
105
- export DEEPAGENT_WORKSPACE_ROOT="/path/to/workspace"
106
-
107
- # Configuration
108
- export DEEPAGENT_CONFIG='{"configurable": {"thread_id": "1"}}'
109
- ```
110
-
111
- ## CLI Options
112
-
113
- ```
114
- Usage: deepagent-code [OPTIONS] [MESSAGE]
115
-
116
- Arguments:
117
- MESSAGE Optional input to send to the agent immediately
118
-
119
- Options:
120
- -a, --agent TEXT Agent spec (path/to/file.py:graph or module:graph)
121
- -g, --graph-name TEXT Graph variable name (default: "graph")
122
- -f, --file PATH Read message from a file (any extension)
123
- -c, --config TEXT Config JSON or file path
124
- --interactive/--no-interactive Handle interrupts (default: interactive)
125
- --async-mode/--sync-mode Async streaming (default: sync)
126
- -v, --verbose Verbose output
127
- ```
128
-
129
- ## Creating Your Own Agent
130
-
131
- Your agent file should export a compiled LangGraph graph:
132
-
133
- ```python
134
- # my_agent.py
135
- from deepagents import create_deep_agent
136
- from langgraph.checkpoint.memory import MemorySaver
137
-
138
- agent = create_deep_agent(
139
- name="My Agent",
140
- model="anthropic:claude-sonnet-4-20250514",
141
- checkpointer=MemorySaver(),
142
- )
143
- ```
144
-
145
- Then run it:
146
- ```bash
147
- deepagent-code -a my_agent.py:agent
148
- ```
149
-
150
- ## Programmatic Use
151
-
152
- ```python
153
- from deepagent_code import stream_graph_updates, prepare_agent_input
154
-
155
- input_data = prepare_agent_input(message="Hello!")
156
-
157
- for chunk in stream_graph_updates(graph, input_data):
158
- if chunk.get("chunk"):
159
- print(chunk["chunk"], end="")
160
- ```
161
-
162
- ## License
163
-
164
- MIT License - see LICENSE file for details.
1
+ Metadata-Version: 2.4
2
+ Name: deepagent-code
3
+ Version: 0.2.0
4
+ Summary: A Claude Code-style CLI for running LangGraph agents from the terminal
5
+ Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dkedar7/deepagent-code
8
+ Project-URL: Repository, https://github.com/dkedar7/deepagent-code
9
+ Project-URL: Issues, https://github.com/dkedar7/deepagent-code/issues
10
+ Keywords: langgraph,cli,agents,llm,ai,claude-code
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: langgraph>=0.2.0
22
+ Requires-Dist: langgraph-stream-parser<0.3,>=0.2
23
+ Requires-Dist: click>=8.0.0
24
+ Requires-Dist: python-dotenv
25
+ Requires-Dist: deepagents
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
28
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
29
+ Requires-Dist: black>=23.0.0; extra == "dev"
30
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
31
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # deepagent-code
35
+
36
+ A Claude Code-style CLI for running LangGraph agents from the terminal.
37
+
38
+ ![deepagent-code](examples/image.png)
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pip install deepagent-code
44
+ ```
45
+
46
+ Or install directly from GitHub:
47
+ ```bash
48
+ pip install git+https://github.com/dkedar7/deepagent-code.git
49
+ ```
50
+
51
+ ## Quick Start
52
+
53
+ Run with the default agent (requires `ANTHROPIC_API_KEY`):
54
+ ```bash
55
+ export ANTHROPIC_API_KEY="your_api_key"
56
+ deepagent-code
57
+ ```
58
+
59
+ Or specify your own agent:
60
+ ```bash
61
+ deepagent-code -a path/to/your_agent.py:graph
62
+ ```
63
+
64
+ This launches an interactive conversation loop with your agent.
65
+
66
+ ## Usage
67
+
68
+ ```bash
69
+ # Use the default agent
70
+ deepagent-code
71
+
72
+ # Send a message directly
73
+ deepagent-code "Hello, agent!"
74
+
75
+ # Specify a custom agent file
76
+ deepagent-code -a my_agent.py:graph
77
+
78
+ # Use a module path
79
+ deepagent-code -a mypackage.agents:chatbot
80
+
81
+ # Read message from a file
82
+ deepagent-code -f ./prompt.md
83
+
84
+ # Non-interactive mode (auto-approve tool calls)
85
+ deepagent-code --no-interactive
86
+
87
+ # Verbose output
88
+ deepagent-code -v
89
+ ```
90
+
91
+ ## Commands
92
+
93
+ In the interactive loop:
94
+ - `/q` or `/quit` - Exit
95
+ - `/c` - Clear conversation history
96
+ - `/h` or `/help` - Show help
97
+
98
+ ## Environment Variables
99
+
100
+ ```bash
101
+ # Agent location (path/to/file.py:variable_name or module:variable)
102
+ export DEEPAGENT_SPEC="my_agent.py:graph"
103
+ deepagent-code
104
+
105
+ # Working directory
106
+ export DEEPAGENT_WORKSPACE_ROOT="/path/to/workspace"
107
+
108
+ # Stream mode (updates or values)
109
+ export DEEPAGENT_STREAM_MODE="updates"
110
+ ```
111
+
112
+ ## Configuration Files
113
+
114
+ `deepagent-code` reads TOML config from two locations and merges them
115
+ (project overrides global):
116
+
117
+ - **Global**: `~/.deepagents/config.toml` (shared with the upstream
118
+ `deepagents` CLI)
119
+ - **Project**: `deepagents.toml` in the current directory or any ancestor
120
+
121
+ Precedence: CLI args > env vars > project TOML > global TOML > defaults.
122
+
123
+ Example `deepagents.toml`:
124
+
125
+ ```toml
126
+ [agent]
127
+ spec = "my_agent.py:graph"
128
+ workspace_root = "."
129
+
130
+ [ui]
131
+ verbose = true
132
+ async_mode = false
133
+ stream_mode = "updates"
134
+
135
+ [configurable]
136
+ # seeds LangGraph RunnableConfig.configurable
137
+ thread_id = "my-thread"
138
+ ```
139
+
140
+ ## CLI Options
141
+
142
+ ```
143
+ Usage: deepagent-code [OPTIONS] [MESSAGE]
144
+
145
+ Arguments:
146
+ MESSAGE Optional input to send to the agent immediately
147
+
148
+ Options:
149
+ -a, --agent TEXT Agent spec (path/to/file.py:graph or module:graph)
150
+ -g, --graph-name TEXT Graph variable name (default: "graph")
151
+ -f, --file PATH Read message from a file (any extension)
152
+ --interactive/--no-interactive Handle interrupts (default: interactive)
153
+ --async-mode/--sync-mode Async streaming (default: sync)
154
+ --stream-mode TEXT Stream mode (updates or values)
155
+ -v, --verbose Verbose output
156
+ ```
157
+
158
+ ## Creating Your Own Agent
159
+
160
+ Your agent file should export a compiled LangGraph graph:
161
+
162
+ ```python
163
+ # my_agent.py
164
+ from deepagents import create_deep_agent
165
+ from langgraph.checkpoint.memory import MemorySaver
166
+
167
+ agent = create_deep_agent(
168
+ name="My Agent",
169
+ model="anthropic:claude-sonnet-4-20250514",
170
+ checkpointer=MemorySaver(),
171
+ )
172
+ ```
173
+
174
+ Then run it:
175
+ ```bash
176
+ deepagent-code -a my_agent.py:agent
177
+ ```
178
+
179
+ ## Programmatic Use
180
+
181
+ ```python
182
+ from deepagent_code import stream_graph_updates, prepare_agent_input
183
+
184
+ input_data = prepare_agent_input(message="Hello!")
185
+
186
+ for chunk in stream_graph_updates(graph, input_data):
187
+ if chunk.get("chunk"):
188
+ print(chunk["chunk"], end="")
189
+ ```
190
+
191
+ ## License
192
+
193
+ MIT License - see LICENSE file for details.