kader 0.1.5__py3-none-any.whl → 1.0.0__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.
- cli/app.py +98 -61
- cli/app.tcss +27 -382
- cli/utils.py +1 -6
- cli/widgets/conversation.py +50 -4
- kader/__init__.py +2 -0
- kader/agent/agents.py +8 -0
- kader/agent/base.py +68 -5
- kader/memory/types.py +60 -0
- kader/prompts/__init__.py +9 -1
- kader/prompts/agent_prompts.py +28 -0
- kader/prompts/templates/executor_agent.j2 +70 -0
- kader/prompts/templates/kader_planner.j2 +71 -0
- kader/providers/ollama.py +2 -2
- kader/tools/__init__.py +26 -0
- kader/tools/agent.py +452 -0
- kader/tools/filesys.py +1 -1
- kader/tools/todo.py +43 -2
- kader/utils/__init__.py +10 -0
- kader/utils/checkpointer.py +371 -0
- kader/utils/context_aggregator.py +347 -0
- kader/workflows/__init__.py +13 -0
- kader/workflows/base.py +71 -0
- kader/workflows/planner_executor.py +251 -0
- {kader-0.1.5.dist-info → kader-1.0.0.dist-info}/METADATA +38 -1
- {kader-0.1.5.dist-info → kader-1.0.0.dist-info}/RECORD +27 -18
- {kader-0.1.5.dist-info → kader-1.0.0.dist-info}/WHEEL +0 -0
- {kader-0.1.5.dist-info → kader-1.0.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kader
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: kader coding agent
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
|
+
Requires-Dist: aiofiles>=25.1.0
|
|
6
7
|
Requires-Dist: faiss-cpu>=1.9.0
|
|
7
8
|
Requires-Dist: jinja2>=3.1.6
|
|
8
9
|
Requires-Dist: loguru>=0.7.3
|
|
@@ -32,6 +33,7 @@ Kader is an intelligent coding agent designed to assist with software developmen
|
|
|
32
33
|
- 🔄 **ReAct Agent Framework** - Reasoning and Acting agent architecture
|
|
33
34
|
- 🗂️ **File System Tools** - Read, write, search, and edit files
|
|
34
35
|
- 🔍 **Planning Agent** - Task planning and execution capabilities
|
|
36
|
+
- 🤝 **Agent-As-Tool** - Spawn sub-agents for specific tasks with isolated memory
|
|
35
37
|
|
|
36
38
|
## Installation
|
|
37
39
|
|
|
@@ -177,6 +179,40 @@ Kader provides several agent types:
|
|
|
177
179
|
- **PlanningAgent**: Agent that plans multi-step tasks
|
|
178
180
|
- **BaseAgent**: Base agent class for creating custom agents
|
|
179
181
|
|
|
182
|
+
### Agent-As-Tool (AgentTool)
|
|
183
|
+
|
|
184
|
+
The `AgentTool` allows you to wrap a `ReActAgent` as a callable tool, enabling agents to spawn sub-agents for specific tasks with isolated memory contexts.
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
from kader.tools import AgentTool
|
|
188
|
+
|
|
189
|
+
# Autonomous execution (runs without pausing for confirmation)
|
|
190
|
+
autonomous_agent = AgentTool(
|
|
191
|
+
name="research_agent",
|
|
192
|
+
description="Research topics autonomously",
|
|
193
|
+
interrupt_before_tool=False,
|
|
194
|
+
)
|
|
195
|
+
result = autonomous_agent.execute(task="Find info about topic X")
|
|
196
|
+
|
|
197
|
+
# Interactive execution (pauses for user confirmation before each tool)
|
|
198
|
+
def my_callback(tool_call_dict, llm_content=None):
|
|
199
|
+
user_input = input("Execute? [y/n]: ")
|
|
200
|
+
return (user_input.lower() == 'y', None)
|
|
201
|
+
|
|
202
|
+
interactive_agent = AgentTool(
|
|
203
|
+
name="interactive_agent",
|
|
204
|
+
interrupt_before_tool=True,
|
|
205
|
+
tool_confirmation_callback=my_callback,
|
|
206
|
+
)
|
|
207
|
+
result = interactive_agent.execute(task="Analyze data and generate report")
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Key Features:**
|
|
211
|
+
- Each sub-agent has isolated memory (separate `SlidingWindowConversationManager`)
|
|
212
|
+
- Default tools included: filesystem, web search, command executor
|
|
213
|
+
- Optional `interrupt_before_tool` for user confirmation before tool execution
|
|
214
|
+
- Task completes when the agent returns its final response
|
|
215
|
+
|
|
180
216
|
### Memory Management
|
|
181
217
|
|
|
182
218
|
Kader's memory system includes:
|
|
@@ -194,6 +230,7 @@ Kader includes a rich set of tools:
|
|
|
194
230
|
- **Command Executor**: Execute shell commands safely
|
|
195
231
|
- **Web Tools**: Search and fetch web content
|
|
196
232
|
- **RAG Tools**: Retrieval Augmented Generation capabilities
|
|
233
|
+
- **AgentTool**: Spawn sub-agents for specific tasks
|
|
197
234
|
|
|
198
235
|
## Examples
|
|
199
236
|
|
|
@@ -1,45 +1,54 @@
|
|
|
1
1
|
cli/README.md,sha256=DY3X7w6LPka1GzhtTrGwhpkFmx0YyRpcTCHjFmti3Yg,4654
|
|
2
2
|
cli/__init__.py,sha256=OAi_KSwcuYXR0sRxKuw1DYQrz1jbu8p7vn41_99f36I,107
|
|
3
3
|
cli/__main__.py,sha256=xO2JVjCsh691b-cjSBAEKocJeUeI3P0gfUqM-f1Mp1A,95
|
|
4
|
-
cli/app.py,sha256
|
|
5
|
-
cli/app.tcss,sha256=
|
|
6
|
-
cli/utils.py,sha256=
|
|
4
|
+
cli/app.py,sha256=NY1o6mfbgw9syDnJJkvlymmcrQ9JTeA9_19V4kklTQI,28059
|
|
5
|
+
cli/app.tcss,sha256=szNaXxCEo0QfFyM1klPB21GzNaXV3wCxTbDm9e71ioA,4488
|
|
6
|
+
cli/utils.py,sha256=V382xxqLQYaPw_o5E-W30n2uOaWovLTb07aywdbqlMw,1722
|
|
7
7
|
cli/widgets/__init__.py,sha256=1vj31CrJyxZROLthkKr79i_GbNyj8g3q60ZQPbJHK5k,300
|
|
8
8
|
cli/widgets/confirmation.py,sha256=7hXqGyhW5V9fmtjgiWR4z2fJWmKxWhUH9RigqDrTKp4,9396
|
|
9
|
-
cli/widgets/conversation.py,sha256=
|
|
9
|
+
cli/widgets/conversation.py,sha256=n99b9wjgrw4WTbWX4entK2Jx4xcP-n-F0KPJXC4w2oM,2720
|
|
10
10
|
cli/widgets/loading.py,sha256=wlhQ47ppSj8vCEqjrbG2mk1yKnfo8dWC5429Z2q1-0g,1689
|
|
11
|
-
kader/__init__.py,sha256=
|
|
11
|
+
kader/__init__.py,sha256=lv08nSC3h5YLdBU4WqXMz2YHHojy7mcBPMbfP251Rjo,654
|
|
12
12
|
kader/config.py,sha256=B1s1PNgZ5SrFEJU5TtJG-ZAc7Umff4cwyHR7mfQgeLA,4261
|
|
13
13
|
kader/agent/__init__.py,sha256=UJzUw9NIzggCrhIBHC6nJnfzkhCjCZnIzmD6uUn2SNA,159
|
|
14
|
-
kader/agent/agents.py,sha256=
|
|
15
|
-
kader/agent/base.py,sha256
|
|
14
|
+
kader/agent/agents.py,sha256=qG594bZ71tbTshwhSrbKOIpkSz1y3FjcLztxPKJRrfE,4837
|
|
15
|
+
kader/agent/base.py,sha256=Ql9QcvJjFgf0CtZF2c249r12zRmXhTFnYLW_GW-aRGk,39463
|
|
16
16
|
kader/agent/logger.py,sha256=3vFwz_yycSBU-5mcdalfZ3KBVT9P_20Q-WT5Al8yIXo,5796
|
|
17
17
|
kader/memory/__init__.py,sha256=VUzzhGOWvO_2aYB6uuavmtNI8l94K7H3uPn4_1MVUUs,1473
|
|
18
18
|
kader/memory/conversation.py,sha256=h6Bamd8_rYnk0Bwt4MJWZRfv2wxCcg6eUxPvzP-tIyA,11810
|
|
19
19
|
kader/memory/session.py,sha256=VhRPEO474SlwM5UOuFt-b_28sJs3j4SNrobCZvoP5Os,10811
|
|
20
20
|
kader/memory/state.py,sha256=itwRjA4PvLlqlRStu-PnMWgSNsMTeU7R0qPOuj0mVDM,5722
|
|
21
|
-
kader/memory/types.py,sha256=
|
|
22
|
-
kader/prompts/__init__.py,sha256=
|
|
23
|
-
kader/prompts/agent_prompts.py,sha256=
|
|
21
|
+
kader/memory/types.py,sha256=fCJAZo9HV91Mp27ycu8F1ED33vfC1KDICUJjkVBwTng,4861
|
|
22
|
+
kader/prompts/__init__.py,sha256=m5_QxZ7m4cwNyisEJ8zBOIJPzBeMjdEo_yTB9B6cRPc,349
|
|
23
|
+
kader/prompts/agent_prompts.py,sha256=o-JCDS_L2fPzJeIZxK5Hveg0DRmn0TSe-s0b85XloGA,1668
|
|
24
24
|
kader/prompts/base.py,sha256=mFfPfuTX7VNjjiBqez10S7oxyNpiw9U63hTVVAPmlKY,2387
|
|
25
|
+
kader/prompts/templates/executor_agent.j2,sha256=YtKH2LBbY4FrGxam-3Q0YPnnNnLxcV_9Q2ehUS-UrsA,2044
|
|
26
|
+
kader/prompts/templates/kader_planner.j2,sha256=ONpeuu6OvNuxv8d6zrjYSF1QFPoIDFBCqe7P0RmcD-I,3429
|
|
25
27
|
kader/prompts/templates/planning_agent.j2,sha256=Uc4SnMPv4vKWchhO0RLRNjbEio5CVlRgqDJG_dgM2Pk,1315
|
|
26
28
|
kader/prompts/templates/react_agent.j2,sha256=yME6Qgj2WTW8jRZ_yuQcY6xlXKcV7YUv5sz5ZfCl8P4,606
|
|
27
29
|
kader/providers/__init__.py,sha256=DYEZakt2SRy0Xd2vem93V_TRlY2s19KaJC9bSaOB1WY,154
|
|
28
30
|
kader/providers/base.py,sha256=gxpomjRAX9q3Qf4GHYxdiGI_GsRW9BG7PM38SKUAeCk,17105
|
|
29
31
|
kader/providers/mock.py,sha256=VBuOFFPvDWn4QVFS9HXlwu3jswP0NNNxrMyL4Qgvm50,2723
|
|
30
|
-
kader/providers/ollama.py,sha256=
|
|
32
|
+
kader/providers/ollama.py,sha256=R5F0zlmbGGwSxNVURU0dWa-gMG_V-CmVZdRvy_GMmuw,15577
|
|
31
33
|
kader/tools/README.md,sha256=lmw-Ghm8ie2pNcSTL4sJ7OKerkGvbXmlD9Zi87hiC-8,14347
|
|
32
|
-
kader/tools/__init__.py,sha256=
|
|
34
|
+
kader/tools/__init__.py,sha256=c-GwhqnXDKhxF7oOGXd7WNckOl_zk55tm3N8B_qQ2f0,3325
|
|
35
|
+
kader/tools/agent.py,sha256=L13YgwuKMKN5AeoHYQPdRweMsuYVMStVd90CwRaA8lA,17135
|
|
33
36
|
kader/tools/base.py,sha256=oHqY1-5ihcH4ilvuHd-c5Vb81xm3jAlMrkRlR_8wltE,28840
|
|
34
37
|
kader/tools/exec_commands.py,sha256=nRKkV84Q8b9kHn8vSIKYe6eKhLx9pGRL-5C1hC11-7Y,7948
|
|
35
|
-
kader/tools/filesys.py,sha256=
|
|
38
|
+
kader/tools/filesys.py,sha256=UwF-CPJu_S-hFR9HPnynx_3DOda58nc86n_qw8YngR8,19629
|
|
36
39
|
kader/tools/filesystem.py,sha256=ANTyiFgdxvYSWbp-hSH0AxGH_x-gx2V6XwYypE2MtoM,22733
|
|
37
40
|
kader/tools/protocol.py,sha256=xyLc-5xY1f9VvumnruoJpLldRk3vzDi1WEDcYXgH7o4,15825
|
|
38
41
|
kader/tools/rag.py,sha256=37Nd49D5R_DlWmMyhSdSvst_XFOnoxpaFNtlbLEt6qM,15653
|
|
39
|
-
kader/tools/todo.py,sha256=
|
|
42
|
+
kader/tools/todo.py,sha256=nkUOqPaxa6CbzVq7fVM36fAbPb6fg7Wrt6B8sxsN0Ys,9883
|
|
40
43
|
kader/tools/utils.py,sha256=bfq7b1vpA1qBaL_QZYBFTqOM35-omu_UeDjo6v0rxEg,14176
|
|
41
44
|
kader/tools/web.py,sha256=2Aqy0nO7ZwNLAqE9IWjCg5y8qnhbt-AIZOHy02XgbxA,8464
|
|
42
|
-
kader
|
|
43
|
-
kader
|
|
44
|
-
kader
|
|
45
|
-
kader
|
|
45
|
+
kader/utils/__init__.py,sha256=Df344mUuNiunB9WXucrxpS0yk0xddCNYZeJoZlmKPk8,229
|
|
46
|
+
kader/utils/checkpointer.py,sha256=318Yq1s68vfRXqmT6SuSGrbncpMoAz165vYaULpaZrU,12071
|
|
47
|
+
kader/utils/context_aggregator.py,sha256=5_2suuWSsJZhJ60zWTIkiEx5R5EIIdXak7MU98zwxqc,11772
|
|
48
|
+
kader/workflows/__init__.py,sha256=qaarPRT7xcY86dHmAUM6IQpLedKKBayFiASZr8-dSSA,297
|
|
49
|
+
kader/workflows/base.py,sha256=BCTMMWE-LW_qIU7TWZgTzu82EMem6Uy2hJv0sa7buc0,1892
|
|
50
|
+
kader/workflows/planner_executor.py,sha256=VK4bCGvoUJ0eezNmkVb-iPjis1HsZFjlAUTtmluF9zw,9392
|
|
51
|
+
kader-1.0.0.dist-info/METADATA,sha256=nwJMl3g7VMF6OCcMfX-3zhGRmaqwqqY1nbwMRzzQf5w,10932
|
|
52
|
+
kader-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
53
|
+
kader-1.0.0.dist-info/entry_points.txt,sha256=TK0VOtrfDFqZ8JQfxpuAHHvDLHyoiafUjS-VOixl02c,39
|
|
54
|
+
kader-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|