pengent 1.2.1__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 (158) hide show
  1. pengent-1.2.1/LICENSE +9 -0
  2. pengent-1.2.1/PKG-INFO +52 -0
  3. pengent-1.2.1/README.md +32 -0
  4. pengent-1.2.1/pyproject.toml +30 -0
  5. pengent-1.2.1/setup.cfg +4 -0
  6. pengent-1.2.1/src/pengent/__init__.py +0 -0
  7. pengent-1.2.1/src/pengent/agents/__init__.py +9 -0
  8. pengent-1.2.1/src/pengent/agents/agent_base.py +665 -0
  9. pengent-1.2.1/src/pengent/agents/basic/agent_chat.py +42 -0
  10. pengent-1.2.1/src/pengent/agents/basic/agent_coder.py +49 -0
  11. pengent-1.2.1/src/pengent/core/artifacts/artifact.py +66 -0
  12. pengent-1.2.1/src/pengent/core/artifacts/artifact_service/__init__.py +10 -0
  13. pengent-1.2.1/src/pengent/core/artifacts/artifact_service/base_artifact_service.py +166 -0
  14. pengent-1.2.1/src/pengent/core/artifacts/artifact_service/in_memory_artfact_service.py +155 -0
  15. pengent-1.2.1/src/pengent/core/artifacts/artifact_service/storage_artifact_service.py +281 -0
  16. pengent-1.2.1/src/pengent/core/message_memory/__init__.py +4 -0
  17. pengent-1.2.1/src/pengent/core/message_memory/history_message_memory.py +30 -0
  18. pengent-1.2.1/src/pengent/core/message_memory/message_memory.py +80 -0
  19. pengent-1.2.1/src/pengent/core/message_memory/retrieval_message_memory.py +142 -0
  20. pengent-1.2.1/src/pengent/core/message_memory/storage/__init__.py +7 -0
  21. pengent-1.2.1/src/pengent/core/message_memory/storage/file_memory_storage.py +19 -0
  22. pengent-1.2.1/src/pengent/core/message_memory/storage/memory_storage_interface.py +14 -0
  23. pengent-1.2.1/src/pengent/core/message_memory/storage/redis_memory_storage.py +29 -0
  24. pengent-1.2.1/src/pengent/core/message_memory/summary_message_memory.py +42 -0
  25. pengent-1.2.1/src/pengent/core/message_memory/vector/faissy_store.py +124 -0
  26. pengent-1.2.1/src/pengent/core/message_memory/vector/qdrant_store.py +98 -0
  27. pengent-1.2.1/src/pengent/core/message_memory/vector/vectore_store_factory.py +69 -0
  28. pengent-1.2.1/src/pengent/core/message_memory/vector/vectore_store_interface.py +21 -0
  29. pengent-1.2.1/src/pengent/core/runners/__init__.py +5 -0
  30. pengent-1.2.1/src/pengent/core/runners/runner.py +77 -0
  31. pengent-1.2.1/src/pengent/core/sessions/__init__.py +11 -0
  32. pengent-1.2.1/src/pengent/core/sessions/session.py +27 -0
  33. pengent-1.2.1/src/pengent/core/sessions/session_service/database_session_service.py +290 -0
  34. pengent-1.2.1/src/pengent/core/sessions/session_service/in_memory_session_service.py +101 -0
  35. pengent-1.2.1/src/pengent/core/sessions/session_service/redis_session_service.py +165 -0
  36. pengent-1.2.1/src/pengent/core/sessions/session_service/session_service_base.py +105 -0
  37. pengent-1.2.1/src/pengent/core/sessions/session_service/storage_session_service.py +175 -0
  38. pengent-1.2.1/src/pengent/db/base.py +109 -0
  39. pengent-1.2.1/src/pengent/db/models/messages_orm.py +37 -0
  40. pengent-1.2.1/src/pengent/db/models/session_orm.py +25 -0
  41. pengent-1.2.1/src/pengent/errors/already_exists_error.py +14 -0
  42. pengent-1.2.1/src/pengent/lib/__init__.py +10 -0
  43. pengent-1.2.1/src/pengent/lib/common.py +64 -0
  44. pengent-1.2.1/src/pengent/lib/custom_logger.py +130 -0
  45. pengent-1.2.1/src/pengent/lib/singleton.py +24 -0
  46. pengent-1.2.1/src/pengent/llm/__init__.py +14 -0
  47. pengent-1.2.1/src/pengent/llm/batch/llm_batch_anthropic.py +431 -0
  48. pengent-1.2.1/src/pengent/llm/batch/llm_batch_base.py +338 -0
  49. pengent-1.2.1/src/pengent/llm/batch/llm_batch_openai.py +433 -0
  50. pengent-1.2.1/src/pengent/llm/llm_client_anthropic.py +175 -0
  51. pengent-1.2.1/src/pengent/llm/llm_client_base.py +140 -0
  52. pengent-1.2.1/src/pengent/llm/llm_client_factory.py +66 -0
  53. pengent-1.2.1/src/pengent/llm/llm_client_gemini.py +215 -0
  54. pengent-1.2.1/src/pengent/llm/llm_client_gguf.py +140 -0
  55. pengent-1.2.1/src/pengent/llm/llm_client_open_router.py +199 -0
  56. pengent-1.2.1/src/pengent/llm/llm_client_openai.py +180 -0
  57. pengent-1.2.1/src/pengent/policies/__init__.py +19 -0
  58. pengent-1.2.1/src/pengent/policies/actions/__init__.py +7 -0
  59. pengent-1.2.1/src/pengent/policies/actions/action_base.py +71 -0
  60. pengent-1.2.1/src/pengent/policies/polices/all_match_policy.py +25 -0
  61. pengent-1.2.1/src/pengent/policies/polices/best_score_policy.py +32 -0
  62. pengent-1.2.1/src/pengent/policies/polices/first_match_policy.py +17 -0
  63. pengent-1.2.1/src/pengent/policies/polices/policy_base.py +38 -0
  64. pengent-1.2.1/src/pengent/policies/polices/threshold_policy.py +134 -0
  65. pengent-1.2.1/src/pengent/policies/rules/__init__.py +25 -0
  66. pengent-1.2.1/src/pengent/policies/rules/generic_line_rule.py +82 -0
  67. pengent-1.2.1/src/pengent/policies/rules/identifier_rule.py +133 -0
  68. pengent-1.2.1/src/pengent/policies/rules/japanese_intent_rule.py +248 -0
  69. pengent-1.2.1/src/pengent/policies/rules/keyword_ex_rule.py +110 -0
  70. pengent-1.2.1/src/pengent/policies/rules/keyword_rule.py +53 -0
  71. pengent-1.2.1/src/pengent/policies/rules/max_len_rule.py +21 -0
  72. pengent-1.2.1/src/pengent/policies/rules/min_len_rule.py +21 -0
  73. pengent-1.2.1/src/pengent/policies/rules/regex_rule.py +27 -0
  74. pengent-1.2.1/src/pengent/policies/rules/rule_base.py +61 -0
  75. pengent-1.2.1/src/pengent/policies/rules/status_equals_rule.py +17 -0
  76. pengent-1.2.1/src/pengent/policies/rules/value_exists_rule.py +16 -0
  77. pengent-1.2.1/src/pengent/templates/template_factory.py +62 -0
  78. pengent-1.2.1/src/pengent/tools/__init__.py +15 -0
  79. pengent-1.2.1/src/pengent/tools/api/chat/api_rocket_chat.py +164 -0
  80. pengent-1.2.1/src/pengent/tools/api/chat/api_slack.py +79 -0
  81. pengent-1.2.1/src/pengent/tools/api/cloud/api_cloud_base.py +111 -0
  82. pengent-1.2.1/src/pengent/tools/api/cloud/runpod/api_runpod.py +77 -0
  83. pengent-1.2.1/src/pengent/tools/api/git/api_git_base.py +429 -0
  84. pengent-1.2.1/src/pengent/tools/api/git/api_gitea.py +664 -0
  85. pengent-1.2.1/src/pengent/tools/api/git/api_github.py +101 -0
  86. pengent-1.2.1/src/pengent/tools/api/google/api_google_calender.py +246 -0
  87. pengent-1.2.1/src/pengent/tools/api/google/api_google_docs.py +31 -0
  88. pengent-1.2.1/src/pengent/tools/api/google/api_google_drive.py +187 -0
  89. pengent-1.2.1/src/pengent/tools/api/google/api_google_mail.py +46 -0
  90. pengent-1.2.1/src/pengent/tools/api/google/api_google_slides.py +1061 -0
  91. pengent-1.2.1/src/pengent/tools/api/news/api_news_data.py +56 -0
  92. pengent-1.2.1/src/pengent/tools/api/notion/api_notion.py +392 -0
  93. pengent-1.2.1/src/pengent/tools/api/post/api_qiita.py +286 -0
  94. pengent-1.2.1/src/pengent/tools/api/post/api_wiki_js.py +203 -0
  95. pengent-1.2.1/src/pengent/tools/api/project/redmine/__init__.py +5 -0
  96. pengent-1.2.1/src/pengent/tools/api/project/redmine/api_redmine.py +585 -0
  97. pengent-1.2.1/src/pengent/tools/api/report/api_report_pdf.py +182 -0
  98. pengent-1.2.1/src/pengent/tools/api/search/api_brave_search.py +52 -0
  99. pengent-1.2.1/src/pengent/tools/api/search/api_google_web_search.py +57 -0
  100. pengent-1.2.1/src/pengent/tools/api/search/api_read_webpage.py +54 -0
  101. pengent-1.2.1/src/pengent/tools/api/services/api_hotpepper_gourmet.py +36 -0
  102. pengent-1.2.1/src/pengent/tools/api/services/open_weather.py +81 -0
  103. pengent-1.2.1/src/pengent/tools/mcp/__init__.py +3 -0
  104. pengent-1.2.1/src/pengent/tools/mcp/mcp_client.py +70 -0
  105. pengent-1.2.1/src/pengent/tools/mcp/mcp_data.py +130 -0
  106. pengent-1.2.1/src/pengent/tools/mcp/mcp_tool_package.py +166 -0
  107. pengent-1.2.1/src/pengent/tools/tool_utils.py +116 -0
  108. pengent-1.2.1/src/pengent/tools/tools/coder/__init__.py +5 -0
  109. pengent-1.2.1/src/pengent/tools/tools/coder/tool_run_code.py +121 -0
  110. pengent-1.2.1/src/pengent/tools/tools/coder/tool_run_docker_code.py +144 -0
  111. pengent-1.2.1/src/pengent/tools/tools/genaral/files_tool.py +79 -0
  112. pengent-1.2.1/src/pengent/tools/tools/git/tool_giter_basic.py +252 -0
  113. pengent-1.2.1/src/pengent/tools/tools/issues/redmine_tool.py +249 -0
  114. pengent-1.2.1/src/pengent/tools/tools/location/locatoion_tools.py +44 -0
  115. pengent-1.2.1/src/pengent/tools/tools/post/tool_qiita.py +77 -0
  116. pengent-1.2.1/src/pengent/tools/tools/post/tool_wiki_post.py +93 -0
  117. pengent-1.2.1/src/pengent/tools/tools/search/tool_web_search.py +60 -0
  118. pengent-1.2.1/src/pengent/tools/tools/utility/tool_news.py +28 -0
  119. pengent-1.2.1/src/pengent/type/agent/__init__.py +6 -0
  120. pengent-1.2.1/src/pengent/type/agent/agent_enum.py +167 -0
  121. pengent-1.2.1/src/pengent/type/llm/llm_message.py +493 -0
  122. pengent-1.2.1/src/pengent/type/llm/llm_response.py +158 -0
  123. pengent-1.2.1/src/pengent/type/llm/llm_type_enum.py +47 -0
  124. pengent-1.2.1/src/pengent/type/rag.py +103 -0
  125. pengent-1.2.1/src/pengent/type/rag_block.py +84 -0
  126. pengent-1.2.1/src/pengent/type/tool/tool_enum.py +323 -0
  127. pengent-1.2.1/src/pengent/utility/categorizer/__init__.py +0 -0
  128. pengent-1.2.1/src/pengent/utility/categorizer/categorize.py +102 -0
  129. pengent-1.2.1/src/pengent/utility/chunker/block/block_chunker.py +116 -0
  130. pengent-1.2.1/src/pengent/utility/chunker/block/html_parser.py +109 -0
  131. pengent-1.2.1/src/pengent/utility/chunker/block/markdown_parser.py +143 -0
  132. pengent-1.2.1/src/pengent/utility/chunker/block/pdf_parser.py +128 -0
  133. pengent-1.2.1/src/pengent/utility/chunker/chunker_base.py +70 -0
  134. pengent-1.2.1/src/pengent/utility/chunker/chunker_factory.py +77 -0
  135. pengent-1.2.1/src/pengent/utility/chunker/faq/faq_analyzer.py +210 -0
  136. pengent-1.2.1/src/pengent/utility/chunker/faq/pdf_faq_parser.py +89 -0
  137. pengent-1.2.1/src/pengent/utility/chunker/faq/text_faq_parser.py +33 -0
  138. pengent-1.2.1/src/pengent/utility/chunker/text/text_chunker.py +93 -0
  139. pengent-1.2.1/src/pengent/utility/embed/embed_base.py +28 -0
  140. pengent-1.2.1/src/pengent/utility/embed/embed_with_local.py +38 -0
  141. pengent-1.2.1/src/pengent/utility/embed/embed_with_openai.py +35 -0
  142. pengent-1.2.1/src/pengent/utility/reader/html_async_reader.py +96 -0
  143. pengent-1.2.1/src/pengent/utility/reader/html_reader.py +97 -0
  144. pengent-1.2.1/src/pengent/utility/reader/request_async_reader.py +22 -0
  145. pengent-1.2.1/src/pengent/utility/reader/request_reader.py +21 -0
  146. pengent-1.2.1/src/pengent/utility/storage/__init__.py +7 -0
  147. pengent-1.2.1/src/pengent/utility/storage/local_storage.py +130 -0
  148. pengent-1.2.1/src/pengent/utility/storage/storage_base.py +121 -0
  149. pengent-1.2.1/src/pengent/utility/summarize.py +30 -0
  150. pengent-1.2.1/src/pengent/workers/__init__.py +9 -0
  151. pengent-1.2.1/src/pengent/workers/basic/worker_call_tool.py +403 -0
  152. pengent-1.2.1/src/pengent/workers/basic/worker_greet.py +41 -0
  153. pengent-1.2.1/src/pengent/workers/worker_base.py +295 -0
  154. pengent-1.2.1/src/pengent.egg-info/PKG-INFO +52 -0
  155. pengent-1.2.1/src/pengent.egg-info/SOURCES.txt +157 -0
  156. pengent-1.2.1/src/pengent.egg-info/dependency_links.txt +1 -0
  157. pengent-1.2.1/src/pengent.egg-info/requires.txt +9 -0
  158. pengent-1.2.1/src/pengent.egg-info/top_level.txt +1 -0
pengent-1.2.1/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ai-program
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
pengent-1.2.1/PKG-INFO ADDED
@@ -0,0 +1,52 @@
1
+ Metadata-Version: 2.4
2
+ Name: pengent
3
+ Version: 1.2.1
4
+ Summary: Genaral AI Angent Framework for Python
5
+ Author-email: ryoh Ya <dev.p.ry.yamafuji@gmail.com>, Pengent <ai.pengent@gmail.com>
6
+ License: MIT
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: requests
11
+ Requires-Dist: openai>=1.71.0
12
+ Requires-Dist: python-dotenv>=1.0.1
13
+ Requires-Dist: pydantic==2.12.4
14
+ Requires-Dist: markdown>=3.7
15
+ Requires-Dist: pdfkit==1.0.0
16
+ Requires-Dist: redis>=7.1.0
17
+ Requires-Dist: sqlalchemy>=2.0.45
18
+ Requires-Dist: mcp==1.10.1
19
+ Dynamic: license-file
20
+
21
+ # penjent 🐧
22
+
23
+ **Pengent(ペンジェント)** は、軽量かつ汎用的な AIエージェントフレームワーク です。
24
+ ChatGPT・Claude・GeminiなどのLLMと、ツール実行やルール処理を組み合わせて、柔軟なマルチエージェント処理が行えます。
25
+
26
+ ![pengent logo](README/images/log.png)
27
+
28
+ ## Functions
29
+
30
+ * 複数のLLMに対応:OpenAI / Claude / Gemini など、用途に応じて使い分け可能
31
+
32
+ ## Usecase
33
+
34
+ * SlackやLINE BotなどチャットからAIで自動対応したい
35
+ * Faq用のエージェントをすぐに使いたい(RAGを活用すれば無料AIでも活用可能)
36
+
37
+ ## Install
38
+
39
+ ```
40
+ pip install git+https://gitea.pglikers.com/ai-program/penjent.git@latest
41
+ ```
42
+
43
+ ## 今後の方針について
44
+
45
+ バージョンの`1.2.0`より責任範囲を明確にするため
46
+ LLMとエージェントの機能を絞りました。
47
+
48
+ * アダプタ関連機能を削除しました。
49
+ * タスク関連機能を削除しました、
50
+ * Agentのステータス管理はセッションクラス(Session)に委任しました。
51
+
52
+ AIエージェントの補助機能については別ライブラリで提供してきます
@@ -0,0 +1,32 @@
1
+ # penjent 🐧
2
+
3
+ **Pengent(ペンジェント)** は、軽量かつ汎用的な AIエージェントフレームワーク です。
4
+ ChatGPT・Claude・GeminiなどのLLMと、ツール実行やルール処理を組み合わせて、柔軟なマルチエージェント処理が行えます。
5
+
6
+ ![pengent logo](README/images/log.png)
7
+
8
+ ## Functions
9
+
10
+ * 複数のLLMに対応:OpenAI / Claude / Gemini など、用途に応じて使い分け可能
11
+
12
+ ## Usecase
13
+
14
+ * SlackやLINE BotなどチャットからAIで自動対応したい
15
+ * Faq用のエージェントをすぐに使いたい(RAGを活用すれば無料AIでも活用可能)
16
+
17
+ ## Install
18
+
19
+ ```
20
+ pip install git+https://gitea.pglikers.com/ai-program/penjent.git@latest
21
+ ```
22
+
23
+ ## 今後の方針について
24
+
25
+ バージョンの`1.2.0`より責任範囲を明確にするため
26
+ LLMとエージェントの機能を絞りました。
27
+
28
+ * アダプタ関連機能を削除しました。
29
+ * タスク関連機能を削除しました、
30
+ * Agentのステータス管理はセッションクラス(Session)に委任しました。
31
+
32
+ AIエージェントの補助機能については別ライブラリで提供してきます
@@ -0,0 +1,30 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+ [project]
5
+ name = "pengent"
6
+ version = "1.2.1"
7
+ description = "Genaral AI Angent Framework for Python"
8
+ authors = [
9
+ { name = "ryoh Ya", email = "dev.p.ry.yamafuji@gmail.com" },
10
+ { name = "Pengent", email = "ai.pengent@gmail.com" }
11
+ ]
12
+ readme = "README.md"
13
+ license = { text = "MIT" }
14
+ requires-python = ">=3.8"
15
+ dependencies = [
16
+ "requests",
17
+ "openai>=1.71.0",
18
+ "python-dotenv>=1.0.1",
19
+ "pydantic==2.12.4",
20
+ "markdown>=3.7",
21
+ "pdfkit==1.0.0",
22
+ "redis>=7.1.0",
23
+ "sqlalchemy>=2.0.45",
24
+ "mcp==1.10.1"
25
+
26
+ ]
27
+ [tool.setuptools]
28
+ package-dir = { "" = "src" }
29
+ [tool.setuptools.packages.find]
30
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,9 @@
1
+ # basic_agents
2
+ from .agent_base import AgentBase
3
+ from .basic.agent_chat import AgentChat
4
+
5
+
6
+ __all__ = [
7
+ "AgentBase",
8
+ "AgentChat",
9
+ ]