agentic-cli 0.3.1__tar.gz → 0.3.3__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 (132) hide show
  1. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/.gitignore +4 -0
  2. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/CHANGELOG.md +56 -0
  3. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/PKG-INFO +160 -8
  4. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/README.md +159 -7
  5. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/environment.yml +1 -0
  6. agentic_cli-0.3.3/examples/arxiv_demo.py +303 -0
  7. agentic_cli-0.3.3/examples/fileops_demo.py +359 -0
  8. agentic_cli-0.3.3/examples/memory_demo.py +283 -0
  9. agentic_cli-0.3.3/examples/planning_demo.py +290 -0
  10. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/agents.py +18 -1
  11. agentic_cli-0.3.3/examples/research_demo/app.py +81 -0
  12. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/commands.py +27 -32
  13. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/settings.py +4 -4
  14. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/tools.py +19 -13
  15. agentic_cli-0.3.3/examples/shell_demo.py +259 -0
  16. agentic_cli-0.3.3/examples/webfetch_demo.py +312 -0
  17. agentic_cli-0.3.3/examples/websearch_demo.py +251 -0
  18. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/pyproject.toml +1 -1
  19. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/__init__.py +3 -2
  20. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/cli/__init__.py +6 -0
  21. agentic_cli-0.3.3/src/agentic_cli/cli/app.py +460 -0
  22. agentic_cli-0.3.3/src/agentic_cli/cli/message_processor.py +348 -0
  23. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/cli/settings.py +8 -0
  24. agentic_cli-0.3.3/src/agentic_cli/cli/workflow_controller.py +328 -0
  25. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/config.py +58 -14
  26. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/hitl/approval.py +8 -0
  27. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/hitl/checkpoints.py +19 -0
  28. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/knowledge_base/sources.py +113 -3
  29. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/memory/manager.py +11 -0
  30. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/planning/task_graph.py +27 -0
  31. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/settings_persistence.py +30 -20
  32. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/__init__.py +34 -7
  33. agentic_cli-0.3.3/src/agentic_cli/tools/file_read.py +255 -0
  34. agentic_cli-0.3.3/src/agentic_cli/tools/file_write.py +217 -0
  35. agentic_cli-0.3.3/src/agentic_cli/tools/glob_tool.py +278 -0
  36. agentic_cli-0.3.3/src/agentic_cli/tools/grep_tool.py +344 -0
  37. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/planning_tools.py +1 -1
  38. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/registry.py +76 -17
  39. agentic_cli-0.3.3/src/agentic_cli/tools/search.py +261 -0
  40. agentic_cli-0.3.3/src/agentic_cli/tools/shell/__init__.py +100 -0
  41. agentic_cli-0.3.3/src/agentic_cli/tools/shell/audit.py +379 -0
  42. agentic_cli-0.3.3/src/agentic_cli/tools/shell/classifier.py +587 -0
  43. agentic_cli-0.3.3/src/agentic_cli/tools/shell/config.py +226 -0
  44. agentic_cli-0.3.3/src/agentic_cli/tools/shell/executor.py +576 -0
  45. agentic_cli-0.3.3/src/agentic_cli/tools/shell/models.py +174 -0
  46. agentic_cli-0.3.3/src/agentic_cli/tools/shell/path_analyzer.py +299 -0
  47. agentic_cli-0.3.3/src/agentic_cli/tools/shell/preprocessor.py +423 -0
  48. agentic_cli-0.3.3/src/agentic_cli/tools/shell/risk_assessor.py +389 -0
  49. agentic_cli-0.3.3/src/agentic_cli/tools/shell/sandbox.py +308 -0
  50. agentic_cli-0.3.3/src/agentic_cli/tools/shell/tokenizer.py +361 -0
  51. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/standard.py +174 -25
  52. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch/__init__.py +44 -0
  53. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch/converter.py +66 -0
  54. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch/fetcher.py +178 -0
  55. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch/robots.py +75 -0
  56. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch/summarizer.py +50 -0
  57. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch/validator.py +129 -0
  58. agentic_cli-0.3.3/src/agentic_cli/tools/webfetch_tool.py +142 -0
  59. agentic_cli-0.3.3/src/agentic_cli/workflow/adk/__init__.py +20 -0
  60. agentic_cli-0.3.3/src/agentic_cli/workflow/adk/llm_event_logger.py +371 -0
  61. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/adk_manager.py +123 -79
  62. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/base_manager.py +104 -14
  63. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/context.py +17 -0
  64. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/events.py +187 -7
  65. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/manager.py +82 -71
  66. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/settings.py +18 -2
  67. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_config.py +1 -1
  68. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_hitl.py +4 -4
  69. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_knowledge_base.py +249 -0
  70. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_langgraph.py +2 -2
  71. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_planning.py +1 -1
  72. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_tools.py +411 -176
  73. agentic_cli-0.3.3/tests/test_webfetch.py +742 -0
  74. agentic_cli-0.3.3/tests/tools/__init__.py +1 -0
  75. agentic_cli-0.3.3/tests/tools/test_shell_security.py +942 -0
  76. agentic_cli-0.3.1/examples/research_demo/app.py +0 -233
  77. agentic_cli-0.3.1/src/agentic_cli/cli/app.py +0 -874
  78. agentic_cli-0.3.1/src/agentic_cli/tools/file_ops.py +0 -358
  79. agentic_cli-0.3.1/src/agentic_cli/tools/shell.py +0 -181
  80. agentic_cli-0.3.1/src/agentic_cli/workflow/adk/__init__.py +0 -18
  81. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/LICENSE +0 -0
  82. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/hello_agent.py +0 -0
  83. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/hello_langgraph.py +0 -0
  84. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/README.md +0 -0
  85. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/__init__.py +0 -0
  86. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/examples/research_demo/__main__.py +0 -0
  87. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/requirements-dev.txt +0 -0
  88. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/requirements.txt +0 -0
  89. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/cli/builtin_commands.py +0 -0
  90. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/cli/commands.py +0 -0
  91. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/cli/settings_command.py +0 -0
  92. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/cli/settings_introspection.py +0 -0
  93. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/config_mixins.py +0 -0
  94. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/hitl/__init__.py +0 -0
  95. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/hitl/config.py +0 -0
  96. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/knowledge_base/__init__.py +0 -0
  97. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/knowledge_base/embeddings.py +0 -0
  98. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/knowledge_base/manager.py +0 -0
  99. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/knowledge_base/models.py +0 -0
  100. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/knowledge_base/vector_store.py +0 -0
  101. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/logging.py +0 -0
  102. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/memory/__init__.py +0 -0
  103. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/memory/longterm.py +0 -0
  104. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/memory/tools.py +0 -0
  105. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/memory/working.py +0 -0
  106. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/persistence/__init__.py +0 -0
  107. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/persistence/artifacts.py +0 -0
  108. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/persistence/session.py +0 -0
  109. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/planning/__init__.py +0 -0
  110. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/resolvers.py +0 -0
  111. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/executor.py +0 -0
  112. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/hitl_tools.py +0 -0
  113. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/tools/memory_tools.py +0 -0
  114. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/__init__.py +0 -0
  115. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/config.py +0 -0
  116. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/__init__.py +0 -0
  117. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/persistence/__init__.py +0 -0
  118. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/persistence/checkpointers.py +0 -0
  119. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/persistence/stores.py +0 -0
  120. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/state.py +0 -0
  121. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/tools/__init__.py +0 -0
  122. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/tools/file_search.py +0 -0
  123. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph/tools/shell.py +0 -0
  124. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph_manager.py +0 -0
  125. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/langgraph_state.py +0 -0
  126. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/src/agentic_cli/workflow/thinking.py +0 -0
  127. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/__init__.py +0 -0
  128. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/conftest.py +0 -0
  129. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_commands.py +0 -0
  130. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_memory.py +0 -0
  131. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_persistence.py +0 -0
  132. {agentic_cli-0.3.1 → agentic_cli-0.3.3}/tests/test_workflow.py +0 -0
@@ -46,3 +46,7 @@ CLAUDE.md
46
46
  plans/
47
47
  docs/
48
48
  changes/
49
+ .research_demo/
50
+
51
+ # Git worktrees
52
+ .worktrees/
@@ -5,6 +5,62 @@ 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.3] - 2026-02-04
9
+
10
+ ### Added
11
+
12
+ - **Shell Security Architecture**: Modular shell executor with 8-layer defense-in-depth security
13
+ - Input preprocessing with encoding/obfuscation detection
14
+ - Command tokenization and classification
15
+ - Path analysis and sandboxing
16
+ - Risk assessment with HITL approval workflows
17
+ - Comprehensive audit logging
18
+ - **Note**: Shell tool is disabled by default pending security validation
19
+ - **File Operation Tools**: New categorized file tools with permission levels
20
+ - READ tools (safe): `read_file`, `grep`, `glob`, `list_dir`, `diff_compare`
21
+ - WRITE tools (caution): `write_file`, `edit_file`
22
+ - **Feature Demo Scripts**: New examples for arxiv, fileops, memory, planning, shell, and websearch
23
+
24
+ ### Changed
25
+
26
+ - **File Operations Refactoring**: Replaced monolithic `file_manager` with distinct, categorized tools
27
+ - **Tool Registry**: Added `PermissionLevel` enum for tool categorization (SAFE, CAUTION, DANGEROUS)
28
+
29
+ ### Removed
30
+
31
+ - Deprecated `file_manager` tool (replaced by new file operation tools)
32
+
33
+ ## [0.3.2] - 2026-02-01
34
+
35
+ ### Added
36
+
37
+ - **Web Fetch Tool**: Full-featured web content fetching with LLM summarization
38
+ - HTML-to-Markdown conversion with html2text
39
+ - Robots.txt compliance checking
40
+ - SSRF protection and URL validation
41
+ - Caching and redirect handling
42
+ - **Web Search Tool**: Pluggable web search with backend abstraction
43
+ - **arXiv Integration**: Enhanced arXiv search with rate limiting, caching, advanced query options, and paper analysis tools
44
+ - **LLM Event Logging**: Debug logging for model interactions
45
+ - **Task Progress Events**: `verbose_thinking` setting for detailed task progress display
46
+
47
+ ### Changed
48
+
49
+ - **CLI Architecture Refactoring**:
50
+ - Extracted `WorkflowController` and `MessageProcessor` from `BaseCLIApp` for better separation of concerns
51
+ - Added `background_init` context manager to `WorkflowController`
52
+ - Added public query methods to managers to reduce command-workflow coupling
53
+ - **BaseWorkflowManager**: Moved shared implementations from ADK/LangGraph managers to base class
54
+ - **Code Quality**: Added enums for string literals, improved `TaskGraph` encapsulation
55
+ - **Settings**: Use app-specific paths and generic settings application
56
+
57
+ ### Fixed
58
+
59
+ - Circular import in workflow module
60
+ - Web search tool integration issues
61
+ - arXiv cache unbounded growth (added size limit)
62
+ - Webfetch redirect response structure alignment with spec
63
+
8
64
  ## [0.3.1] - 2026-01-28
9
65
 
10
66
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentic-cli
3
- Version: 0.3.1
3
+ Version: 0.3.3
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
@@ -48,7 +48,7 @@ Agentic CLI provides the core infrastructure for building interactive CLI applic
48
48
  - **Pluggable Orchestration**: Choose between Google ADK or LangGraph for agent workflows
49
49
  - **Rich Terminal UI**: Thinking boxes, markdown rendering, and streaming responses via `thinking-prompt`
50
50
  - **Declarative Agents**: Define agents with simple configuration objects
51
- - **Built-in Tools**: Python execution, knowledge base search, web search
51
+ - **Built-in Tools**: Python execution, file operations, knowledge base, web search, web fetch, arXiv search
52
52
  - **Session Persistence**: Save and restore conversation sessions
53
53
  - **Type-safe Configuration**: Settings management with pydantic-settings
54
54
 
@@ -251,6 +251,10 @@ class MySettings(BaseSettings):
251
251
  | `orchestrator` | `AGENTIC_ORCHESTRATOR` | "adk" | Orchestrator: adk or langgraph |
252
252
  | `workspace_dir` | `AGENTIC_WORKSPACE_DIR` | ~/.agentic | Storage directory |
253
253
  | `log_level` | `AGENTIC_LOG_LEVEL` | "warning" | Logging level |
254
+ | `tavily_api_key` | `TAVILY_API_KEY` | None | Tavily API key for web search |
255
+ | `brave_api_key` | `BRAVE_API_KEY` | None | Brave Search API key |
256
+ | `search_backend` | `AGENTIC_SEARCH_BACKEND` | Auto | Web search provider (tavily/brave) |
257
+ | `webfetch_model` | `AGENTIC_WEBFETCH_MODEL` | Auto | Model for web content summarization |
254
258
 
255
259
  ### Settings Context
256
260
 
@@ -365,6 +369,124 @@ np.mean(data)
365
369
 
366
370
  Allowed modules: numpy, pandas, scipy, math, json, datetime, collections, itertools, re, random
367
371
 
372
+ #### Web Search
373
+
374
+ Search the web using pluggable backends (Tavily or Brave):
375
+
376
+ ```python
377
+ from agentic_cli.tools import web_search
378
+
379
+ # Use as agent tool
380
+ agent = AgentConfig(
381
+ name="researcher",
382
+ tools=[web_search],
383
+ )
384
+
385
+ # Or call directly
386
+ results = web_search("Python async programming", max_results=5)
387
+ # Returns: {"results": [{"title": "...", "url": "...", "snippet": "..."}], ...}
388
+ ```
389
+
390
+ Backends auto-select based on available API keys. Set `TAVILY_API_KEY` or `BRAVE_API_KEY`.
391
+
392
+ #### Web Fetch
393
+
394
+ Fetch web content and summarize with LLM:
395
+
396
+ ```python
397
+ from agentic_cli.tools import web_fetch
398
+
399
+ result = web_fetch(
400
+ url="https://example.com/article",
401
+ prompt="Extract the main points from this article",
402
+ )
403
+ # Returns: {"url": "...", "summary": "...", "content_length": ...}
404
+ ```
405
+
406
+ Features: URL validation, robots.txt compliance, SSRF protection, content caching.
407
+
408
+ #### ArXiv Search
409
+
410
+ Search and analyze academic papers:
411
+
412
+ ```python
413
+ from agentic_cli.tools import search_arxiv, fetch_arxiv_paper, analyze_arxiv_paper
414
+
415
+ # Search papers
416
+ results = search_arxiv("transformer attention", max_results=10, categories=["cs.CL"])
417
+
418
+ # Fetch paper details
419
+ paper = fetch_arxiv_paper("1706.03762") # "Attention Is All You Need"
420
+
421
+ # Analyze with LLM
422
+ analysis = await analyze_arxiv_paper("1706.03762", "Summarize the key contributions")
423
+ ```
424
+
425
+ #### File Operations
426
+
427
+ Categorized file tools with permission levels:
428
+
429
+ **READ Tools (Safe)**
430
+
431
+ ```python
432
+ from agentic_cli.tools import read_file, grep, glob, list_dir, diff_compare
433
+
434
+ # Read file contents
435
+ result = read_file("src/main.py", offset=0, limit=100)
436
+ # Returns: {"success": True, "content": "...", "size": 1234, "lines_read": 100}
437
+
438
+ # Search for patterns (ripgrep-like)
439
+ result = grep("def.*async", path="src/", file_pattern="*.py", recursive=True)
440
+ # Returns: {"success": True, "matches": [...], "file_count": 5}
441
+
442
+ # Find files by pattern
443
+ result = glob("**/*.py", path="src/", include_metadata=True)
444
+ # Returns: {"success": True, "files": [...], "count": 42}
445
+
446
+ # List directory contents
447
+ result = list_dir("src/", include_hidden=False)
448
+ # Returns: {"success": True, "entries": [...]}
449
+
450
+ # Compare files or text
451
+ result = diff_compare(source1="old.txt", source2="new.txt")
452
+ # Returns: {"success": True, "diff": "...", "has_changes": True}
453
+ ```
454
+
455
+ **WRITE Tools (Caution)**
456
+
457
+ ```python
458
+ from agentic_cli.tools import write_file, edit_file
459
+
460
+ # Write file (creates or overwrites)
461
+ result = write_file("output.txt", content="Hello, World!", create_dirs=True)
462
+ # Returns: {"success": True, "path": "...", "size": 13, "created": True}
463
+
464
+ # Edit file (sed-like replacement)
465
+ result = edit_file("config.py", old_text="DEBUG = True", new_text="DEBUG = False")
466
+ # Returns: {"success": True, "replacements": 1}
467
+ ```
468
+
469
+ #### Shell Executor
470
+
471
+ > **Note**: Shell execution is currently **disabled by default** while security safeguards are being validated.
472
+
473
+ The shell tool provides layered security with 8 defense layers:
474
+ - Input preprocessing (encoding/obfuscation detection)
475
+ - Command tokenization and classification
476
+ - Path analysis and sandboxing
477
+ - Risk assessment with approval workflows
478
+ - Audit logging
479
+
480
+ ```python
481
+ from agentic_cli.tools import shell_executor, is_shell_enabled
482
+
483
+ # Check if shell is enabled
484
+ if is_shell_enabled():
485
+ result = shell_executor("ls -la", working_dir="/project")
486
+ else:
487
+ print("Shell tool disabled pending security validation")
488
+ ```
489
+
368
490
  #### KnowledgeBaseManager
369
491
 
370
492
  Semantic search over documents:
@@ -470,8 +592,20 @@ Status icons:
470
592
 
471
593
  See the `examples/` directory for complete working examples:
472
594
 
595
+ **Getting Started**
473
596
  - **hello_agent.py** - Simple assistant using Google ADK
474
597
  - **hello_langgraph.py** - Same assistant using LangGraph orchestration
598
+
599
+ **Feature Demos**
600
+ - **arxiv_demo.py** - ArXiv paper search and analysis
601
+ - **fileops_demo.py** - File operation tools (read, write, grep, glob)
602
+ - **memory_demo.py** - Working and long-term memory management
603
+ - **planning_demo.py** - Task graph and planning tools
604
+ - **shell_demo.py** - Shell security pattern detection
605
+ - **webfetch_demo.py** - Web fetching and summarization
606
+ - **websearch_demo.py** - Web search with multiple backends
607
+
608
+ **Full Applications**
475
609
  - **research_demo/** - Full-featured research assistant with memory, planning, and file operations
476
610
 
477
611
  Run examples:
@@ -480,6 +614,10 @@ Run examples:
480
614
  export GOOGLE_API_KEY="your-key"
481
615
  python examples/hello_agent.py
482
616
 
617
+ # Feature demos (no API key needed for some)
618
+ python examples/fileops_demo.py
619
+ python examples/shell_demo.py
620
+
483
621
  # Or with LangGraph (requires langgraph extra)
484
622
  pip install agentic-cli[langgraph]
485
623
  python examples/hello_langgraph.py
@@ -512,7 +650,9 @@ agentic-cli/
512
650
  │ ├── config.py # BaseSettings, SettingsContext
513
651
  │ ├── cli/
514
652
  │ │ ├── app.py # BaseCLIApp
515
- │ │ └── commands.py # Command, CommandRegistry
653
+ │ │ ├── commands.py # Command, CommandRegistry
654
+ │ │ ├── workflow_controller.py # Workflow orchestration
655
+ │ │ └── message_processor.py # Event stream processing
516
656
  │ ├── workflow/
517
657
  │ │ ├── events.py # WorkflowEvent, EventType
518
658
  │ │ ├── config.py # AgentConfig
@@ -520,15 +660,27 @@ agentic-cli/
520
660
  │ │ └── langgraph/ # LangGraph submodule
521
661
  │ │ ├── manager.py # LangGraphWorkflowManager
522
662
  │ │ ├── state.py # AgentState, CheckpointData
523
- │ │ ├── persistence/ # Checkpointers and stores
524
- │ │ └── tools/ # Shell, file search tools
663
+ │ │ └── persistence/ # Checkpointers and stores
525
664
  │ ├── tools/
526
- │ │ └── executor.py # SafePythonExecutor
665
+ │ │ ├── executor.py # SafePythonExecutor
666
+ │ │ ├── file_read.py # read_file, diff_compare
667
+ │ │ ├── file_write.py # write_file, edit_file
668
+ │ │ ├── grep_tool.py # grep (pattern search)
669
+ │ │ ├── glob_tool.py # glob, list_dir (file discovery)
670
+ │ │ ├── search.py # Web search (Tavily, Brave)
671
+ │ │ ├── webfetch_tool.py # Web content fetching
672
+ │ │ └── shell/ # Shell executor with security
673
+ │ │ ├── executor.py # Main entry point (disabled by default)
674
+ │ │ ├── tokenizer.py # Command parsing
675
+ │ │ ├── classifier.py # Risk classification
676
+ │ │ ├── sandbox.py # Execution sandboxing
677
+ │ │ └── audit.py # Security logging
527
678
  │ └── knowledge_base/
528
679
  │ └── manager.py # KnowledgeBaseManager
529
680
  ├── examples/
530
- │ ├── hello_agent.py
531
- │ ├── hello_langgraph.py
681
+ │ ├── hello_agent.py # Basic ADK example
682
+ │ ├── hello_langgraph.py # Basic LangGraph example
683
+ │ ├── *_demo.py # Feature demonstration scripts
532
684
  │ └── research_demo/ # Full-featured example
533
685
  └── tests/
534
686
  ```
@@ -9,7 +9,7 @@ Agentic CLI provides the core infrastructure for building interactive CLI applic
9
9
  - **Pluggable Orchestration**: Choose between Google ADK or LangGraph for agent workflows
10
10
  - **Rich Terminal UI**: Thinking boxes, markdown rendering, and streaming responses via `thinking-prompt`
11
11
  - **Declarative Agents**: Define agents with simple configuration objects
12
- - **Built-in Tools**: Python execution, knowledge base search, web search
12
+ - **Built-in Tools**: Python execution, file operations, knowledge base, web search, web fetch, arXiv search
13
13
  - **Session Persistence**: Save and restore conversation sessions
14
14
  - **Type-safe Configuration**: Settings management with pydantic-settings
15
15
 
@@ -212,6 +212,10 @@ class MySettings(BaseSettings):
212
212
  | `orchestrator` | `AGENTIC_ORCHESTRATOR` | "adk" | Orchestrator: adk or langgraph |
213
213
  | `workspace_dir` | `AGENTIC_WORKSPACE_DIR` | ~/.agentic | Storage directory |
214
214
  | `log_level` | `AGENTIC_LOG_LEVEL` | "warning" | Logging level |
215
+ | `tavily_api_key` | `TAVILY_API_KEY` | None | Tavily API key for web search |
216
+ | `brave_api_key` | `BRAVE_API_KEY` | None | Brave Search API key |
217
+ | `search_backend` | `AGENTIC_SEARCH_BACKEND` | Auto | Web search provider (tavily/brave) |
218
+ | `webfetch_model` | `AGENTIC_WEBFETCH_MODEL` | Auto | Model for web content summarization |
215
219
 
216
220
  ### Settings Context
217
221
 
@@ -326,6 +330,124 @@ np.mean(data)
326
330
 
327
331
  Allowed modules: numpy, pandas, scipy, math, json, datetime, collections, itertools, re, random
328
332
 
333
+ #### Web Search
334
+
335
+ Search the web using pluggable backends (Tavily or Brave):
336
+
337
+ ```python
338
+ from agentic_cli.tools import web_search
339
+
340
+ # Use as agent tool
341
+ agent = AgentConfig(
342
+ name="researcher",
343
+ tools=[web_search],
344
+ )
345
+
346
+ # Or call directly
347
+ results = web_search("Python async programming", max_results=5)
348
+ # Returns: {"results": [{"title": "...", "url": "...", "snippet": "..."}], ...}
349
+ ```
350
+
351
+ Backends auto-select based on available API keys. Set `TAVILY_API_KEY` or `BRAVE_API_KEY`.
352
+
353
+ #### Web Fetch
354
+
355
+ Fetch web content and summarize with LLM:
356
+
357
+ ```python
358
+ from agentic_cli.tools import web_fetch
359
+
360
+ result = web_fetch(
361
+ url="https://example.com/article",
362
+ prompt="Extract the main points from this article",
363
+ )
364
+ # Returns: {"url": "...", "summary": "...", "content_length": ...}
365
+ ```
366
+
367
+ Features: URL validation, robots.txt compliance, SSRF protection, content caching.
368
+
369
+ #### ArXiv Search
370
+
371
+ Search and analyze academic papers:
372
+
373
+ ```python
374
+ from agentic_cli.tools import search_arxiv, fetch_arxiv_paper, analyze_arxiv_paper
375
+
376
+ # Search papers
377
+ results = search_arxiv("transformer attention", max_results=10, categories=["cs.CL"])
378
+
379
+ # Fetch paper details
380
+ paper = fetch_arxiv_paper("1706.03762") # "Attention Is All You Need"
381
+
382
+ # Analyze with LLM
383
+ analysis = await analyze_arxiv_paper("1706.03762", "Summarize the key contributions")
384
+ ```
385
+
386
+ #### File Operations
387
+
388
+ Categorized file tools with permission levels:
389
+
390
+ **READ Tools (Safe)**
391
+
392
+ ```python
393
+ from agentic_cli.tools import read_file, grep, glob, list_dir, diff_compare
394
+
395
+ # Read file contents
396
+ result = read_file("src/main.py", offset=0, limit=100)
397
+ # Returns: {"success": True, "content": "...", "size": 1234, "lines_read": 100}
398
+
399
+ # Search for patterns (ripgrep-like)
400
+ result = grep("def.*async", path="src/", file_pattern="*.py", recursive=True)
401
+ # Returns: {"success": True, "matches": [...], "file_count": 5}
402
+
403
+ # Find files by pattern
404
+ result = glob("**/*.py", path="src/", include_metadata=True)
405
+ # Returns: {"success": True, "files": [...], "count": 42}
406
+
407
+ # List directory contents
408
+ result = list_dir("src/", include_hidden=False)
409
+ # Returns: {"success": True, "entries": [...]}
410
+
411
+ # Compare files or text
412
+ result = diff_compare(source1="old.txt", source2="new.txt")
413
+ # Returns: {"success": True, "diff": "...", "has_changes": True}
414
+ ```
415
+
416
+ **WRITE Tools (Caution)**
417
+
418
+ ```python
419
+ from agentic_cli.tools import write_file, edit_file
420
+
421
+ # Write file (creates or overwrites)
422
+ result = write_file("output.txt", content="Hello, World!", create_dirs=True)
423
+ # Returns: {"success": True, "path": "...", "size": 13, "created": True}
424
+
425
+ # Edit file (sed-like replacement)
426
+ result = edit_file("config.py", old_text="DEBUG = True", new_text="DEBUG = False")
427
+ # Returns: {"success": True, "replacements": 1}
428
+ ```
429
+
430
+ #### Shell Executor
431
+
432
+ > **Note**: Shell execution is currently **disabled by default** while security safeguards are being validated.
433
+
434
+ The shell tool provides layered security with 8 defense layers:
435
+ - Input preprocessing (encoding/obfuscation detection)
436
+ - Command tokenization and classification
437
+ - Path analysis and sandboxing
438
+ - Risk assessment with approval workflows
439
+ - Audit logging
440
+
441
+ ```python
442
+ from agentic_cli.tools import shell_executor, is_shell_enabled
443
+
444
+ # Check if shell is enabled
445
+ if is_shell_enabled():
446
+ result = shell_executor("ls -la", working_dir="/project")
447
+ else:
448
+ print("Shell tool disabled pending security validation")
449
+ ```
450
+
329
451
  #### KnowledgeBaseManager
330
452
 
331
453
  Semantic search over documents:
@@ -431,8 +553,20 @@ Status icons:
431
553
 
432
554
  See the `examples/` directory for complete working examples:
433
555
 
556
+ **Getting Started**
434
557
  - **hello_agent.py** - Simple assistant using Google ADK
435
558
  - **hello_langgraph.py** - Same assistant using LangGraph orchestration
559
+
560
+ **Feature Demos**
561
+ - **arxiv_demo.py** - ArXiv paper search and analysis
562
+ - **fileops_demo.py** - File operation tools (read, write, grep, glob)
563
+ - **memory_demo.py** - Working and long-term memory management
564
+ - **planning_demo.py** - Task graph and planning tools
565
+ - **shell_demo.py** - Shell security pattern detection
566
+ - **webfetch_demo.py** - Web fetching and summarization
567
+ - **websearch_demo.py** - Web search with multiple backends
568
+
569
+ **Full Applications**
436
570
  - **research_demo/** - Full-featured research assistant with memory, planning, and file operations
437
571
 
438
572
  Run examples:
@@ -441,6 +575,10 @@ Run examples:
441
575
  export GOOGLE_API_KEY="your-key"
442
576
  python examples/hello_agent.py
443
577
 
578
+ # Feature demos (no API key needed for some)
579
+ python examples/fileops_demo.py
580
+ python examples/shell_demo.py
581
+
444
582
  # Or with LangGraph (requires langgraph extra)
445
583
  pip install agentic-cli[langgraph]
446
584
  python examples/hello_langgraph.py
@@ -473,7 +611,9 @@ agentic-cli/
473
611
  │ ├── config.py # BaseSettings, SettingsContext
474
612
  │ ├── cli/
475
613
  │ │ ├── app.py # BaseCLIApp
476
- │ │ └── commands.py # Command, CommandRegistry
614
+ │ │ ├── commands.py # Command, CommandRegistry
615
+ │ │ ├── workflow_controller.py # Workflow orchestration
616
+ │ │ └── message_processor.py # Event stream processing
477
617
  │ ├── workflow/
478
618
  │ │ ├── events.py # WorkflowEvent, EventType
479
619
  │ │ ├── config.py # AgentConfig
@@ -481,15 +621,27 @@ agentic-cli/
481
621
  │ │ └── langgraph/ # LangGraph submodule
482
622
  │ │ ├── manager.py # LangGraphWorkflowManager
483
623
  │ │ ├── state.py # AgentState, CheckpointData
484
- │ │ ├── persistence/ # Checkpointers and stores
485
- │ │ └── tools/ # Shell, file search tools
624
+ │ │ └── persistence/ # Checkpointers and stores
486
625
  │ ├── tools/
487
- │ │ └── executor.py # SafePythonExecutor
626
+ │ │ ├── executor.py # SafePythonExecutor
627
+ │ │ ├── file_read.py # read_file, diff_compare
628
+ │ │ ├── file_write.py # write_file, edit_file
629
+ │ │ ├── grep_tool.py # grep (pattern search)
630
+ │ │ ├── glob_tool.py # glob, list_dir (file discovery)
631
+ │ │ ├── search.py # Web search (Tavily, Brave)
632
+ │ │ ├── webfetch_tool.py # Web content fetching
633
+ │ │ └── shell/ # Shell executor with security
634
+ │ │ ├── executor.py # Main entry point (disabled by default)
635
+ │ │ ├── tokenizer.py # Command parsing
636
+ │ │ ├── classifier.py # Risk classification
637
+ │ │ ├── sandbox.py # Execution sandboxing
638
+ │ │ └── audit.py # Security logging
488
639
  │ └── knowledge_base/
489
640
  │ └── manager.py # KnowledgeBaseManager
490
641
  ├── examples/
491
- │ ├── hello_agent.py
492
- │ ├── hello_langgraph.py
642
+ │ ├── hello_agent.py # Basic ADK example
643
+ │ ├── hello_langgraph.py # Basic LangGraph example
644
+ │ ├── *_demo.py # Feature demonstration scripts
493
645
  │ └── research_demo/ # Full-featured example
494
646
  └── tests/
495
647
  ```
@@ -5,6 +5,7 @@ channels:
5
5
  dependencies:
6
6
  - python=3.12
7
7
  - pip
8
+ - html2text
8
9
  - pip:
9
10
  - -e .
10
11
  - -e .[dev]