naas-abi-core 1.2.1__tar.gz → 1.4.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 (127) hide show
  1. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/=0.9.13 +1 -1
  2. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/CHANGELOG.md +54 -0
  3. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/PKG-INFO +5 -1
  4. naas_abi_core-1.4.0/assets/logo.png +0 -0
  5. naas_abi_core-1.4.0/naas_abi_core/apps/api/openapi_doc.py +144 -0
  6. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration.py +32 -11
  7. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_ObjectStorageService.py +29 -1
  8. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_SecretService.py +31 -9
  9. naas_abi_core-1.4.0/naas_abi_core/engine/engine_configuration/EngineConfiguration_SecretService_test.py +74 -0
  10. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_TripleStoreService.py +13 -8
  11. naas_abi_core-1.4.0/naas_abi_core/engine/engine_configuration/EngineConfiguration_TripleStoreService_test.py +109 -0
  12. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_VectorStoreService.py +11 -0
  13. naas_abi_core-1.4.0/naas_abi_core/engine/engine_configuration/EngineConfiguration_VectorStoreService_test.py +33 -0
  14. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/SecretPorts.py +5 -0
  15. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/adaptors/secondary/NaasSecret.py +8 -1
  16. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/AWSNeptune.py +19 -3
  17. naas_abi_core-1.2.1/naas_abi_core/utils/OntologyYaml.disabled.py → naas_abi_core-1.4.0/naas_abi_core/utils/OntologyYaml.py +6 -4
  18. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/pyproject.toml +4 -1
  19. naas_abi_core-1.2.1/naas_abi_core/apps/api/openapi_doc.py +0 -307
  20. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/.gitignore +0 -0
  21. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/README.md +0 -0
  22. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/assets/favicon.ico +0 -0
  23. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/__init__.py +0 -0
  24. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/api/api.py +0 -0
  25. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/api/api_test.py +0 -0
  26. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/mcp/Dockerfile.mcp +0 -0
  27. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/mcp/mcp_server.py +0 -0
  28. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/mcp/mcp_server_test.py +0 -0
  29. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/terminal_agent/main.py +0 -0
  30. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/apps/terminal_agent/terminal_style.py +0 -0
  31. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/Engine.py +0 -0
  32. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/EngineProxy.py +0 -0
  33. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/Engine_test.py +0 -0
  34. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/IEngine.py +0 -0
  35. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/conftest.py +0 -0
  36. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_Deploy.py +0 -0
  37. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_GenericLoader.py +0 -0
  38. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_ObjectStorageService_test.py +0 -0
  39. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/EngineConfiguration_test.py +0 -0
  40. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_configuration/utils/PydanticModelValidator.py +0 -0
  41. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_loaders/EngineModuleLoader.py +0 -0
  42. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_loaders/EngineOntologyLoader.py +0 -0
  43. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/engine/engine_loaders/EngineServiceLoader.py +0 -0
  44. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/integration/__init__.py +0 -0
  45. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/integration/integration.py +0 -0
  46. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/models/Model.py +0 -0
  47. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/models/OpenRouter.py +0 -0
  48. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/models/OpenRouter_test.py +0 -0
  49. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/module/Module.py +0 -0
  50. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/module/ModuleAgentLoader.py +0 -0
  51. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/module/ModuleUtils.py +0 -0
  52. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/modules/templatablesparqlquery/README.md +0 -0
  53. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/modules/templatablesparqlquery/__init__.py +0 -0
  54. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/modules/templatablesparqlquery/ontologies/TemplatableSparqlQueryOntology.ttl +0 -0
  55. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/modules/templatablesparqlquery/workflows/GenericWorkflow.py +0 -0
  56. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/modules/templatablesparqlquery/workflows/TemplatableSparqlQueryLoader.py +0 -0
  57. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/pipeline/__init__.py +0 -0
  58. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/pipeline/pipeline.py +0 -0
  59. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/__init__.py +0 -0
  60. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/Agent.py +0 -0
  61. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/AgentMemory_test.py +0 -0
  62. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/Agent_test.py +0 -0
  63. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/IntentAgent.py +0 -0
  64. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/IntentAgent_test.py +0 -0
  65. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/beta/Embeddings.py +0 -0
  66. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/beta/IntentMapper.py +0 -0
  67. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/beta/LocalModel.py +0 -0
  68. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/beta/VectorStore.py +0 -0
  69. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/test_agent_memory.py +0 -0
  70. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/agent/test_postgres_integration.py +0 -0
  71. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/cache/CacheFactory.py +0 -0
  72. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/cache/CachePort.py +0 -0
  73. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/cache/CacheService.py +0 -0
  74. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/cache/CacheService_test.py +0 -0
  75. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/cache/adapters/secondary/CacheFSAdapter.py +0 -0
  76. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/object_storage/ObjectStorageFactory.py +0 -0
  77. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/object_storage/ObjectStoragePort.py +0 -0
  78. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/object_storage/ObjectStorageService.py +0 -0
  79. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/object_storage/adapters/secondary/ObjectStorageSecondaryAdapterFS.py +0 -0
  80. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/object_storage/adapters/secondary/ObjectStorageSecondaryAdapterNaas.py +0 -0
  81. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/object_storage/adapters/secondary/ObjectStorageSecondaryAdapterS3.py +0 -0
  82. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/ontology/OntologyPorts.py +0 -0
  83. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/ontology/OntologyService.py +0 -0
  84. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/ontology/adaptors/secondary/OntologyService_SecondaryAdaptor_NERPort.py +0 -0
  85. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/Secret.py +0 -0
  86. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/Secret_test.py +0 -0
  87. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/adaptors/secondary/Base64Secret.py +0 -0
  88. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/adaptors/secondary/Base64Secret_test.py +0 -0
  89. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/adaptors/secondary/NaasSecret_test.py +0 -0
  90. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/secret/adaptors/secondary/dotenv_secret_secondaryadaptor.py +0 -0
  91. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/TripleStoreFactory.py +0 -0
  92. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/TripleStorePorts.py +0 -0
  93. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/TripleStoreService.py +0 -0
  94. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/AWSNeptune_test.py +0 -0
  95. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/Oxigraph.py +0 -0
  96. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/Oxigraph_test.py +0 -0
  97. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/TripleStoreService__SecondaryAdaptor__Filesystem.py +0 -0
  98. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/TripleStoreService__SecondaryAdaptor__ObjectStorage.py +0 -0
  99. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/triple_store/adaptors/secondary/base/TripleStoreService__SecondaryAdaptor__FileBase.py +0 -0
  100. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/IVectorStorePort.py +0 -0
  101. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/IVectorStorePort_test.py +0 -0
  102. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/VectorStoreFactory.py +0 -0
  103. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/VectorStoreService.py +0 -0
  104. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/VectorStoreService_test.py +0 -0
  105. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/__init__.py +0 -0
  106. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/adapters/QdrantAdapter.py +0 -0
  107. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/services/vector_store/adapters/QdrantAdapter_test.py +0 -0
  108. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/tests/test_services_imports.py +0 -0
  109. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/Expose.py +0 -0
  110. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/Graph.py +0 -0
  111. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/JSON.py +0 -0
  112. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/LazyLoader.py +0 -0
  113. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/Logger.py +0 -0
  114. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/OntologyReasoner.py +0 -0
  115. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/SPARQL.py +0 -0
  116. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/Storage.py +0 -0
  117. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/StorageUtils.py +0 -0
  118. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/String.py +0 -0
  119. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/Workers.py +0 -0
  120. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/__init__.py +0 -0
  121. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/onto2py/README.md +0 -0
  122. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/onto2py/__init__.py +0 -0
  123. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/onto2py/__main__.py +0 -0
  124. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/onto2py/onto2py.py +0 -0
  125. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/utils/onto2py/tests/ttl2py_test.py +0 -0
  126. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/workflow/__init__.py +0 -0
  127. {naas_abi_core-1.2.1 → naas_abi_core-1.4.0}/naas_abi_core/workflow/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Collecting uv
2
2
  Downloading uv-0.9.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
3
3
  Downloading uv-0.9.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.2 MB)
4
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.2/22.2 MB 352.7 MB/s 0:00:00
4
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.2/22.2 MB 290.7 MB/s 0:00:00
5
5
  Installing collected packages: uv
6
6
  Successfully installed uv-0.9.21
@@ -2,6 +2,60 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v1.4.0 (2026-01-02)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Add default logo api
10
+ ([`0036796`](https://github.com/jupyter-naas/abi/commit/0036796586ac904879f4dd1fa4a40a400bd0e4ef))
11
+
12
+ - Error aws neptune
13
+ ([`76ffc39`](https://github.com/jupyter-naas/abi/commit/76ffc39a0d9408a68d39bf704172c4ff5f5d98c3))
14
+
15
+ - Remove connections from api doc
16
+ ([`4f629bf`](https://github.com/jupyter-naas/abi/commit/4f629bf0df5e3f3df30453f2531879301b05252d))
17
+
18
+ ### Features
19
+
20
+ - Add boto3-stubs
21
+ ([`47dccd1`](https://github.com/jupyter-naas/abi/commit/47dccd144ab4811c1c4e481287b39026d07bb7ec))
22
+
23
+ ### Refactoring
24
+
25
+ - Move workflows ontology yaml to naas module
26
+ ([`b4e8e9f`](https://github.com/jupyter-naas/abi/commit/b4e8e9fd738a338c462c9df2525e043cfdf5095d))
27
+
28
+
29
+ ## v1.3.0 (2026-01-02)
30
+
31
+ ### Bug Fixes
32
+
33
+ - Get env value from .env if not in env
34
+ ([`b984252`](https://github.com/jupyter-naas/abi/commit/b98425297e596142ee39ece11f6542ed713e4d4e))
35
+
36
+ - Improve config first pass loading for secret service
37
+ ([`f598e79`](https://github.com/jupyter-naas/abi/commit/f598e7995e7984a6bbe51e1a7e8a4a34de121968))
38
+
39
+ - Missing f string + display config file name in debug
40
+ ([`17e4bac`](https://github.com/jupyter-naas/abi/commit/17e4bac2541642aa97fe5f59522c6cbc578c60fa))
41
+
42
+ - Remove duplicated logger
43
+ ([`7e9ffb8`](https://github.com/jupyter-naas/abi/commit/7e9ffb81023126fe56c3150aba12e885260956a8))
44
+
45
+ - Update package management & add types-pyyaml
46
+ ([`5a66600`](https://github.com/jupyter-naas/abi/commit/5a666002264744f571015ac45eef3e583b458f40))
47
+
48
+ ### Documentation
49
+
50
+ - Add docstring
51
+ ([`76766b9`](https://github.com/jupyter-naas/abi/commit/76766b9acafee1d0dc5b2ee32057b0c3e5a0ba75))
52
+
53
+ ### Features
54
+
55
+ - Test adaptors dotenv & naas
56
+ ([`d3b7204`](https://github.com/jupyter-naas/abi/commit/d3b7204f663f4ed969446db8475d97197227336b))
57
+
58
+
5
59
  ## v1.2.1 (2025-12-30)
6
60
 
7
61
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naas-abi-core
3
- Version: 1.2.1
3
+ Version: 1.4.0
4
4
  Summary: Abi framework allowing you to build your AI system.
5
5
  Author-email: Maxime Jublou <maxime@naas.ai>, Florent Ravenel <florent@naas.ai>, Jeremy Ravenel <jeremy@naas.ai>
6
6
  Requires-Python: <4,>=3.10
@@ -28,14 +28,18 @@ Requires-Dist: spacy>=3.8.7
28
28
  Requires-Dist: sparqlwrapper>=2.0.0
29
29
  Requires-Dist: sse-starlette<3,>=2.1.3
30
30
  Requires-Dist: starlette>=0.46.2
31
+ Requires-Dist: types-paramiko>=4.0.0.20250822
32
+ Requires-Dist: types-pyyaml>=6.0.12.20250915
31
33
  Requires-Dist: types-tqdm>=4.67.0.20250809
32
34
  Provides-Extra: all
35
+ Requires-Dist: boto3-stubs>=1.42.19; extra == 'all'
33
36
  Requires-Dist: boto3<2,>=1.38.19; extra == 'all'
34
37
  Requires-Dist: langchain-openai>=0.3.35; extra == 'all'
35
38
  Requires-Dist: paramiko<4.0.0,>=3.5.1; extra == 'all'
36
39
  Requires-Dist: qdrant-client>=1.14.3; extra == 'all'
37
40
  Requires-Dist: sshtunnel>=0.4.0; extra == 'all'
38
41
  Provides-Extra: aws
42
+ Requires-Dist: boto3-stubs>=1.42.19; extra == 'aws'
39
43
  Requires-Dist: boto3<2,>=1.38.19; extra == 'aws'
40
44
  Provides-Extra: openrouter
41
45
  Requires-Dist: langchain-openai>=0.3.35; extra == 'openrouter'
Binary file
@@ -0,0 +1,144 @@
1
+ TAGS_METADATA = [
2
+ {
3
+ "name": "Overview",
4
+ "description": """
5
+ ### Project Overview
6
+ The **ABI** (Artificial Business Intelligence) project is a Python-based backend framework designed to serve as the core infrastructure for building an Organizational AI System.
7
+ This system empowers businesses to integrate, manage, and scale AI-driven operations with a focus on ontology, assistant-driven workflows, and analytics.\n
8
+ Designed for flexibility and scalability, ABI provides a customizable framework suitable for organizations aiming to create intelligent, automated systems tailored to their needs.
9
+
10
+ ### API Overview
11
+ The ABI API allows users and applications to interact with ABI's capabilities for business process automation and intelligence.\n
12
+ This document describes the current version of the ABI API, which provides access to agents, pipelines, workflows, integrations, ontology management and analytics features.
13
+ """,
14
+ },
15
+ {
16
+ "name": "Authentication",
17
+ "description": """
18
+ Authentication uses a Bearer token that can be provided either in the Authorization header (e.g. 'Authorization: Bearer `<token>`') or as a query parameter (e.g. '?token=`<token>`').
19
+ The token must match the `ABI_API_KEY` environment variable.
20
+ Contact your administrator to get the token.
21
+
22
+ *Authentication with Authorization header:*
23
+
24
+ ```python
25
+ import requests
26
+
27
+ url = "https://<your-registry-name>.default.space.naas.ai/agents/abi/completion"
28
+
29
+ headers = {
30
+ "Authorization": f"Bearer {token}"
31
+ }
32
+
33
+ response = requests.post(url, headers=headers)
34
+ print(response.json())
35
+ ```
36
+
37
+ *Authentication with query parameter:*
38
+
39
+ ```python
40
+ import requests
41
+
42
+ url = "https://<your-registry-name>.default.space.naas.ai/agents/abi/completion?token=<token>"
43
+
44
+ response = requests.post(url)
45
+ print(response.json())
46
+ ```
47
+ """,
48
+ },
49
+ {
50
+ "name": "Agents",
51
+ "description": """
52
+ API endpoints for interacting with ABI's agents.
53
+
54
+ ### Core Agents:
55
+ - Abi: Manages and coordinates other agents
56
+ - Ontology: Manages and coordinates other agents
57
+ - Naas: Manages and coordinates other agents
58
+ - Support: Provides help and guidance for using ABI
59
+
60
+ ### Marketplace Agents:
61
+ - Custom agents with deep expertise in specific domains
62
+ - Can be configured and trained for specialized tasks
63
+ - Extensible through custom tools and knowledge bases
64
+
65
+ Each agent can be accessed through dedicated endpoints that allow:
66
+ - Completion requests for generating responses
67
+ - Chat interactions for ongoing conversations
68
+ - Tool execution for specific tasks
69
+ - Configuration updates for customizing behavior
70
+
71
+ Agents leverage various tools including integrations, pipelines and workflows to accomplish tasks. They can be extended with custom tools and knowledge to enhance their capabilities.
72
+
73
+ """,
74
+ },
75
+ {
76
+ "name": "Pipelines",
77
+ "description": """
78
+ API endpoints for interacting with ABI's pipelines.
79
+ """,
80
+ },
81
+ {
82
+ "name": "Workflows",
83
+ "description": """
84
+ API endpoints for interacting with ABI's workflows.
85
+ """,
86
+ },
87
+ ]
88
+
89
+ API_LANDING_HTML = """
90
+ <!DOCTYPE html>
91
+ <html>
92
+ <head>
93
+ <title>[TITLE]</title>
94
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
95
+ <style>
96
+ body {
97
+ font-family: Arial, sans-serif;
98
+ display: flex;
99
+ flex-direction: column;
100
+ align-items: center;
101
+ justify-content: center;
102
+ height: 100vh;
103
+ margin: 0;
104
+ background-color: #000000;
105
+ color: white;
106
+ }
107
+ .logo {
108
+ width: 200px;
109
+ margin-bottom: 20px;
110
+ }
111
+ h1 {
112
+ font-size: 48px;
113
+ margin-bottom: 40px;
114
+ }
115
+ .buttons {
116
+ display: flex;
117
+ gap: 20px;
118
+ }
119
+ a {
120
+ padding: 12px 24px;
121
+ font-size: 18px;
122
+ border: none;
123
+ border-radius: 4px;
124
+ cursor: pointer;
125
+ text-decoration: none;
126
+ color: white;
127
+ background-color: #007bff;
128
+ transition: background-color 0.2s;
129
+ }
130
+ a:hover {
131
+ background-color: #0056b3;
132
+ }
133
+ </style>
134
+ </head>
135
+ <body>
136
+ <img src="/static/[LOGO_NAME]" alt="Logo" class="logo">
137
+ <h1>Welcome to [TITLE]!</h1>
138
+ <p>[TITLE] is a tool that allows you to interact with ABI's capabilities for business process automation and intelligence.</p>
139
+ <div class="buttons">
140
+ <a href="/redoc">Go to Documentation</a>
141
+ </div>
142
+ </body>
143
+ </html>
144
+ """
@@ -129,7 +129,22 @@ class EngineConfiguration(BaseModel):
129
129
 
130
130
  def __getattr__(self, name):
131
131
  if self.secret_service is None:
132
- return 0
132
+ # This rule is used only when doing the first pass configuration to load the secret service.
133
+
134
+ # First priority is to check the environment variables.
135
+ if name in os.environ:
136
+ return os.environ.get(name)
137
+ else:
138
+ # If the environment variable is not found, we check the .env file. ONLY FOR THE FIRST PASS CONFIGURATION.
139
+ from dotenv import dotenv_values
140
+
141
+ secrets = dotenv_values()
142
+ if name in secrets:
143
+ return secrets.get(name)
144
+ else:
145
+ return f"Secret '{name}' not found while loading the secret service. Please provide it via the environment variables or .env file."
146
+ elif name in os.environ:
147
+ return os.environ.get(name)
133
148
  secret = self.secret_service.get(name)
134
149
  if secret is None:
135
150
  if not sys.stdin.isatty():
@@ -144,9 +159,6 @@ class EngineConfiguration(BaseModel):
144
159
  return value
145
160
  return secret
146
161
 
147
- def get(self, key, default=None):
148
- return 0
149
-
150
162
  first_pass_data = yaml.safe_load(
151
163
  StringIO(Template(yaml_content).render(secret=SecretServiceWrapper()))
152
164
  )
@@ -157,13 +169,11 @@ class EngineConfiguration(BaseModel):
157
169
  # Here we can now template the yaml by using `yaml_content` and the secret service.
158
170
  # Using Jinja2 template engine.
159
171
 
160
- logger.debug("Yaml content: {yaml_content}")
172
+ logger.debug(f"Yaml content: {yaml_content}")
161
173
 
162
174
  template = Template(yaml_content)
163
175
  templated_yaml = template.render(secret=SecretServiceWrapper(secret_service))
164
176
 
165
- logger.debug(f"Templated yaml: {templated_yaml}")
166
-
167
177
  data = yaml.safe_load(StringIO(templated_yaml))
168
178
 
169
179
  logger.debug(f"Data: {data}")
@@ -178,17 +188,28 @@ class EngineConfiguration(BaseModel):
178
188
  if configuration_yaml is not None:
179
189
  return cls.from_yaml_content(configuration_yaml)
180
190
 
181
- logger.debug(f"Loading configuration from {os.getenv('ENV')}")
191
+ # Get ENV value
192
+ from dotenv import dotenv_values
193
+
194
+ env = os.getenv("ENV")
195
+ if not env:
196
+ env = dotenv_values().get("ENV")
182
197
 
183
- if os.path.exists(f"config.{os.getenv('ENV')}.yaml"):
184
- return cls.from_yaml(f"config.{os.getenv('ENV')}.yaml")
198
+ # First we check the environment variable.
199
+ if os.path.exists(f"config.{env}.yaml"):
200
+ config_file = f"config.{env}.yaml"
201
+ # If the config.{env}.yaml file is not found, we check the config.yaml file.
185
202
  elif os.path.exists("config.yaml"):
186
- return cls.from_yaml("config.yaml")
203
+ config_file = "config.yaml"
187
204
  else:
188
205
  raise FileNotFoundError(
189
206
  "Configuration file not found. Please create a config.yaml file or config.{env}.yaml file."
190
207
  )
191
208
 
209
+ logger.debug(f"Loading configuration from {config_file}")
210
+
211
+ return cls.from_yaml(config_file)
212
+
192
213
 
193
214
  if __name__ == "__main__":
194
215
  config = EngineConfiguration.load_configuration()
@@ -17,18 +17,46 @@ from typing_extensions import Self
17
17
 
18
18
 
19
19
  class ObjectStorageAdapterFSConfiguration(BaseModel):
20
+ """Object storage adapter filesystem configuration.
21
+
22
+ object_storage_adapter:
23
+ adapter: "fs"
24
+ config:
25
+ base_path: "storage/datastore"
26
+ """
20
27
  base_path: str
21
28
 
22
29
 
23
30
  class ObjectStorageAdapterS3Configuration(BaseModel):
31
+ """Object storage adapter S3 configuration.
32
+
33
+ object_storage_adapter:
34
+ adapter: "s3"
35
+ config:
36
+ bucket_name: "my-bucket"
37
+ base_prefix: "my-prefix"
38
+ access_key_id: "{{ secret.AWS_ACCESS_KEY_ID }}"
39
+ secret_access_key: "{{ secret.AWS_SECRET_ACCESS_KEY }}"
40
+ session_token: "{{ secret.AWS_SESSION_TOKEN }}"
41
+ """
24
42
  bucket_name: str
43
+ base_prefix: str
25
44
  access_key_id: str
26
45
  secret_access_key: str
27
- base_prefix: str
28
46
  session_token: str | None = None
29
47
 
30
48
 
31
49
  class ObjectStorageAdapterNaasConfiguration(BaseModel):
50
+ """Object storage adapter Naas configuration.
51
+
52
+ object_storage_adapter:
53
+ adapter: "naas"
54
+ config:
55
+ naas_api_key: "{{ secret.NAAS_API_KEY }}"
56
+ workspace_id: "{{ secret.WORKSPACE_ID }}"
57
+ storage_name: "{{ secret.STORAGE_NAME }}"
58
+ base_prefix: "my-prefix"
59
+ """
32
60
  naas_api_key: str
33
61
  workspace_id: str
34
62
  storage_name: str
@@ -18,7 +18,38 @@ if TYPE_CHECKING:
18
18
  )
19
19
 
20
20
 
21
+ class DotenvSecretConfiguration(BaseModel):
22
+ """Dotenv secret configuration.
23
+
24
+ secret_adapters:
25
+ - adapter: "dotenv"
26
+ config: {}
27
+ """
28
+ pass
29
+
30
+
31
+ class NaasSecretConfiguration(BaseModel):
32
+ """Naas secret configuration.
33
+
34
+ secret_adapters:
35
+ - adapter: "naas"
36
+ config:
37
+ naas_api_key: "{{ secret.NAAS_API_KEY }}"
38
+ naas_api_url: "https://api.naas.ai"
39
+ """
40
+ naas_api_key: str
41
+ naas_api_url: str
42
+
43
+
21
44
  class Base64SecretConfiguration(BaseModel):
45
+ """Base64 secret configuration.
46
+
47
+ secret_adapters:
48
+ - adapter: "base64"
49
+ config:
50
+ secret_adapter: *secret_adapter
51
+ base64_secret_key: "{{ secret.BASE64_SECRET_KEY }}"
52
+ """
22
53
  secret_adapter: "SecretAdapterConfiguration"
23
54
  base64_secret_key: str
24
55
 
@@ -30,15 +61,6 @@ class Base64SecretConfiguration(BaseModel):
30
61
  return Base64Secret(self.secret_adapter.load(), self.base64_secret_key)
31
62
 
32
63
 
33
- class NaasSecretConfiguration(BaseModel):
34
- naas_api_key: str
35
- naas_api_url: str
36
-
37
-
38
- class DotenvSecretConfiguration(BaseModel):
39
- pass
40
-
41
-
42
64
  class SecretAdapterConfiguration(GenericLoader):
43
65
  adapter: Literal["dotenv", "naas", "base64", "custom"]
44
66
  config: (
@@ -0,0 +1,74 @@
1
+ from naas_abi_core.engine.engine_configuration.EngineConfiguration_SecretService import (
2
+ DotenvSecretConfiguration,
3
+ NaasSecretConfiguration,
4
+ SecretAdapterConfiguration,
5
+ SecretServiceConfiguration,
6
+ )
7
+ from naas_abi_core.services.secret.Secret import Secret
8
+ from naas_abi_core.services.secret.SecretPorts import ISecretAdapter
9
+
10
+
11
+ def test_secret_service_configuration():
12
+ from naas_abi_core.services.secret.adaptors.secondary.dotenv_secret_secondaryadaptor import (
13
+ DotenvSecretSecondaryAdaptor,
14
+ )
15
+
16
+ configuration = SecretServiceConfiguration(
17
+ secret_adapters=[
18
+ SecretAdapterConfiguration(
19
+ adapter="dotenv", config=DotenvSecretConfiguration()
20
+ )
21
+ ]
22
+ )
23
+ assert configuration.secret_adapters is not None
24
+ assert len(configuration.secret_adapters) == 1
25
+
26
+ secret_adapter = configuration.secret_adapters[0].load()
27
+
28
+ assert secret_adapter is not None
29
+ assert isinstance(secret_adapter, ISecretAdapter)
30
+ assert isinstance(secret_adapter, DotenvSecretSecondaryAdaptor)
31
+
32
+ secret_service = configuration.load()
33
+
34
+ assert secret_service is not None
35
+ assert isinstance(secret_service, Secret)
36
+
37
+
38
+ def test_secret_service_configuration_naas():
39
+ import os
40
+
41
+ from dotenv import load_dotenv
42
+ from naas_abi_core.services.secret.adaptors.secondary.NaasSecret import (
43
+ NaasSecret,
44
+ )
45
+
46
+ load_dotenv()
47
+
48
+ naas_api_key = os.getenv("NAAS_API_KEY")
49
+ if naas_api_key is None:
50
+ raise ValueError("NAAS_API_KEY is not set")
51
+
52
+ naas_api_url = os.getenv("NAAS_API_URL")
53
+ if naas_api_url is None:
54
+ raise ValueError("NAAS_API_URL is not set")
55
+
56
+ configuration = SecretServiceConfiguration(
57
+ secret_adapters=[
58
+ SecretAdapterConfiguration(
59
+ adapter="naas",
60
+ config=NaasSecretConfiguration(
61
+ naas_api_key=naas_api_key,
62
+ naas_api_url=naas_api_url,
63
+ ),
64
+ )
65
+ ]
66
+ )
67
+ assert configuration.secret_adapters is not None
68
+ assert len(configuration.secret_adapters) == 1
69
+
70
+ secret_adapter = configuration.secret_adapters[0].load()
71
+
72
+ assert secret_adapter is not None
73
+ assert isinstance(secret_adapter, ISecretAdapter)
74
+ assert isinstance(secret_adapter, NaasSecret)
@@ -28,6 +28,7 @@ class OxigraphAdapterConfiguration(BaseModel):
28
28
  oxigraph_url: "http://localhost:7878"
29
29
  timeout: 60
30
30
  """
31
+
31
32
  oxigraph_url: str = "http://localhost:7878"
32
33
  timeout: int = 60
33
34
 
@@ -38,11 +39,12 @@ class AWSNeptuneAdapterConfiguration(BaseModel):
38
39
  triple_store_adapter:
39
40
  adapter: "aws_neptune"
40
41
  config:
41
- aws_region_name: "eu-west-3"
42
+ aws_region_name: "{{ secret.AWS_REGION }}"
42
43
  aws_access_key_id: "{{ secret.AWS_ACCESS_KEY_ID }}"
43
44
  aws_secret_access_key: "{{ secret.AWS_SECRET_ACCESS_KEY }}"
44
- db_instance_identifier: "{{ secret.DB_INSTANCE_IDENTIFIER }}"
45
+ db_instance_identifier: "{{ secret.AWS_NEPTUNE_DB_INSTANCE_IDENTIFIER }}"
45
46
  """
47
+
46
48
  aws_region_name: str
47
49
  aws_access_key_id: str
48
50
  aws_secret_access_key: str
@@ -55,15 +57,16 @@ class AWSNeptuneSSHTunnelAdapterConfiguration(AWSNeptuneAdapterConfiguration):
55
57
  triple_store_adapter:
56
58
  adapter: "aws_neptune_sshtunnel"
57
59
  config:
58
- aws_region_name: "eu-west-3"
60
+ aws_region_name: "{{ secret.AWS_REGION }}"
59
61
  aws_access_key_id: "{{ secret.AWS_ACCESS_KEY_ID }}"
60
62
  aws_secret_access_key: "{{ secret.AWS_SECRET_ACCESS_KEY }}"
61
- db_instance_identifier: "{{ secret.DB_INSTANCE_IDENTIFIER }}"
62
- bastion_host: "bastion.example.com"
63
- bastion_port: 22
64
- bastion_user: "ubuntu"
65
- bastion_private_key: "{{ secret.BASTION_PRIVATE_KEY }}"
63
+ db_instance_identifier: "{{ secret.AWS_NEPTUNE_DB_INSTANCE_IDENTIFIER }}"
64
+ bastion_host: "{{ secret.AWS_BASTION_HOST }}"
65
+ bastion_port: "{{ secret.AWS_BASTION_PORT }}"
66
+ bastion_user: "{{ secret.AWS_BASTION_USER }}"
67
+ bastion_private_key: "{{ secret.AWS_BASTION_PRIVATE_KEY }}"
66
68
  """
69
+
67
70
  bastion_host: str
68
71
  bastion_port: int
69
72
  bastion_user: str
@@ -79,6 +82,7 @@ class TripleStoreAdapterFilesystemConfiguration(BaseModel):
79
82
  store_path: "storage/triplestore"
80
83
  triples_path: "triples"
81
84
  """
85
+
82
86
  store_path: str
83
87
  triples_path: str = "triples"
84
88
 
@@ -92,6 +96,7 @@ class TripleStoreAdapterObjectStorageConfiguration(BaseModel):
92
96
  object_storage_service: *object_storage_service
93
97
  triples_prefix: "triples"
94
98
  """
99
+
95
100
  object_storage_service: ObjectStorageServiceConfiguration
96
101
  triples_prefix: str = "triples"
97
102
 
@@ -0,0 +1,109 @@
1
+ from naas_abi_core.engine.engine_configuration.EngineConfiguration_TripleStoreService import (
2
+ AWSNeptuneSSHTunnelAdapterConfiguration,
3
+ OxigraphAdapterConfiguration,
4
+ TripleStoreAdapterConfiguration,
5
+ TripleStoreAdapterFilesystemConfiguration,
6
+ TripleStoreServiceConfiguration,
7
+ )
8
+ from naas_abi_core.services.triple_store.TripleStorePorts import ITripleStorePort
9
+ from naas_abi_core.services.triple_store.TripleStoreService import TripleStoreService
10
+
11
+
12
+ def test_triple_store_service_configuration():
13
+ from naas_abi_core.services.triple_store.adaptors.secondary.TripleStoreService__SecondaryAdaptor__Filesystem import (
14
+ TripleStoreService__SecondaryAdaptor__Filesystem,
15
+ )
16
+
17
+ configuration = TripleStoreServiceConfiguration(
18
+ triple_store_adapter=TripleStoreAdapterConfiguration(
19
+ adapter="fs",
20
+ config=TripleStoreAdapterFilesystemConfiguration(
21
+ store_path="storage/triplestore/test", triples_path="triples"
22
+ ),
23
+ )
24
+ )
25
+ assert configuration.triple_store_adapter is not None
26
+
27
+ triple_store_adapter = configuration.triple_store_adapter.load()
28
+
29
+ assert triple_store_adapter is not None
30
+ assert isinstance(triple_store_adapter, ITripleStorePort)
31
+ assert isinstance(
32
+ triple_store_adapter, TripleStoreService__SecondaryAdaptor__Filesystem
33
+ )
34
+
35
+ triple_store_service = configuration.load()
36
+
37
+ assert triple_store_service is not None
38
+ assert isinstance(triple_store_service, TripleStoreService)
39
+
40
+
41
+ def test_triple_store_service_configuration_naas():
42
+ from naas_abi_core.services.triple_store.adaptors.secondary.Oxigraph import (
43
+ Oxigraph,
44
+ )
45
+
46
+ configuration = TripleStoreServiceConfiguration(
47
+ triple_store_adapter=TripleStoreAdapterConfiguration(
48
+ adapter="oxigraph",
49
+ config=OxigraphAdapterConfiguration(
50
+ oxigraph_url="http://localhost:7878",
51
+ timeout=120,
52
+ ),
53
+ )
54
+ )
55
+ assert configuration.triple_store_adapter is not None
56
+
57
+ triple_store_adapter = configuration.triple_store_adapter.load()
58
+
59
+ assert triple_store_adapter is not None
60
+ assert isinstance(triple_store_adapter, ITripleStorePort)
61
+ assert isinstance(triple_store_adapter, Oxigraph)
62
+
63
+ triple_store_service = configuration.load()
64
+
65
+ assert triple_store_service is not None
66
+ assert isinstance(triple_store_service, TripleStoreService)
67
+
68
+
69
+ def test_triple_store_service_configuration_aws_neptune_sshtunnel():
70
+ import os
71
+
72
+ from dotenv import load_dotenv
73
+
74
+ load_dotenv()
75
+
76
+ from naas_abi_core.services.triple_store.adaptors.secondary.AWSNeptune import (
77
+ AWSNeptuneSSHTunnel,
78
+ )
79
+
80
+ configuration = TripleStoreServiceConfiguration(
81
+ triple_store_adapter=TripleStoreAdapterConfiguration(
82
+ adapter="aws_neptune_sshtunnel",
83
+ config=AWSNeptuneSSHTunnelAdapterConfiguration(
84
+ aws_region_name=os.environ.get("AWS_REGION"),
85
+ aws_access_key_id=os.environ.get("AWS_ACCESS_KEY_ID"),
86
+ aws_secret_access_key=os.environ.get("AWS_SECRET_ACCESS_KEY"),
87
+ db_instance_identifier=os.environ.get(
88
+ "AWS_NEPTUNE_DB_INSTANCE_IDENTIFIER"
89
+ ),
90
+ bastion_host=os.environ.get("AWS_BASTION_HOST"),
91
+ bastion_port=int(os.environ.get("AWS_BASTION_PORT")),
92
+ bastion_user=os.environ.get("AWS_BASTION_USER"),
93
+ bastion_private_key=os.environ.get("AWS_BASTION_PRIVATE_KEY"),
94
+ ),
95
+ ),
96
+ )
97
+
98
+ assert configuration.triple_store_adapter is not None
99
+
100
+ triple_store_adapter = configuration.triple_store_adapter.load()
101
+
102
+ assert triple_store_adapter is not None
103
+ assert isinstance(triple_store_adapter, ITripleStorePort)
104
+ assert isinstance(triple_store_adapter, AWSNeptuneSSHTunnel)
105
+
106
+ triple_store_service = configuration.load()
107
+
108
+ assert triple_store_service is not None
109
+ assert isinstance(triple_store_service, TripleStoreService)