agentic-cli 0.2.0__tar.gz → 0.3.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.
Files changed (98) hide show
  1. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/CHANGELOG.md +45 -0
  2. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/PKG-INFO +35 -23
  3. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/README.md +34 -22
  4. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/examples/hello_agent.py +19 -22
  5. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/examples/hello_langgraph.py +19 -29
  6. agentic_cli-0.3.0/examples/research_demo/README.md +160 -0
  7. agentic_cli-0.3.0/examples/research_demo/__init__.py +21 -0
  8. agentic_cli-0.3.0/examples/research_demo/__main__.py +18 -0
  9. agentic_cli-0.3.0/examples/research_demo/agents.py +165 -0
  10. agentic_cli-0.3.0/examples/research_demo/app.py +233 -0
  11. agentic_cli-0.3.0/examples/research_demo/commands.py +359 -0
  12. agentic_cli-0.3.0/examples/research_demo/settings.py +46 -0
  13. agentic_cli-0.3.0/examples/research_demo/tools.py +139 -0
  14. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/pyproject.toml +1 -1
  15. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/__init__.py +9 -2
  16. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/cli/__init__.py +2 -0
  17. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/cli/app.py +132 -46
  18. agentic_cli-0.3.0/src/agentic_cli/cli/settings.py +50 -0
  19. agentic_cli-0.3.0/src/agentic_cli/cli/settings_command.py +63 -0
  20. agentic_cli-0.3.0/src/agentic_cli/cli/settings_introspection.py +180 -0
  21. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/config.py +122 -73
  22. agentic_cli-0.3.0/src/agentic_cli/config_mixins.py +119 -0
  23. agentic_cli-0.3.0/src/agentic_cli/hitl/__init__.py +29 -0
  24. agentic_cli-0.3.0/src/agentic_cli/hitl/approval.py +226 -0
  25. agentic_cli-0.3.0/src/agentic_cli/hitl/checkpoints.py +149 -0
  26. agentic_cli-0.3.0/src/agentic_cli/hitl/config.py +47 -0
  27. agentic_cli-0.3.0/src/agentic_cli/memory/__init__.py +28 -0
  28. agentic_cli-0.3.0/src/agentic_cli/memory/longterm.py +302 -0
  29. agentic_cli-0.3.0/src/agentic_cli/memory/manager.py +139 -0
  30. agentic_cli-0.3.0/src/agentic_cli/memory/tools.py +251 -0
  31. agentic_cli-0.3.0/src/agentic_cli/memory/working.py +121 -0
  32. agentic_cli-0.3.0/src/agentic_cli/planning/__init__.py +27 -0
  33. agentic_cli-0.3.0/src/agentic_cli/planning/task_graph.py +391 -0
  34. agentic_cli-0.3.0/src/agentic_cli/settings_persistence.py +127 -0
  35. agentic_cli-0.3.0/src/agentic_cli/tools/__init__.py +135 -0
  36. agentic_cli-0.3.0/src/agentic_cli/tools/file_ops.py +358 -0
  37. agentic_cli-0.3.0/src/agentic_cli/tools/hitl_tools.py +212 -0
  38. agentic_cli-0.3.0/src/agentic_cli/tools/memory_tools.py +199 -0
  39. agentic_cli-0.3.0/src/agentic_cli/tools/planning_tools.py +281 -0
  40. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/tools/registry.py +3 -0
  41. agentic_cli-0.3.0/src/agentic_cli/tools/shell.py +181 -0
  42. agentic_cli-0.3.0/src/agentic_cli/workflow/__init__.py +92 -0
  43. agentic_cli-0.3.0/src/agentic_cli/workflow/adk/__init__.py +18 -0
  44. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/workflow/adk_manager.py +21 -3
  45. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/workflow/base_manager.py +87 -1
  46. agentic_cli-0.3.0/src/agentic_cli/workflow/context.py +90 -0
  47. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/__init__.py +42 -0
  48. agentic_cli-0.2.0/src/agentic_cli/workflow/langgraph_manager.py → agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/manager.py +79 -168
  49. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/persistence/__init__.py +21 -0
  50. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/persistence/checkpointers.py +152 -0
  51. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/persistence/stores.py +159 -0
  52. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/tools/__init__.py +28 -0
  53. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/tools/file_search.py +251 -0
  54. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/tools/shell.py +364 -0
  55. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph_manager.py +34 -0
  56. agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph_state.py +54 -0
  57. agentic_cli-0.3.0/src/agentic_cli/workflow/settings.py +152 -0
  58. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/test_config.py +22 -0
  59. agentic_cli-0.3.0/tests/test_hitl.py +250 -0
  60. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/test_langgraph.py +163 -3
  61. agentic_cli-0.3.0/tests/test_memory.py +596 -0
  62. agentic_cli-0.3.0/tests/test_planning.py +359 -0
  63. agentic_cli-0.3.0/tests/test_tools.py +1114 -0
  64. agentic_cli-0.2.0/src/agentic_cli/cli/settings_command.py +0 -75
  65. agentic_cli-0.2.0/src/agentic_cli/config_mixins.py +0 -123
  66. agentic_cli-0.2.0/src/agentic_cli/tools/__init__.py +0 -62
  67. agentic_cli-0.2.0/src/agentic_cli/workflow/__init__.py +0 -39
  68. agentic_cli-0.2.0/tests/test_tools.py +0 -605
  69. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/.gitignore +0 -0
  70. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/LICENSE +0 -0
  71. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/environment.yml +0 -0
  72. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/requirements-dev.txt +0 -0
  73. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/requirements.txt +0 -0
  74. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/cli/builtin_commands.py +0 -0
  75. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/cli/commands.py +0 -0
  76. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/knowledge_base/__init__.py +0 -0
  77. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/knowledge_base/embeddings.py +0 -0
  78. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/knowledge_base/manager.py +0 -0
  79. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/knowledge_base/models.py +0 -0
  80. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/knowledge_base/sources.py +0 -0
  81. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/knowledge_base/vector_store.py +0 -0
  82. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/logging.py +0 -0
  83. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/persistence/__init__.py +0 -0
  84. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/persistence/artifacts.py +0 -0
  85. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/persistence/session.py +0 -0
  86. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/resolvers.py +0 -0
  87. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/tools/executor.py +0 -0
  88. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/tools/standard.py +0 -0
  89. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/workflow/config.py +0 -0
  90. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/workflow/events.py +0 -0
  91. /agentic_cli-0.2.0/src/agentic_cli/workflow/langgraph_state.py → /agentic_cli-0.3.0/src/agentic_cli/workflow/langgraph/state.py +0 -0
  92. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/src/agentic_cli/workflow/thinking.py +0 -0
  93. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/__init__.py +0 -0
  94. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/conftest.py +0 -0
  95. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/test_commands.py +0 -0
  96. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/test_knowledge_base.py +0 -0
  97. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/test_persistence.py +0 -0
  98. {agentic_cli-0.2.0 → agentic_cli-0.3.0}/tests/test_workflow.py +0 -0
@@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2025-01-27
9
+
10
+ ### Added
11
+
12
+ - **Memory System** with 3-tier architecture:
13
+ - `WorkingMemory` - Session-scoped context with tags and serialization
14
+ - `LongTermMemory` - Persistent memory with knowledge base references
15
+ - `MemoryManager` - Unified interface for working and long-term memory
16
+ - Memory tools (`working_memory_tool`, `long_term_memory_tool`)
17
+ - **Planning System**:
18
+ - `TaskGraph` - Work plan management with dependencies and status tracking
19
+ - `TaskStatus` enum for pending/in_progress/completed/blocked states
20
+ - `Task` dataclass with subtasks, dependencies, and metadata
21
+ - **Human-in-the-Loop (HITL) System**:
22
+ - `ApprovalManager` - Configurable approval gates with auto-approve patterns
23
+ - `CheckpointManager` - Review checkpoints with continue/edit/regenerate/abort actions
24
+ - `HITLConfig` and `ApprovalRule` for configuration
25
+ - **New Tools**:
26
+ - `shell_executor` with safety controls (blocks dangerous commands)
27
+ - `file_manager` with read/write/list/copy/move/delete operations
28
+ - `diff_compare` with unified/side-by-side/summary modes
29
+ - New tool categories: `MEMORY`, `PLANNING`, `SYSTEM`
30
+ - Framework-provided tools with auto-detection
31
+ - Layered JSON settings persistence with organized mixins
32
+ - `research_demo` example showcasing memory, planning, and file operations
33
+
34
+ ### Changed
35
+
36
+ - **LangGraph Module Reorganization**:
37
+ - Moved to dedicated `workflow/langgraph/` submodule
38
+ - Added `persistence/` for checkpointers and stores
39
+ - Added `tools/` for shell and file search utilities
40
+ - **Simplified LangGraphWorkflowManager**:
41
+ - Removed dead middleware module (~400 lines)
42
+ - Use explicit provider instantiation (GenAI for Gemini, not VertexAI)
43
+ - Simplified model creation with thinking support for Claude and Gemini
44
+ - **BaseCLIApp Simplification**:
45
+ - Constructor-based configuration instead of method overrides
46
+ - `AppInfo` is now a constructor parameter
47
+
48
+ ### Fixed
49
+
50
+ - LangGraph no longer requires `langchain-google-vertexai` package
51
+ - Explicit provider detection prevents VertexAI initialization errors
52
+
8
53
  ## [0.2.0] - 2025-01-25
9
54
 
10
55
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentic-cli
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: A framework for building domain-specific agentic CLI applications
5
5
  Project-URL: Homepage, https://github.com/shoom1/agentic-cli
6
6
  Project-URL: Repository, https://github.com/shoom1/agentic-cli
@@ -120,8 +120,9 @@ Create a minimal CLI application in just a few lines:
120
120
 
121
121
  ```python
122
122
  import asyncio
123
- from agentic_cli import BaseCLIApp, BaseSettings, AgentConfig, GoogleADKWorkflowManager
123
+ from agentic_cli import BaseCLIApp, BaseSettings
124
124
  from agentic_cli.cli import AppInfo
125
+ from agentic_cli.workflow import AgentConfig
125
126
 
126
127
  # Define your tools
127
128
  def greet(name: str) -> dict:
@@ -137,19 +138,14 @@ AGENTS = [
137
138
  ),
138
139
  ]
139
140
 
140
- # Create your app
141
- class MyApp(BaseCLIApp):
142
- def get_app_info(self) -> AppInfo:
143
- return AppInfo(name="My App", version="0.1.0")
144
-
145
- def get_settings(self) -> BaseSettings:
146
- return BaseSettings()
147
-
148
- def create_workflow_manager(self) -> GoogleADKWorkflowManager:
149
- return GoogleADKWorkflowManager(agent_configs=AGENTS, settings=self._settings)
150
-
141
+ # Create and run your app
151
142
  if __name__ == "__main__":
152
- asyncio.run(MyApp().run())
143
+ app = BaseCLIApp(
144
+ app_info=AppInfo(name="My App", version="0.1.0"),
145
+ agent_configs=AGENTS,
146
+ settings=BaseSettings(),
147
+ )
148
+ asyncio.run(app.run())
153
149
  ```
154
150
 
155
151
  Run with your API key:
@@ -182,20 +178,26 @@ manager = GoogleADKWorkflowManager(
182
178
 
183
179
  Uses LangGraph for orchestration. Best for:
184
180
  - Cyclical workflows (self-validation, iterative refinement)
185
- - Model-agnostic operation (OpenAI, Anthropic, Google)
181
+ - Model-agnostic operation (OpenAI, Anthropic, Google via GenAI)
186
182
  - State checkpointing and time-travel debugging
187
183
  - Complex multi-agent coordination
188
184
 
189
185
  ```python
190
- from agentic_cli import LangGraphWorkflowManager
186
+ from agentic_cli.workflow.langgraph import LangGraphWorkflowManager
191
187
 
192
188
  manager = LangGraphWorkflowManager(
193
189
  agent_configs=AGENTS,
194
190
  settings=settings,
195
- checkpointer="memory", # or "postgres" for persistence
191
+ checkpointer="memory", # "memory", "postgres", "sqlite", or None
196
192
  )
197
193
  ```
198
194
 
195
+ Features:
196
+ - **Explicit provider support**: Uses `langchain-google-genai` for Gemini (not VertexAI)
197
+ - **Thinking mode**: Native support for Claude and Gemini thinking/reasoning
198
+ - **Retry policies**: Automatic retry with exponential backoff
199
+ - **Event streaming**: Real-time workflow events via `WorkflowEvent`
200
+
199
201
  Requires: `pip install agentic-cli[langgraph]`
200
202
 
201
203
  ### Comparison
@@ -204,9 +206,10 @@ Requires: `pip install agentic-cli[langgraph]`
204
206
  |---------|------------|-----------|
205
207
  | Setup complexity | Simple | Moderate |
206
208
  | Cyclical workflows | Limited | Native |
207
- | Multi-provider | Google only | OpenAI, Anthropic, Google |
208
- | State persistence | In-memory | Memory or PostgreSQL |
209
- | Thinking support | Native (Gemini) | Via model config |
209
+ | Multi-provider | Google only | OpenAI, Anthropic, Google (GenAI) |
210
+ | State persistence | In-memory | Memory, PostgreSQL, or SQLite |
211
+ | Thinking support | Native (Gemini) | Native (Claude & Gemini) |
212
+ | Retry handling | Manual | Built-in with backoff |
210
213
 
211
214
  ### Auto-selection via Settings
212
215
 
@@ -447,7 +450,8 @@ async for event in manager.process(message, user_id="user1"):
447
450
  See the `examples/` directory for complete working examples:
448
451
 
449
452
  - **hello_agent.py** - Simple assistant using Google ADK
450
- - **hello_langgraph.py** - Same assistant using LangGraph
453
+ - **hello_langgraph.py** - Same assistant using LangGraph orchestration
454
+ - **research_demo/** - Full-featured research assistant with memory, planning, and file operations
451
455
 
452
456
  Run examples:
453
457
 
@@ -458,6 +462,9 @@ python examples/hello_agent.py
458
462
  # Or with LangGraph (requires langgraph extra)
459
463
  pip install agentic-cli[langgraph]
460
464
  python examples/hello_langgraph.py
465
+
466
+ # Research demo (full features)
467
+ python -m examples.research_demo
461
468
  ```
462
469
 
463
470
  ## Development
@@ -489,14 +496,19 @@ agentic-cli/
489
496
  │ │ ├── events.py # WorkflowEvent, EventType
490
497
  │ │ ├── config.py # AgentConfig
491
498
  │ │ ├── adk_manager.py # GoogleADKWorkflowManager
492
- │ │ └── langgraph_manager.py # LangGraphWorkflowManager
499
+ │ │ └── langgraph/ # LangGraph submodule
500
+ │ │ ├── manager.py # LangGraphWorkflowManager
501
+ │ │ ├── state.py # AgentState, CheckpointData
502
+ │ │ ├── persistence/ # Checkpointers and stores
503
+ │ │ └── tools/ # Shell, file search tools
493
504
  │ ├── tools/
494
505
  │ │ └── executor.py # SafePythonExecutor
495
506
  │ └── knowledge_base/
496
507
  │ └── manager.py # KnowledgeBaseManager
497
508
  ├── examples/
498
509
  │ ├── hello_agent.py
499
- └── hello_langgraph.py
510
+ ├── hello_langgraph.py
511
+ │ └── research_demo/ # Full-featured example
500
512
  └── tests/
501
513
  ```
502
514
 
@@ -81,8 +81,9 @@ Create a minimal CLI application in just a few lines:
81
81
 
82
82
  ```python
83
83
  import asyncio
84
- from agentic_cli import BaseCLIApp, BaseSettings, AgentConfig, GoogleADKWorkflowManager
84
+ from agentic_cli import BaseCLIApp, BaseSettings
85
85
  from agentic_cli.cli import AppInfo
86
+ from agentic_cli.workflow import AgentConfig
86
87
 
87
88
  # Define your tools
88
89
  def greet(name: str) -> dict:
@@ -98,19 +99,14 @@ AGENTS = [
98
99
  ),
99
100
  ]
100
101
 
101
- # Create your app
102
- class MyApp(BaseCLIApp):
103
- def get_app_info(self) -> AppInfo:
104
- return AppInfo(name="My App", version="0.1.0")
105
-
106
- def get_settings(self) -> BaseSettings:
107
- return BaseSettings()
108
-
109
- def create_workflow_manager(self) -> GoogleADKWorkflowManager:
110
- return GoogleADKWorkflowManager(agent_configs=AGENTS, settings=self._settings)
111
-
102
+ # Create and run your app
112
103
  if __name__ == "__main__":
113
- asyncio.run(MyApp().run())
104
+ app = BaseCLIApp(
105
+ app_info=AppInfo(name="My App", version="0.1.0"),
106
+ agent_configs=AGENTS,
107
+ settings=BaseSettings(),
108
+ )
109
+ asyncio.run(app.run())
114
110
  ```
115
111
 
116
112
  Run with your API key:
@@ -143,20 +139,26 @@ manager = GoogleADKWorkflowManager(
143
139
 
144
140
  Uses LangGraph for orchestration. Best for:
145
141
  - Cyclical workflows (self-validation, iterative refinement)
146
- - Model-agnostic operation (OpenAI, Anthropic, Google)
142
+ - Model-agnostic operation (OpenAI, Anthropic, Google via GenAI)
147
143
  - State checkpointing and time-travel debugging
148
144
  - Complex multi-agent coordination
149
145
 
150
146
  ```python
151
- from agentic_cli import LangGraphWorkflowManager
147
+ from agentic_cli.workflow.langgraph import LangGraphWorkflowManager
152
148
 
153
149
  manager = LangGraphWorkflowManager(
154
150
  agent_configs=AGENTS,
155
151
  settings=settings,
156
- checkpointer="memory", # or "postgres" for persistence
152
+ checkpointer="memory", # "memory", "postgres", "sqlite", or None
157
153
  )
158
154
  ```
159
155
 
156
+ Features:
157
+ - **Explicit provider support**: Uses `langchain-google-genai` for Gemini (not VertexAI)
158
+ - **Thinking mode**: Native support for Claude and Gemini thinking/reasoning
159
+ - **Retry policies**: Automatic retry with exponential backoff
160
+ - **Event streaming**: Real-time workflow events via `WorkflowEvent`
161
+
160
162
  Requires: `pip install agentic-cli[langgraph]`
161
163
 
162
164
  ### Comparison
@@ -165,9 +167,10 @@ Requires: `pip install agentic-cli[langgraph]`
165
167
  |---------|------------|-----------|
166
168
  | Setup complexity | Simple | Moderate |
167
169
  | Cyclical workflows | Limited | Native |
168
- | Multi-provider | Google only | OpenAI, Anthropic, Google |
169
- | State persistence | In-memory | Memory or PostgreSQL |
170
- | Thinking support | Native (Gemini) | Via model config |
170
+ | Multi-provider | Google only | OpenAI, Anthropic, Google (GenAI) |
171
+ | State persistence | In-memory | Memory, PostgreSQL, or SQLite |
172
+ | Thinking support | Native (Gemini) | Native (Claude & Gemini) |
173
+ | Retry handling | Manual | Built-in with backoff |
171
174
 
172
175
  ### Auto-selection via Settings
173
176
 
@@ -408,7 +411,8 @@ async for event in manager.process(message, user_id="user1"):
408
411
  See the `examples/` directory for complete working examples:
409
412
 
410
413
  - **hello_agent.py** - Simple assistant using Google ADK
411
- - **hello_langgraph.py** - Same assistant using LangGraph
414
+ - **hello_langgraph.py** - Same assistant using LangGraph orchestration
415
+ - **research_demo/** - Full-featured research assistant with memory, planning, and file operations
412
416
 
413
417
  Run examples:
414
418
 
@@ -419,6 +423,9 @@ python examples/hello_agent.py
419
423
  # Or with LangGraph (requires langgraph extra)
420
424
  pip install agentic-cli[langgraph]
421
425
  python examples/hello_langgraph.py
426
+
427
+ # Research demo (full features)
428
+ python -m examples.research_demo
422
429
  ```
423
430
 
424
431
  ## Development
@@ -450,14 +457,19 @@ agentic-cli/
450
457
  │ │ ├── events.py # WorkflowEvent, EventType
451
458
  │ │ ├── config.py # AgentConfig
452
459
  │ │ ├── adk_manager.py # GoogleADKWorkflowManager
453
- │ │ └── langgraph_manager.py # LangGraphWorkflowManager
460
+ │ │ └── langgraph/ # LangGraph submodule
461
+ │ │ ├── manager.py # LangGraphWorkflowManager
462
+ │ │ ├── state.py # AgentState, CheckpointData
463
+ │ │ ├── persistence/ # Checkpointers and stores
464
+ │ │ └── tools/ # Shell, file search tools
454
465
  │ ├── tools/
455
466
  │ │ └── executor.py # SafePythonExecutor
456
467
  │ └── knowledge_base/
457
468
  │ └── manager.py # KnowledgeBaseManager
458
469
  ├── examples/
459
470
  │ ├── hello_agent.py
460
- └── hello_langgraph.py
471
+ ├── hello_langgraph.py
472
+ │ └── research_demo/ # Full-featured example
461
473
  └── tests/
462
474
  ```
463
475
 
@@ -15,8 +15,7 @@ from pydantic_settings import SettingsConfigDict
15
15
 
16
16
  from agentic_cli import BaseCLIApp, BaseSettings
17
17
  from agentic_cli.cli import AppInfo
18
- from agentic_cli.config import set_settings
19
- from agentic_cli.workflow import AgentConfig, GoogleADKWorkflowManager
18
+ from agentic_cli.workflow import AgentConfig
20
19
 
21
20
 
22
21
  # =============================================================================
@@ -83,26 +82,24 @@ AGENT_CONFIGS = [
83
82
  ]
84
83
 
85
84
 
86
- class HelloAgentApp(BaseCLIApp):
87
- def get_app_info(self) -> AppInfo:
88
- text = Text()
89
- text.append("Hello Agent\n\n", style="bold cyan")
90
- text.append("Tools: get_current_time, calculate, echo\n", style="dim")
91
- text.append("Type /help for commands", style="dim")
92
- return AppInfo(
93
- name="Hello Agent",
94
- version="0.1.0",
95
- welcome_message=lambda: Panel(text, border_style="cyan"),
96
- echo_thinking=False,
97
- )
98
-
99
- def get_settings(self) -> Settings:
100
- return get_settings()
101
-
102
- def create_workflow_manager(self) -> GoogleADKWorkflowManager:
103
- set_settings(self._settings)
104
- return GoogleADKWorkflowManager(agent_configs=AGENT_CONFIGS, settings=self._settings)
85
+ def _create_app_info() -> AppInfo:
86
+ """Create the application info for the welcome message."""
87
+ text = Text()
88
+ text.append("Hello Agent\n\n", style="bold cyan")
89
+ text.append("Tools: get_current_time, calculate, echo\n", style="dim")
90
+ text.append("Type /help for commands", style="dim")
91
+ return AppInfo(
92
+ name="Hello Agent",
93
+ version="0.1.0",
94
+ welcome_message=lambda: Panel(text, border_style="cyan"),
95
+ echo_thinking=False,
96
+ )
105
97
 
106
98
 
107
99
  if __name__ == "__main__":
108
- asyncio.run(HelloAgentApp().run())
100
+ app = BaseCLIApp(
101
+ app_info=_create_app_info(),
102
+ agent_configs=AGENT_CONFIGS,
103
+ settings=get_settings(),
104
+ )
105
+ asyncio.run(app.run())
@@ -22,9 +22,7 @@ from pydantic_settings import SettingsConfigDict
22
22
 
23
23
  from agentic_cli import BaseCLIApp, BaseSettings
24
24
  from agentic_cli.cli import AppInfo
25
- from agentic_cli.config import set_settings
26
25
  from agentic_cli.workflow import AgentConfig
27
- from agentic_cli.workflow.langgraph_manager import LangGraphWorkflowManager
28
26
 
29
27
 
30
28
  # =============================================================================
@@ -100,33 +98,25 @@ AGENT_CONFIGS = [
100
98
  # Application
101
99
  # =============================================================================
102
100
 
103
- class HelloLangGraphApp(BaseCLIApp):
104
- """Example CLI app using LangGraph for orchestration."""
105
-
106
- def get_app_info(self) -> AppInfo:
107
- text = Text()
108
- text.append("Hello LangGraph\n\n", style="bold magenta")
109
- text.append("Orchestrator: LangGraph\n", style="dim")
110
- text.append("Tools: get_current_time, calculate, echo\n", style="dim")
111
- text.append("Type /help for commands", style="dim")
112
- return AppInfo(
113
- name="Hello LangGraph",
114
- version="0.1.0",
115
- welcome_message=lambda: Panel(text, border_style="magenta"),
116
- echo_thinking=False,
117
- )
118
-
119
- def get_settings(self) -> Settings:
120
- return get_settings()
121
-
122
- def create_workflow_manager(self) -> LangGraphWorkflowManager:
123
- set_settings(self._settings)
124
- return LangGraphWorkflowManager(
125
- agent_configs=AGENT_CONFIGS,
126
- settings=self._settings,
127
- checkpointer="memory", # Use in-memory checkpointing
128
- )
101
+ def _create_app_info() -> AppInfo:
102
+ """Create the application info for the welcome message."""
103
+ text = Text()
104
+ text.append("Hello LangGraph\n\n", style="bold magenta")
105
+ text.append("Orchestrator: LangGraph\n", style="dim")
106
+ text.append("Tools: get_current_time, calculate, echo\n", style="dim")
107
+ text.append("Type /help for commands", style="dim")
108
+ return AppInfo(
109
+ name="Hello LangGraph",
110
+ version="0.1.0",
111
+ welcome_message=lambda: Panel(text, border_style="magenta"),
112
+ echo_thinking=False,
113
+ )
129
114
 
130
115
 
131
116
  if __name__ == "__main__":
132
- asyncio.run(HelloLangGraphApp().run())
117
+ app = BaseCLIApp(
118
+ app_info=_create_app_info(),
119
+ agent_configs=AGENT_CONFIGS,
120
+ settings=get_settings(),
121
+ )
122
+ asyncio.run(app.run())
@@ -0,0 +1,160 @@
1
+ # Research Demo
2
+
3
+ A demonstration CLI application showcasing all P0/P1 features of the agentic-cli framework.
4
+
5
+ ## Overview
6
+
7
+ The Research Demo is a research assistant that helps you explore topics while demonstrating:
8
+
9
+ - **Memory System**: Session-scoped working memory + persistent long-term memory
10
+ - **Task Planning**: Hierarchical task graphs with dependencies
11
+ - **File Operations**: Save, read, and compare research findings
12
+ - **Shell Commands**: Safe command execution with blocking of dangerous patterns
13
+ - **Human-in-the-Loop (HITL)**: Approval gates and review checkpoints
14
+
15
+ ## Running the Demo
16
+
17
+ ```bash
18
+ # From the project root
19
+ conda run -n agenticcli python -m examples.research_demo
20
+ ```
21
+
22
+ ## Features
23
+
24
+ ### Memory
25
+
26
+ The agent can store and recall information across two tiers:
27
+
28
+ **Working Memory (Session)**
29
+ - Stores context for the current session
30
+ - Cleared when the app exits
31
+ - Use `/memory` to view current state
32
+
33
+ **Long-term Memory (Persistent)**
34
+ - Stores learnings, facts, preferences, and references
35
+ - Persists to `~/.research_demo/memory/longterm.json`
36
+ - Survives across sessions
37
+
38
+ ### Planning
39
+
40
+ The agent can create structured research plans:
41
+
42
+ - Tasks with descriptions and dependencies
43
+ - Status tracking (pending, in_progress, completed, failed)
44
+ - Visual progress display via `/plan` command
45
+
46
+ ### File Operations
47
+
48
+ - Save research findings to `~/.research_demo/findings/`
49
+ - Compare document versions with diff
50
+ - List and read saved files
51
+
52
+ ### Shell Commands
53
+
54
+ - Run safe shell commands (ls, cat, grep, etc.)
55
+ - Dangerous commands are blocked (rm -rf, etc.)
56
+ - Timeout protection (30 seconds default)
57
+
58
+ ### HITL
59
+
60
+ - Approval rules for sensitive operations
61
+ - Auto-approve patterns for safe commands
62
+ - Checkpoints for reviewing agent outputs
63
+
64
+ ## Commands
65
+
66
+ | Command | Aliases | Description |
67
+ |---------|---------|-------------|
68
+ | `/memory` | `/mem`, `/m` | Show working and long-term memory |
69
+ | `/plan` | `/tasks`, `/p` | Show current task graph |
70
+ | `/files` | `/ls`, `/f` | List files in workspace |
71
+ | `/approvals` | `/approve`, `/a` | Show pending approvals |
72
+ | `/checkpoints` | `/cp`, `/review` | Show checkpoints awaiting review |
73
+ | `/clear-memory` | `/clearmem` | Clear working memory |
74
+ | `/clear-plan` | `/clearplan` | Clear task plan |
75
+ | `/help` | `/h`, `/?` | Show all commands |
76
+ | `/settings` | `/s` | View/change settings |
77
+ | `/exit` | `/quit`, `/q` | Exit the application |
78
+
79
+ ## Example Session
80
+
81
+ ```
82
+ >>> Research the history of Python programming language
83
+
84
+ [Agent creates a task plan, stores context, and begins researching]
85
+
86
+ >>> /plan
87
+
88
+ Progress: 2/5 completed, 1 in progress
89
+
90
+ ✓ Gather initial sources
91
+ ✓ Review key events (depends on: Gather initial)
92
+ ◐ Document milestones (depends on: Review key events)
93
+ ☐ Write summary (depends on: Document milestones)
94
+ ☐ Create final report (depends on: Write summary)
95
+
96
+ >>> /memory
97
+
98
+ Working Memory (Session)
99
+ ┌─────────────────┬───────────────────────┬─────────┐
100
+ │ Key │ Value │ Tags │
101
+ ├─────────────────┼───────────────────────┼─────────┤
102
+ │ research_topic │ Python history │ planning│
103
+ │ current_task │ Document milestones │ │
104
+ └─────────────────┴───────────────────────┴─────────┘
105
+
106
+ Long-term Memory (Persistent)
107
+ ┌──────────┬──────────┬────────────────────────────────────────────┬──────┐
108
+ │ ID │ Type │ Content │ Tags │
109
+ ├──────────┼──────────┼────────────────────────────────────────────┼──────┤
110
+ │ a1b2c3d4 │ fact │ Python was created by Guido van Rossum... │ │
111
+ │ e5f6g7h8 │ learning │ Python 2.0 introduced list comprehensions │ │
112
+ └──────────┴──────────┴────────────────────────────────────────────┴──────┘
113
+
114
+ >>> /files
115
+
116
+ Files in findings/
117
+ ┌─────────────────────────┬──────┬─────────────┐
118
+ │ Name │ Type │ Size │
119
+ ├─────────────────────────┼──────┼─────────────┤
120
+ │ python_history_draft.md │ file │ 2,456 bytes │
121
+ │ key_milestones.txt │ file │ 1,234 bytes │
122
+ └─────────────────────────┴──────┴─────────────┘
123
+ Total: 2 items
124
+ ```
125
+
126
+ ## Architecture
127
+
128
+ ```
129
+ ┌─────────────────────────────────────────────────────────────┐
130
+ │ ResearchDemoApp │
131
+ │ (extends BaseCLIApp) │
132
+ ├─────────────────────────────────────────────────────────────┤
133
+ │ Commands: │ Agent Tools: │
134
+ │ /memory - show memory state │ remember_context() │
135
+ │ /plan - show task graph │ recall_info() │
136
+ │ /approvals - pending list │ create_research_plan() │
137
+ │ /checkpoints - review list │ update_task_status() │
138
+ │ /files - list artifacts │ save_finding() │
139
+ │ /clear-memory │ compare_versions() │
140
+ │ /clear-plan │ run_safe_command() │
141
+ └─────────────────────────────────────────────────────────────┘
142
+ ```
143
+
144
+ ## Configuration
145
+
146
+ Settings are loaded from environment variables or `~/.research_demo/.env`:
147
+
148
+ - `GOOGLE_API_KEY` or `ANTHROPIC_API_KEY` - LLM provider API key
149
+ - `RESEARCH_DEMO_WORKSPACE_DIR` - Workspace directory (default: `~/.research_demo`)
150
+
151
+ ## Files
152
+
153
+ | File | Purpose |
154
+ |------|---------|
155
+ | `app.py` | Main CLI application class |
156
+ | `settings.py` | Demo app settings |
157
+ | `agents.py` | Agent configuration with tools |
158
+ | `tools.py` | Tools wrapping new features |
159
+ | `commands.py` | Status commands |
160
+ | `__main__.py` | Entry point |
@@ -0,0 +1,21 @@
1
+ """Research Demo - A demo CLI application showcasing P0/P1 features.
2
+
3
+ This demo showcases:
4
+ - Memory: Stores research context and learnings
5
+ - Planning: Breaks down research into task graphs
6
+ - File ops: Saves findings, compares drafts
7
+ - Shell: Runs safe commands (ls, cat, etc.)
8
+ - HITL: Requires approval for destructive ops, checkpoints for review
9
+
10
+ Usage:
11
+ conda run -n agenticcli python -m examples.research_demo
12
+ """
13
+
14
+ from examples.research_demo.app import ResearchDemoApp
15
+ from examples.research_demo.settings import ResearchDemoSettings, get_settings
16
+
17
+ __all__ = [
18
+ "ResearchDemoApp",
19
+ "ResearchDemoSettings",
20
+ "get_settings",
21
+ ]
@@ -0,0 +1,18 @@
1
+ """Entry point for the Research Demo application.
2
+
3
+ Usage:
4
+ conda run -n agenticcli python -m examples.research_demo
5
+ """
6
+
7
+ import asyncio
8
+
9
+ from examples.research_demo.app import ResearchDemoApp
10
+
11
+
12
+ def main() -> None:
13
+ """Run the Research Demo application."""
14
+ asyncio.run(ResearchDemoApp().run())
15
+
16
+
17
+ if __name__ == "__main__":
18
+ main()