albusos 0.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 (247) hide show
  1. albusos-0.4.0/PKG-INFO +341 -0
  2. albusos-0.4.0/README.md +312 -0
  3. albusos-0.4.0/pyproject.toml +173 -0
  4. albusos-0.4.0/src/agents/__init__.py +38 -0
  5. albusos-0.4.0/src/agents/registry.py +175 -0
  6. albusos-0.4.0/src/albus/__init__.py +15 -0
  7. albusos-0.4.0/src/albus/application/agents/__init__.py +9 -0
  8. albusos-0.4.0/src/albus/application/agents/service.py +734 -0
  9. albusos-0.4.0/src/albus/application/pathways/__init__.py +25 -0
  10. albusos-0.4.0/src/albus/application/pathways/service.py +1216 -0
  11. albusos-0.4.0/src/albus/application/ports/__init__.py +32 -0
  12. albusos-0.4.0/src/albus/application/ports/runtime_port.py +60 -0
  13. albusos-0.4.0/src/albus/application/ports/thread_repository.py +50 -0
  14. albusos-0.4.0/src/albus/application/runtime.py +370 -0
  15. albusos-0.4.0/src/albus/application/services/__init__.py +8 -0
  16. albusos-0.4.0/src/albus/application/services/context.py +284 -0
  17. albusos-0.4.0/src/albus/application/state_machine/__init__.py +24 -0
  18. albusos-0.4.0/src/albus/application/state_machine/builtin.py +113 -0
  19. albusos-0.4.0/src/albus/application/state_machine/controller.py +414 -0
  20. albusos-0.4.0/src/albus/domain/runs/state_machine.py +312 -0
  21. albusos-0.4.0/src/albus/domain/world/thread.py +108 -0
  22. albusos-0.4.0/src/albus/infrastructure/config.py +272 -0
  23. albusos-0.4.0/src/albus/infrastructure/deployment.py +510 -0
  24. albusos-0.4.0/src/albus/infrastructure/errors.py +176 -0
  25. albusos-0.4.0/src/albus/infrastructure/middleware.py +171 -0
  26. albusos-0.4.0/src/albus/infrastructure/observability/__init__.py +69 -0
  27. albusos-0.4.0/src/albus/infrastructure/observability/debug.py +298 -0
  28. albusos-0.4.0/src/albus/infrastructure/observability/emitter.py +94 -0
  29. albusos-0.4.0/src/albus/infrastructure/observability/events.py +280 -0
  30. albusos-0.4.0/src/albus/infrastructure/observability/logging_config.py +96 -0
  31. albusos-0.4.0/src/albus/infrastructure/observability/pathway_vm_bridge.py +350 -0
  32. albusos-0.4.0/src/albus/infrastructure/observability/run_recorder.py +499 -0
  33. albusos-0.4.0/src/albus/infrastructure/observability/spans.py +58 -0
  34. albusos-0.4.0/src/albus/infrastructure/repositories/__init__.py +11 -0
  35. albusos-0.4.0/src/albus/infrastructure/repositories/state_machine_repository.py +129 -0
  36. albusos-0.4.0/src/albus/infrastructure/repositories/thread_repository.py +154 -0
  37. albusos-0.4.0/src/albus/sdk.py +215 -0
  38. albusos-0.4.0/src/albus/transport/__init__.py +11 -0
  39. albusos-0.4.0/src/albus/transport/cli.py +635 -0
  40. albusos-0.4.0/src/albus/transport/handlers/__init__.py +4 -0
  41. albusos-0.4.0/src/albus/transport/handlers/agents.py +325 -0
  42. albusos-0.4.0/src/albus/transport/handlers/docs.py +51 -0
  43. albusos-0.4.0/src/albus/transport/handlers/infrastructure.py +469 -0
  44. albusos-0.4.0/src/albus/transport/handlers/packs.py +196 -0
  45. albusos-0.4.0/src/albus/transport/handlers/pathways.py +1111 -0
  46. albusos-0.4.0/src/albus/transport/handlers/runs.py +529 -0
  47. albusos-0.4.0/src/albus/transport/handlers/threads.py +55 -0
  48. albusos-0.4.0/src/albus/transport/handlers/tools.py +111 -0
  49. albusos-0.4.0/src/albus/transport/handlers/webhooks.py +43 -0
  50. albusos-0.4.0/src/albus/transport/handlers/websocket.py +295 -0
  51. albusos-0.4.0/src/albus/transport/http.py +58 -0
  52. albusos-0.4.0/src/albus/transport/openapi_spec.py +333 -0
  53. albusos-0.4.0/src/albus/transport/routes.py +208 -0
  54. albusos-0.4.0/src/albus/transport/server.py +565 -0
  55. albusos-0.4.0/src/albus/transport/studio.py +239 -0
  56. albusos-0.4.0/src/albus/transport/utils.py +78 -0
  57. albusos-0.4.0/src/integrations/__init__.py +20 -0
  58. albusos-0.4.0/src/packs/__init__.py +22 -0
  59. albusos-0.4.0/src/packs/image_narrator/__init__.py +20 -0
  60. albusos-0.4.0/src/packs/image_narrator/pack.py +86 -0
  61. albusos-0.4.0/src/packs/registry.py +189 -0
  62. albusos-0.4.0/src/packs/voice_assistant/__init__.py +21 -0
  63. albusos-0.4.0/src/packs/voice_assistant/pack.py +136 -0
  64. albusos-0.4.0/src/pathway_engine/__init__.py +268 -0
  65. albusos-0.4.0/src/pathway_engine/application/api.py +33 -0
  66. albusos-0.4.0/src/pathway_engine/application/dispatchers/__init__.py +13 -0
  67. albusos-0.4.0/src/pathway_engine/application/dispatchers/action_dispatcher.py +342 -0
  68. albusos-0.4.0/src/pathway_engine/application/host_adapter.py +59 -0
  69. albusos-0.4.0/src/pathway_engine/application/kernel/__init__.py +13 -0
  70. albusos-0.4.0/src/pathway_engine/application/kernel/vm.py +1171 -0
  71. albusos-0.4.0/src/pathway_engine/application/ports/__init__.py +32 -0
  72. albusos-0.4.0/src/pathway_engine/application/ports/contracts/__init__.py +40 -0
  73. albusos-0.4.0/src/pathway_engine/application/ports/contracts/errors.py +54 -0
  74. albusos-0.4.0/src/pathway_engine/application/ports/contracts/knowledge.py +47 -0
  75. albusos-0.4.0/src/pathway_engine/application/ports/contracts/policy_profiles.py +54 -0
  76. albusos-0.4.0/src/pathway_engine/application/ports/contracts/tool_policy.py +67 -0
  77. albusos-0.4.0/src/pathway_engine/application/ports/mcp.py +40 -0
  78. albusos-0.4.0/src/pathway_engine/application/ports/runtime.py +190 -0
  79. albusos-0.4.0/src/pathway_engine/application/ports/tool_registry.py +209 -0
  80. albusos-0.4.0/src/pathway_engine/application/triggers/__init__.py +13 -0
  81. albusos-0.4.0/src/pathway_engine/application/triggers/trigger_manager.py +691 -0
  82. albusos-0.4.0/src/pathway_engine/application/validation.py +640 -0
  83. albusos-0.4.0/src/pathway_engine/domain/agent/__init__.py +63 -0
  84. albusos-0.4.0/src/pathway_engine/domain/agent/builder.py +197 -0
  85. albusos-0.4.0/src/pathway_engine/domain/agent/capabilities.py +89 -0
  86. albusos-0.4.0/src/pathway_engine/domain/agent/cognitive.py +230 -0
  87. albusos-0.4.0/src/pathway_engine/domain/agent/core.py +394 -0
  88. albusos-0.4.0/src/pathway_engine/domain/agent/memory.py +48 -0
  89. albusos-0.4.0/src/pathway_engine/domain/agent/skill.py +343 -0
  90. albusos-0.4.0/src/pathway_engine/domain/agent/state.py +45 -0
  91. albusos-0.4.0/src/pathway_engine/domain/common/__init__.py +93 -0
  92. albusos-0.4.0/src/pathway_engine/domain/common/attachments/__init__.py +17 -0
  93. albusos-0.4.0/src/pathway_engine/domain/common/attachments/models.py +75 -0
  94. albusos-0.4.0/src/pathway_engine/domain/common/errors.py +10 -0
  95. albusos-0.4.0/src/pathway_engine/domain/common/paths.py +116 -0
  96. albusos-0.4.0/src/pathway_engine/domain/common/validation_dto.py +36 -0
  97. albusos-0.4.0/src/pathway_engine/domain/common/versioning.py +6 -0
  98. albusos-0.4.0/src/pathway_engine/domain/context.py +98 -0
  99. albusos-0.4.0/src/pathway_engine/domain/event_bus.py +62 -0
  100. albusos-0.4.0/src/pathway_engine/domain/expressions/__init__.py +44 -0
  101. albusos-0.4.0/src/pathway_engine/domain/model_routing.py +71 -0
  102. albusos-0.4.0/src/pathway_engine/domain/models/__init__.py +8 -0
  103. albusos-0.4.0/src/pathway_engine/domain/models/agent.py +56 -0
  104. albusos-0.4.0/src/pathway_engine/domain/models/code.py +31 -0
  105. albusos-0.4.0/src/pathway_engine/domain/models/context.py +90 -0
  106. albusos-0.4.0/src/pathway_engine/domain/models/generic.py +24 -0
  107. albusos-0.4.0/src/pathway_engine/domain/models/llm.py +32 -0
  108. albusos-0.4.0/src/pathway_engine/domain/models/memory_kv.py +77 -0
  109. albusos-0.4.0/src/pathway_engine/domain/models/router.py +29 -0
  110. albusos-0.4.0/src/pathway_engine/domain/models/speech.py +115 -0
  111. albusos-0.4.0/src/pathway_engine/domain/models/tool.py +62 -0
  112. albusos-0.4.0/src/pathway_engine/domain/models/tool_batch.py +26 -0
  113. albusos-0.4.0/src/pathway_engine/domain/models/tool_calling_llm.py +32 -0
  114. albusos-0.4.0/src/pathway_engine/domain/models/transform.py +28 -0
  115. albusos-0.4.0/src/pathway_engine/domain/models/validation.py +29 -0
  116. albusos-0.4.0/src/pathway_engine/domain/models/vector_memory.py +70 -0
  117. albusos-0.4.0/src/pathway_engine/domain/models/vision.py +168 -0
  118. albusos-0.4.0/src/pathway_engine/domain/nodes/__init__.py +131 -0
  119. albusos-0.4.0/src/pathway_engine/domain/nodes/action.py +240 -0
  120. albusos-0.4.0/src/pathway_engine/domain/nodes/agent_loop.py +858 -0
  121. albusos-0.4.0/src/pathway_engine/domain/nodes/base.py +181 -0
  122. albusos-0.4.0/src/pathway_engine/domain/nodes/composition.py +621 -0
  123. albusos-0.4.0/src/pathway_engine/domain/nodes/core.py +867 -0
  124. albusos-0.4.0/src/pathway_engine/domain/nodes/execution.py +84 -0
  125. albusos-0.4.0/src/pathway_engine/domain/nodes/registry.py +953 -0
  126. albusos-0.4.0/src/pathway_engine/domain/nodes/speech.py +162 -0
  127. albusos-0.4.0/src/pathway_engine/domain/nodes/streaming.py +259 -0
  128. albusos-0.4.0/src/pathway_engine/domain/nodes/tool_calling.py +554 -0
  129. albusos-0.4.0/src/pathway_engine/domain/nodes/vision.py +187 -0
  130. albusos-0.4.0/src/pathway_engine/domain/pack.py +551 -0
  131. albusos-0.4.0/src/pathway_engine/domain/pathway.py +376 -0
  132. albusos-0.4.0/src/pathway_engine/domain/schemas/__init__.py +68 -0
  133. albusos-0.4.0/src/pathway_engine/domain/schemas/context.py +42 -0
  134. albusos-0.4.0/src/pathway_engine/domain/schemas/learning.py +285 -0
  135. albusos-0.4.0/src/pathway_engine/domain/schemas/learning_models.py +257 -0
  136. albusos-0.4.0/src/pathway_engine/domain/schemas/signature.py +170 -0
  137. albusos-0.4.0/src/pathway_engine/domain/services.py +111 -0
  138. albusos-0.4.0/src/pathway_engine/domain/streaming/__init__.py +48 -0
  139. albusos-0.4.0/src/pathway_engine/domain/streaming/event_bus.py +69 -0
  140. albusos-0.4.0/src/pathway_engine/domain/streaming/registry.py +48 -0
  141. albusos-0.4.0/src/pathway_engine/domain/streaming/timer.py +52 -0
  142. albusos-0.4.0/src/pathway_engine/domain/streaming/webhook.py +61 -0
  143. albusos-0.4.0/src/pathway_engine/domain/trigger_context.py +308 -0
  144. albusos-0.4.0/src/pathway_engine/infrastructure/adapters/__init__.py +9 -0
  145. albusos-0.4.0/src/pathway_engine/infrastructure/adapters/runtime_bridge.py +201 -0
  146. albusos-0.4.0/src/pathway_engine/infrastructure/adapters/tool_registry.py +245 -0
  147. albusos-0.4.0/src/pathway_engine/infrastructure/llm/__init__.py +53 -0
  148. albusos-0.4.0/src/pathway_engine/infrastructure/llm/attachments.py +43 -0
  149. albusos-0.4.0/src/pathway_engine/infrastructure/llm/config.py +148 -0
  150. albusos-0.4.0/src/pathway_engine/infrastructure/llm/enums.py +16 -0
  151. albusos-0.4.0/src/pathway_engine/infrastructure/llm/function_capabilities.py +44 -0
  152. albusos-0.4.0/src/pathway_engine/infrastructure/llm/policy.py +43 -0
  153. albusos-0.4.0/src/pathway_engine/infrastructure/llm/request.py +87 -0
  154. albusos-0.4.0/src/pathway_engine/infrastructure/llm/schema_validate.py +86 -0
  155. albusos-0.4.0/src/pathway_engine/infrastructure/llm/tools.py +188 -0
  156. albusos-0.4.0/src/pathway_engine/infrastructure/mcp/__init__.py +49 -0
  157. albusos-0.4.0/src/pathway_engine/infrastructure/mcp/client.py +451 -0
  158. albusos-0.4.0/src/pathway_engine/infrastructure/mcp/sse_client.py +383 -0
  159. albusos-0.4.0/src/pathway_engine/infrastructure/sandbox/__init__.py +9 -0
  160. albusos-0.4.0/src/pathway_engine/infrastructure/sandbox/python_runner.py +451 -0
  161. albusos-0.4.0/src/pathway_engine/infrastructure/tools/__init__.py +11 -0
  162. albusos-0.4.0/src/pathway_engine/infrastructure/tools/audit.py +83 -0
  163. albusos-0.4.0/src/pathway_engine/infrastructure/tools/builtins.py +31 -0
  164. albusos-0.4.0/src/pathway_engine/infrastructure/tools/policy_tool_resolver.py +303 -0
  165. albusos-0.4.0/src/pathway_engine/sdk.py +125 -0
  166. albusos-0.4.0/src/pathway_engine/transport/__init__.py +1 -0
  167. albusos-0.4.0/src/pathway_engine/transport/cli.py +236 -0
  168. albusos-0.4.0/src/persistence/__init__.py +20 -0
  169. albusos-0.4.0/src/persistence/application/ports/__init__.py +16 -0
  170. albusos-0.4.0/src/persistence/application/ports/studio.py +90 -0
  171. albusos-0.4.0/src/persistence/application/ports/studio_store.py +21 -0
  172. albusos-0.4.0/src/persistence/application/ports/world_store.py +109 -0
  173. albusos-0.4.0/src/persistence/application/services/__init__.py +11 -0
  174. albusos-0.4.0/src/persistence/application/services/doc_crud.py +165 -0
  175. albusos-0.4.0/src/persistence/application/services/editor/__init__.py +305 -0
  176. albusos-0.4.0/src/persistence/application/services/editor/ops.py +454 -0
  177. albusos-0.4.0/src/persistence/application/services/folder_crud.py +54 -0
  178. albusos-0.4.0/src/persistence/application/services/invariants.py +199 -0
  179. albusos-0.4.0/src/persistence/application/services/node_mutations.py +110 -0
  180. albusos-0.4.0/src/persistence/application/services/project_crud.py +66 -0
  181. albusos-0.4.0/src/persistence/application/services/queries.py +53 -0
  182. albusos-0.4.0/src/persistence/application/services/run_events_crud.py +61 -0
  183. albusos-0.4.0/src/persistence/application/services/service.py +34 -0
  184. albusos-0.4.0/src/persistence/application/services/types.py +55 -0
  185. albusos-0.4.0/src/persistence/application/services/workspace_crud.py +25 -0
  186. albusos-0.4.0/src/persistence/domain/__init__.py +9 -0
  187. albusos-0.4.0/src/persistence/domain/contracts/__init__.py +52 -0
  188. albusos-0.4.0/src/persistence/domain/contracts/studio.py +222 -0
  189. albusos-0.4.0/src/persistence/domain/errors.py +55 -0
  190. albusos-0.4.0/src/persistence/domain/invariants.py +135 -0
  191. albusos-0.4.0/src/persistence/domain/pathwaydoc.py +205 -0
  192. albusos-0.4.0/src/persistence/domain/project_seed.py +111 -0
  193. albusos-0.4.0/src/persistence/domain/tree.py +57 -0
  194. albusos-0.4.0/src/persistence/domain/workspace/__init__.py +45 -0
  195. albusos-0.4.0/src/persistence/domain/workspace/environment.py +250 -0
  196. albusos-0.4.0/src/persistence/domain/workspace/manifest.py +98 -0
  197. albusos-0.4.0/src/persistence/infrastructure/storage/__init__.py +3 -0
  198. albusos-0.4.0/src/persistence/infrastructure/storage/asset_store.py +58 -0
  199. albusos-0.4.0/src/persistence/infrastructure/storage/errors.py +11 -0
  200. albusos-0.4.0/src/persistence/infrastructure/storage/file/__init__.py +6 -0
  201. albusos-0.4.0/src/persistence/infrastructure/storage/file/documents.py +148 -0
  202. albusos-0.4.0/src/persistence/infrastructure/storage/file/folders.py +135 -0
  203. albusos-0.4.0/src/persistence/infrastructure/storage/file/io.py +47 -0
  204. albusos-0.4.0/src/persistence/infrastructure/storage/file/patches.py +85 -0
  205. albusos-0.4.0/src/persistence/infrastructure/storage/file/projects.py +85 -0
  206. albusos-0.4.0/src/persistence/infrastructure/storage/file/revisions.py +72 -0
  207. albusos-0.4.0/src/persistence/infrastructure/storage/file/run_events.py +130 -0
  208. albusos-0.4.0/src/persistence/infrastructure/storage/file/state.py +80 -0
  209. albusos-0.4.0/src/persistence/infrastructure/storage/file/store.py +282 -0
  210. albusos-0.4.0/src/persistence/infrastructure/storage/file/threads.py +156 -0
  211. albusos-0.4.0/src/persistence/infrastructure/storage/file/workspaces.py +62 -0
  212. albusos-0.4.0/src/persistence/infrastructure/storage/store.py +153 -0
  213. albusos-0.4.0/src/shared_types/__init__.py +47 -0
  214. albusos-0.4.0/src/shared_types/expressions/__init__.py +17 -0
  215. albusos-0.4.0/src/shared_types/expressions/safe_expr.py +426 -0
  216. albusos-0.4.0/src/shared_types/schemas/__init__.py +21 -0
  217. albusos-0.4.0/src/shared_types/schemas/expression.py +204 -0
  218. albusos-0.4.0/src/stdlib/__init__.py +25 -0
  219. albusos-0.4.0/src/stdlib/bootstrap.py +42 -0
  220. albusos-0.4.0/src/stdlib/llm/__init__.py +19 -0
  221. albusos-0.4.0/src/stdlib/llm/anthropic.py +267 -0
  222. albusos-0.4.0/src/stdlib/llm/capability_routing.py +876 -0
  223. albusos-0.4.0/src/stdlib/llm/cognitive_models.py +207 -0
  224. albusos-0.4.0/src/stdlib/llm/google.py +200 -0
  225. albusos-0.4.0/src/stdlib/llm/ollama.py +288 -0
  226. albusos-0.4.0/src/stdlib/llm/openai.py +440 -0
  227. albusos-0.4.0/src/stdlib/llm/providers_init.py +241 -0
  228. albusos-0.4.0/src/stdlib/registry.py +198 -0
  229. albusos-0.4.0/src/stdlib/sdk.py +26 -0
  230. albusos-0.4.0/src/stdlib/tools/code.py +241 -0
  231. albusos-0.4.0/src/stdlib/tools/graph_ops.py +320 -0
  232. albusos-0.4.0/src/stdlib/tools/introspection.py +560 -0
  233. albusos-0.4.0/src/stdlib/tools/kg.py +685 -0
  234. albusos-0.4.0/src/stdlib/tools/llm.py +423 -0
  235. albusos-0.4.0/src/stdlib/tools/mcp.py +224 -0
  236. albusos-0.4.0/src/stdlib/tools/mcp_autoregister.py +203 -0
  237. albusos-0.4.0/src/stdlib/tools/memory.py +209 -0
  238. albusos-0.4.0/src/stdlib/tools/pathway.py +569 -0
  239. albusos-0.4.0/src/stdlib/tools/search.py +435 -0
  240. albusos-0.4.0/src/stdlib/tools/skill.py +213 -0
  241. albusos-0.4.0/src/stdlib/tools/speech.py +189 -0
  242. albusos-0.4.0/src/stdlib/tools/vector.py +300 -0
  243. albusos-0.4.0/src/stdlib/tools/vision.py +594 -0
  244. albusos-0.4.0/src/stdlib/tools/viz.py +1419 -0
  245. albusos-0.4.0/src/stdlib/tools/web.py +326 -0
  246. albusos-0.4.0/src/stdlib/tools/workspace.py +471 -0
  247. albusos-0.4.0/src/stdlib/tools_export.py +15 -0
albusos-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,341 @@
1
+ Metadata-Version: 2.4
2
+ Name: albusos
3
+ Version: 0.4.0
4
+ Summary: Albus AgentOS - Event-driven AI agent runtime
5
+ Author: Your Name
6
+ Author-email: Your Name <your.email@example.com>
7
+ License-Expression: MIT
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Dist: pydantic>=2.0,<3
14
+ Requires-Dist: aiohttp>=3.9,<4
15
+ Requires-Dist: ddgs>=9.0,<10
16
+ Requires-Dist: idna>=3.6,<4
17
+ Requires-Dist: openai>=1.0,<2
18
+ Requires-Dist: anthropic>=0.20,<0.21
19
+ Requires-Dist: python-dotenv>=1.0,<2
20
+ Requires-Dist: aiostream>=0.6.4,<0.7
21
+ Requires-Dist: pyyaml>=6.0.3,<7
22
+ Requires-Dist: mcp>=1.0,<2
23
+ Requires-Dist: google-generativeai>=0.5,<0.6 ; extra == 'all'
24
+ Requires-Dist: google-generativeai>=0.5,<0.6 ; extra == 'google'
25
+ Requires-Python: >=3.11, <4
26
+ Provides-Extra: all
27
+ Provides-Extra: google
28
+ Description-Content-Type: text/markdown
29
+
30
+ # AlbusOS
31
+
32
+ **AlbusOS** is an **event-driven AI agent runtime**.
33
+
34
+ ## Core Abstractions
35
+
36
+ ```
37
+ Agent → Skills → Pathways → Nodes
38
+ Pack → Pathways → Nodes (deployment bundles)
39
+ ```
40
+
41
+ - **Agent**: Persistent AI entity with identity, memory, skills, and goals
42
+ - **Skill**: Pathway wrapped as an agent capability
43
+ - **Pack**: Deployable unit with pathways, triggers, and tool requirements
44
+ - **Pathway**: Execution graph (nodes + connections)
45
+ - **Node**: Atomic compute unit (LLM, Tool, Transform, AgentLoop, etc.)
46
+ - **Trigger**: Event source that invokes a pathway (webhook, timer, MCP)
47
+
48
+ ---
49
+
50
+ ## Quickstart (local dev)
51
+
52
+ ### Prereqs
53
+
54
+ - Python **3.13+**
55
+ - [uv](https://github.com/astral-sh/uv) for dependency management (fast)
56
+ - Optional (local/no-keys mode): [Ollama](https://ollama.com)
57
+
58
+ ### Install
59
+
60
+ ```bash
61
+ uv sync
62
+ cp env.example .env
63
+ ```
64
+
65
+ Edit `.env` or use the defaults:
66
+
67
+ - **Local-first (default)**: Just run [Ollama](https://ollama.com) with `qwen2.5:7b` and `llama3.1:8b`
68
+ - **Cloud fallback**: Set `OPENAI_API_KEY` for vision/speech capabilities
69
+
70
+ The system is **local-first** by default—no cloud API keys required for basic operation.
71
+
72
+ ### Run the server
73
+
74
+ ```bash
75
+ uv run albus server --debug
76
+ ```
77
+
78
+ Verify:
79
+
80
+ ```bash
81
+ curl http://127.0.0.1:8080/api/v1/health
82
+ ```
83
+
84
+ ### Launch terminal Studio
85
+
86
+ ```bash
87
+ uv run albus studio --thread-id demo
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Building Agents
93
+
94
+ Agents are persistent AI entities with identity, memory, and skills. Skills wrap pathways as capabilities.
95
+
96
+ ```python
97
+ from pathway_engine.domain.agent.builder import agent_builder
98
+ from pathway_engine.domain.agent.skill import skill_builder
99
+ from agents.registry import agent
100
+ from packs.research.pathways import build_deep_analysis_pathway
101
+
102
+ # Wrap a pathway as a skill
103
+ research_skill = (
104
+ skill_builder()
105
+ .id("deep_research")
106
+ .name("Deep Research")
107
+ .description("In-depth research using web search and synthesis")
108
+ .pathway(build_deep_analysis_pathway)
109
+ .input("query", "string - the research topic")
110
+ .output("response", "string - synthesized findings")
111
+ .build()
112
+ )
113
+
114
+ # Create the agent
115
+ @agent
116
+ def RESEARCH_ASSISTANT():
117
+ return (
118
+ agent_builder()
119
+ .id("research_assistant")
120
+ .name("Research Assistant")
121
+ .persona("You are a thorough research assistant who cites sources.")
122
+ .goal("Find accurate information")
123
+ .goal("Synthesize findings clearly")
124
+ .skill(research_skill)
125
+ .tool("web.*")
126
+ .tool("memory.*")
127
+ .as_reasoning_agent()
128
+ .max_steps(15)
129
+ .build()
130
+ )
131
+ ```
132
+
133
+ ### Running an Agent Turn
134
+
135
+ ```bash
136
+ curl -X POST http://localhost:8080/api/v1/agents/research_assistant/turn \
137
+ -H "Content-Type: application/json" \
138
+ -d '{
139
+ "message": "Research quantum computing developments in 2024",
140
+ "thread_id": "conv_123"
141
+ }'
142
+ ```
143
+
144
+ See `src/agents/README.md` for full documentation.
145
+
146
+ ---
147
+
148
+ ## Building Packs
149
+
150
+ Packs are deployable bundles of pathways and triggers.
151
+
152
+ ```python
153
+ from pathway_engine import pack_builder, Pack, Pathway, LLMNode
154
+ from packs.registry import deployable
155
+
156
+ @deployable
157
+ def MY_PACK():
158
+ """Define and register a pack."""
159
+ return (
160
+ pack_builder()
161
+ .id("my_pack")
162
+ .name("My Pack")
163
+ .version("1.0.0")
164
+ .trigger(
165
+ id="on_request",
166
+ source="webhook",
167
+ pathway="my_pack.respond.v1",
168
+ )
169
+ .pathway("my_pack.respond.v1", build_respond_pathway)
170
+ .build()
171
+ )
172
+
173
+ def build_respond_pathway() -> Pathway:
174
+ """Build the main pathway."""
175
+ return Pathway(
176
+ id="my_pack.respond.v1",
177
+ nodes={
178
+ "respond": LLMNode(
179
+ id="respond",
180
+ prompt="You are helpful. Respond to: {{message}}",
181
+ model="auto",
182
+ ),
183
+ },
184
+ )
185
+ ```
186
+
187
+ ### Deploying Packs and Agents
188
+
189
+ Configure in `albus.yaml`:
190
+
191
+ ```yaml
192
+ packs: ["*"] # Deploy all registered packs
193
+ agents: ["*"] # Deploy all registered agents
194
+ ```
195
+
196
+ Or deploy at runtime:
197
+
198
+ ```bash
199
+ # Deploy packs
200
+ curl -X POST http://localhost:8080/api/v1/packs/deploy \
201
+ -H "Content-Type: application/json" \
202
+ -d '{"pack_ids": ["research"]}'
203
+
204
+ # Deploy agents
205
+ curl -X POST http://localhost:8080/api/v1/agents/deploy \
206
+ -H "Content-Type: application/json" \
207
+ -d '{"agent_ids": ["research_assistant"]}'
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Model Routing (Local-First)
213
+
214
+ AlbusOS automatically routes tasks to the best model:
215
+
216
+ | Task | Default Model | Provider |
217
+ |------|---------------|----------|
218
+ | Tool calling | `qwen2.5:7b` | Ollama |
219
+ | Code generation | `qwen2.5-coder:7b` | Ollama |
220
+ | Reasoning | `llama3.1:8b` | Ollama |
221
+ | Vision | `gpt-4o` | OpenAI (fallback) |
222
+
223
+ Configure via `albus.yaml`:
224
+
225
+ ```yaml
226
+ models:
227
+ default_profile: local
228
+ routing:
229
+ tool_calling: qwen2.5:7b
230
+ code: qwen2.5-coder:7b
231
+ reasoning: llama3.1:8b
232
+ ```
233
+
234
+ ---
235
+
236
+ ## API Surface
237
+
238
+ The server is versioned under **`/api/v1`**:
239
+
240
+ ### Core Endpoints
241
+
242
+ - `GET /api/v1/health` - Health check
243
+ - `GET /api/v1/help` - Detailed endpoint help
244
+ - `GET /api/v1/tools` - List available tools
245
+ - `GET /api/v1/docs` - Swagger UI
246
+
247
+ ### Agent API
248
+
249
+ - `GET /api/v1/agents` - List available agents
250
+ - `GET /api/v1/agents/deployed` - List deployed agents
251
+ - `POST /api/v1/agents/deploy` - Deploy agents
252
+ - `GET /api/v1/agents/{id}` - Get agent details
253
+ - `POST /api/v1/agents/{id}/turn` - **Run an agent turn**
254
+
255
+ ### Pack API
256
+
257
+ - `GET /api/v1/packs` - List available packs
258
+ - `GET /api/v1/packs/deployed` - List deployed packs
259
+ - `POST /api/v1/packs/deploy` - Deploy packs
260
+
261
+ ### Pathway API
262
+
263
+ - `GET /api/v1/pathways` - List pathways
264
+ - `POST /api/v1/pathways` - Create pathway
265
+ - `POST /api/v1/pathways/{id}/run` - Run a pathway
266
+ - `GET /api/v1/pathways/{id}/export` - Export pathway
267
+
268
+ ### Real-time
269
+
270
+ - `GET /api/v1/ws` - WebSocket (events + JSON-RPC)
271
+ - `POST /api/v1/webhooks/{topic}` - Trigger webhook event
272
+
273
+ ### Model Config
274
+
275
+ - `GET /api/v1/config/models` - View routing config
276
+ - `PATCH /api/v1/config/models` - Update routing
277
+
278
+ ---
279
+
280
+ ## Code Execution + Sandboxing
281
+
282
+ AlbusOS supports sandboxed Python execution:
283
+
284
+ - **Tool**: `code.execute` (stdlib tool)
285
+ - **Isolation**: Docker (default) or local (dev-only)
286
+
287
+ Configure via env vars:
288
+
289
+ - `AGENT_STDLIB_CODE_SANDBOX_MODE`: `docker` (default) or `local`
290
+ - `AGENT_STDLIB_CODE_SANDBOX_DOCKER_IMAGE`: default image
291
+
292
+ ---
293
+
294
+ ## Architecture
295
+
296
+ ```
297
+ shared_types (bottom)
298
+
299
+ pathway_engine (runtime kernel + agent domain)
300
+
301
+ stdlib (tools + LLM routing)
302
+
303
+ persistence (storage)
304
+
305
+ packs (deployable pathway bundles)
306
+
307
+ agents (persistent AI entities)
308
+
309
+ albus (top — product runtime + transports)
310
+ ```
311
+
312
+ See `docs/ARCHITECTURE.md` for details.
313
+
314
+ ---
315
+
316
+ ## Available Agents
317
+
318
+ | Agent | Description | Skills |
319
+ |-------|-------------|--------|
320
+ | `research_assistant` | Thorough research with source citation | deep_research, quick_search |
321
+
322
+ ## Available Packs
323
+
324
+ | Pack | Description | Pathways |
325
+ |------|-------------|----------|
326
+ | `quickstart` | Minimal demo | 1 |
327
+ | `research` | Web search + analysis | 2 |
328
+ | `viz` | Diagram generation | 1 |
329
+ | `dataanalysis` | ML-powered analysis | 6 |
330
+ | `timesheet` | Timesheet extraction | 1 |
331
+ | `ontology` | Ontology extraction | 1 |
332
+
333
+ ---
334
+
335
+ ## Contributing
336
+
337
+ - `docs/DEVELOPMENT.md`
338
+ - `docs/ARCHITECTURE.md`
339
+ - `src/agents/README.md`
340
+ - `src/packs/README.md`
341
+ - `CONTRIBUTING.md`
@@ -0,0 +1,312 @@
1
+ # AlbusOS
2
+
3
+ **AlbusOS** is an **event-driven AI agent runtime**.
4
+
5
+ ## Core Abstractions
6
+
7
+ ```
8
+ Agent → Skills → Pathways → Nodes
9
+ Pack → Pathways → Nodes (deployment bundles)
10
+ ```
11
+
12
+ - **Agent**: Persistent AI entity with identity, memory, skills, and goals
13
+ - **Skill**: Pathway wrapped as an agent capability
14
+ - **Pack**: Deployable unit with pathways, triggers, and tool requirements
15
+ - **Pathway**: Execution graph (nodes + connections)
16
+ - **Node**: Atomic compute unit (LLM, Tool, Transform, AgentLoop, etc.)
17
+ - **Trigger**: Event source that invokes a pathway (webhook, timer, MCP)
18
+
19
+ ---
20
+
21
+ ## Quickstart (local dev)
22
+
23
+ ### Prereqs
24
+
25
+ - Python **3.13+**
26
+ - [uv](https://github.com/astral-sh/uv) for dependency management (fast)
27
+ - Optional (local/no-keys mode): [Ollama](https://ollama.com)
28
+
29
+ ### Install
30
+
31
+ ```bash
32
+ uv sync
33
+ cp env.example .env
34
+ ```
35
+
36
+ Edit `.env` or use the defaults:
37
+
38
+ - **Local-first (default)**: Just run [Ollama](https://ollama.com) with `qwen2.5:7b` and `llama3.1:8b`
39
+ - **Cloud fallback**: Set `OPENAI_API_KEY` for vision/speech capabilities
40
+
41
+ The system is **local-first** by default—no cloud API keys required for basic operation.
42
+
43
+ ### Run the server
44
+
45
+ ```bash
46
+ uv run albus server --debug
47
+ ```
48
+
49
+ Verify:
50
+
51
+ ```bash
52
+ curl http://127.0.0.1:8080/api/v1/health
53
+ ```
54
+
55
+ ### Launch terminal Studio
56
+
57
+ ```bash
58
+ uv run albus studio --thread-id demo
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Building Agents
64
+
65
+ Agents are persistent AI entities with identity, memory, and skills. Skills wrap pathways as capabilities.
66
+
67
+ ```python
68
+ from pathway_engine.domain.agent.builder import agent_builder
69
+ from pathway_engine.domain.agent.skill import skill_builder
70
+ from agents.registry import agent
71
+ from packs.research.pathways import build_deep_analysis_pathway
72
+
73
+ # Wrap a pathway as a skill
74
+ research_skill = (
75
+ skill_builder()
76
+ .id("deep_research")
77
+ .name("Deep Research")
78
+ .description("In-depth research using web search and synthesis")
79
+ .pathway(build_deep_analysis_pathway)
80
+ .input("query", "string - the research topic")
81
+ .output("response", "string - synthesized findings")
82
+ .build()
83
+ )
84
+
85
+ # Create the agent
86
+ @agent
87
+ def RESEARCH_ASSISTANT():
88
+ return (
89
+ agent_builder()
90
+ .id("research_assistant")
91
+ .name("Research Assistant")
92
+ .persona("You are a thorough research assistant who cites sources.")
93
+ .goal("Find accurate information")
94
+ .goal("Synthesize findings clearly")
95
+ .skill(research_skill)
96
+ .tool("web.*")
97
+ .tool("memory.*")
98
+ .as_reasoning_agent()
99
+ .max_steps(15)
100
+ .build()
101
+ )
102
+ ```
103
+
104
+ ### Running an Agent Turn
105
+
106
+ ```bash
107
+ curl -X POST http://localhost:8080/api/v1/agents/research_assistant/turn \
108
+ -H "Content-Type: application/json" \
109
+ -d '{
110
+ "message": "Research quantum computing developments in 2024",
111
+ "thread_id": "conv_123"
112
+ }'
113
+ ```
114
+
115
+ See `src/agents/README.md` for full documentation.
116
+
117
+ ---
118
+
119
+ ## Building Packs
120
+
121
+ Packs are deployable bundles of pathways and triggers.
122
+
123
+ ```python
124
+ from pathway_engine import pack_builder, Pack, Pathway, LLMNode
125
+ from packs.registry import deployable
126
+
127
+ @deployable
128
+ def MY_PACK():
129
+ """Define and register a pack."""
130
+ return (
131
+ pack_builder()
132
+ .id("my_pack")
133
+ .name("My Pack")
134
+ .version("1.0.0")
135
+ .trigger(
136
+ id="on_request",
137
+ source="webhook",
138
+ pathway="my_pack.respond.v1",
139
+ )
140
+ .pathway("my_pack.respond.v1", build_respond_pathway)
141
+ .build()
142
+ )
143
+
144
+ def build_respond_pathway() -> Pathway:
145
+ """Build the main pathway."""
146
+ return Pathway(
147
+ id="my_pack.respond.v1",
148
+ nodes={
149
+ "respond": LLMNode(
150
+ id="respond",
151
+ prompt="You are helpful. Respond to: {{message}}",
152
+ model="auto",
153
+ ),
154
+ },
155
+ )
156
+ ```
157
+
158
+ ### Deploying Packs and Agents
159
+
160
+ Configure in `albus.yaml`:
161
+
162
+ ```yaml
163
+ packs: ["*"] # Deploy all registered packs
164
+ agents: ["*"] # Deploy all registered agents
165
+ ```
166
+
167
+ Or deploy at runtime:
168
+
169
+ ```bash
170
+ # Deploy packs
171
+ curl -X POST http://localhost:8080/api/v1/packs/deploy \
172
+ -H "Content-Type: application/json" \
173
+ -d '{"pack_ids": ["research"]}'
174
+
175
+ # Deploy agents
176
+ curl -X POST http://localhost:8080/api/v1/agents/deploy \
177
+ -H "Content-Type: application/json" \
178
+ -d '{"agent_ids": ["research_assistant"]}'
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Model Routing (Local-First)
184
+
185
+ AlbusOS automatically routes tasks to the best model:
186
+
187
+ | Task | Default Model | Provider |
188
+ |------|---------------|----------|
189
+ | Tool calling | `qwen2.5:7b` | Ollama |
190
+ | Code generation | `qwen2.5-coder:7b` | Ollama |
191
+ | Reasoning | `llama3.1:8b` | Ollama |
192
+ | Vision | `gpt-4o` | OpenAI (fallback) |
193
+
194
+ Configure via `albus.yaml`:
195
+
196
+ ```yaml
197
+ models:
198
+ default_profile: local
199
+ routing:
200
+ tool_calling: qwen2.5:7b
201
+ code: qwen2.5-coder:7b
202
+ reasoning: llama3.1:8b
203
+ ```
204
+
205
+ ---
206
+
207
+ ## API Surface
208
+
209
+ The server is versioned under **`/api/v1`**:
210
+
211
+ ### Core Endpoints
212
+
213
+ - `GET /api/v1/health` - Health check
214
+ - `GET /api/v1/help` - Detailed endpoint help
215
+ - `GET /api/v1/tools` - List available tools
216
+ - `GET /api/v1/docs` - Swagger UI
217
+
218
+ ### Agent API
219
+
220
+ - `GET /api/v1/agents` - List available agents
221
+ - `GET /api/v1/agents/deployed` - List deployed agents
222
+ - `POST /api/v1/agents/deploy` - Deploy agents
223
+ - `GET /api/v1/agents/{id}` - Get agent details
224
+ - `POST /api/v1/agents/{id}/turn` - **Run an agent turn**
225
+
226
+ ### Pack API
227
+
228
+ - `GET /api/v1/packs` - List available packs
229
+ - `GET /api/v1/packs/deployed` - List deployed packs
230
+ - `POST /api/v1/packs/deploy` - Deploy packs
231
+
232
+ ### Pathway API
233
+
234
+ - `GET /api/v1/pathways` - List pathways
235
+ - `POST /api/v1/pathways` - Create pathway
236
+ - `POST /api/v1/pathways/{id}/run` - Run a pathway
237
+ - `GET /api/v1/pathways/{id}/export` - Export pathway
238
+
239
+ ### Real-time
240
+
241
+ - `GET /api/v1/ws` - WebSocket (events + JSON-RPC)
242
+ - `POST /api/v1/webhooks/{topic}` - Trigger webhook event
243
+
244
+ ### Model Config
245
+
246
+ - `GET /api/v1/config/models` - View routing config
247
+ - `PATCH /api/v1/config/models` - Update routing
248
+
249
+ ---
250
+
251
+ ## Code Execution + Sandboxing
252
+
253
+ AlbusOS supports sandboxed Python execution:
254
+
255
+ - **Tool**: `code.execute` (stdlib tool)
256
+ - **Isolation**: Docker (default) or local (dev-only)
257
+
258
+ Configure via env vars:
259
+
260
+ - `AGENT_STDLIB_CODE_SANDBOX_MODE`: `docker` (default) or `local`
261
+ - `AGENT_STDLIB_CODE_SANDBOX_DOCKER_IMAGE`: default image
262
+
263
+ ---
264
+
265
+ ## Architecture
266
+
267
+ ```
268
+ shared_types (bottom)
269
+
270
+ pathway_engine (runtime kernel + agent domain)
271
+
272
+ stdlib (tools + LLM routing)
273
+
274
+ persistence (storage)
275
+
276
+ packs (deployable pathway bundles)
277
+
278
+ agents (persistent AI entities)
279
+
280
+ albus (top — product runtime + transports)
281
+ ```
282
+
283
+ See `docs/ARCHITECTURE.md` for details.
284
+
285
+ ---
286
+
287
+ ## Available Agents
288
+
289
+ | Agent | Description | Skills |
290
+ |-------|-------------|--------|
291
+ | `research_assistant` | Thorough research with source citation | deep_research, quick_search |
292
+
293
+ ## Available Packs
294
+
295
+ | Pack | Description | Pathways |
296
+ |------|-------------|----------|
297
+ | `quickstart` | Minimal demo | 1 |
298
+ | `research` | Web search + analysis | 2 |
299
+ | `viz` | Diagram generation | 1 |
300
+ | `dataanalysis` | ML-powered analysis | 6 |
301
+ | `timesheet` | Timesheet extraction | 1 |
302
+ | `ontology` | Ontology extraction | 1 |
303
+
304
+ ---
305
+
306
+ ## Contributing
307
+
308
+ - `docs/DEVELOPMENT.md`
309
+ - `docs/ARCHITECTURE.md`
310
+ - `src/agents/README.md`
311
+ - `src/packs/README.md`
312
+ - `CONTRIBUTING.md`