soe-ai 0.1.3__tar.gz → 0.2.0b1__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 (153) hide show
  1. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/PKG-INFO +1 -1
  2. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/pyproject.toml +1 -1
  3. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/__init__.py +12 -0
  4. soe_ai-0.2.0b1/soe/builtin_tools/soe_get_context_schema.py +56 -0
  5. soe_ai-0.2.0b1/soe/builtin_tools/soe_get_identities.py +63 -0
  6. soe_ai-0.2.0b1/soe/builtin_tools/soe_inject_context_schema_field.py +80 -0
  7. soe_ai-0.2.0b1/soe/builtin_tools/soe_inject_identity.py +64 -0
  8. soe_ai-0.2.0b1/soe/builtin_tools/soe_remove_context_schema_field.py +61 -0
  9. soe_ai-0.2.0b1/soe/builtin_tools/soe_remove_identity.py +61 -0
  10. soe_ai-0.2.0b1/soe/docs/builtins/context_schema.md +158 -0
  11. soe_ai-0.2.0b1/soe/docs/builtins/identity.md +139 -0
  12. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_11_builtins.md +11 -3
  13. soe_ai-0.2.0b1/soe/docs_index.py +2 -0
  14. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe_ai.egg-info/PKG-INFO +1 -1
  15. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe_ai.egg-info/SOURCES.txt +9 -1
  16. soe_ai-0.1.3/soe/docs_index.py +0 -2
  17. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/LICENSE +0 -0
  18. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/README.md +0 -0
  19. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/setup.cfg +0 -0
  20. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/__init__.py +0 -0
  21. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/broker.py +0 -0
  22. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_add_signal.py +0 -0
  23. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_call_tool.py +0 -0
  24. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_copy_context.py +0 -0
  25. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_explore_docs.py +0 -0
  26. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_get_available_tools.py +0 -0
  27. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_get_context.py +0 -0
  28. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_get_workflows.py +0 -0
  29. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_inject_node.py +0 -0
  30. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_inject_workflow.py +0 -0
  31. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_list_contexts.py +0 -0
  32. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_remove_node.py +0 -0
  33. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_remove_workflow.py +0 -0
  34. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/builtin_tools/soe_update_context.py +0 -0
  35. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/_config.yml +0 -0
  36. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/guide_fanout_and_aggregations.md +0 -0
  37. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/guide_inheritance.md +0 -0
  38. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/hybrid_intelligence.md +0 -0
  39. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/index.md +0 -0
  40. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/operational.md +0 -0
  41. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/self_evolving_workflows.md +0 -0
  42. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/advanced_patterns/swarm_intelligence.md +0 -0
  43. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/builtins/context.md +0 -0
  44. /soe_ai-0.1.3/soe/docs/builtins/explore_docs.md → /soe_ai-0.2.0b1/soe/docs/builtins/soe_explore_docs.md +0 -0
  45. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/builtins/tools.md +0 -0
  46. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/builtins/workflows.md +0 -0
  47. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_00_getting_started.md +0 -0
  48. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_01_tool.md +0 -0
  49. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_02_llm.md +0 -0
  50. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_03_router.md +0 -0
  51. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_04_patterns.md +0 -0
  52. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_05_agent.md +0 -0
  53. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_06_schema.md +0 -0
  54. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_07_identity.md +0 -0
  55. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_08_child.md +0 -0
  56. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_09_ecosystem.md +0 -0
  57. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/guide_10_infrastructure.md +0 -0
  58. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/index.md +0 -0
  59. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/primitives/backends.md +0 -0
  60. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/primitives/context.md +0 -0
  61. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/primitives/node_reference.md +0 -0
  62. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/primitives/primitives.md +0 -0
  63. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/docs/primitives/signals.md +0 -0
  64. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/init.py +0 -0
  65. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/__init__.py +0 -0
  66. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/child_context.py +0 -0
  67. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/context_fields.py +0 -0
  68. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/inheritance.py +0 -0
  69. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/jinja_render.py +0 -0
  70. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/operational.py +0 -0
  71. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/parent_sync.py +0 -0
  72. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/register_event.py +0 -0
  73. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/schema_validation.py +0 -0
  74. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/lib/yaml_parser.py +0 -0
  75. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/__init__.py +0 -0
  76. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/factory.py +0 -0
  77. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/in_memory/context.py +0 -0
  78. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/in_memory/conversation_history.py +0 -0
  79. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/in_memory/identity.py +0 -0
  80. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/in_memory/schema.py +0 -0
  81. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/in_memory/telemetry.py +0 -0
  82. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/in_memory/workflow.py +0 -0
  83. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/storage/context.py +0 -0
  84. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/storage/conversation_history.py +0 -0
  85. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/storage/identity.py +0 -0
  86. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/storage/schema.py +0 -0
  87. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/storage/telemetry.py +0 -0
  88. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/local_backends/storage/workflow.py +0 -0
  89. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/__init__.py +0 -0
  90. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/__init__.py +0 -0
  91. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/factory.py +0 -0
  92. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/lib/loop_handlers.py +0 -0
  93. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/lib/loop_state.py +0 -0
  94. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/lib/prompts.py +0 -0
  95. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/lib/tools.py +0 -0
  96. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/stages/__init__.py +0 -0
  97. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/stages/parameter.py +0 -0
  98. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/stages/response.py +0 -0
  99. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/stages/router.py +0 -0
  100. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/state.py +0 -0
  101. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/types.py +0 -0
  102. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/validation/__init__.py +0 -0
  103. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/validation/config.py +0 -0
  104. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/agent/validation/operational.py +0 -0
  105. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/child/__init__.py +0 -0
  106. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/child/factory.py +0 -0
  107. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/child/state.py +0 -0
  108. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/child/validation/__init__.py +0 -0
  109. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/child/validation/config.py +0 -0
  110. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/child/validation/operational.py +0 -0
  111. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/conditions.py +0 -0
  112. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/context.py +0 -0
  113. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/conversation_history.py +0 -0
  114. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/identity.py +0 -0
  115. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/llm_resolver.py +0 -0
  116. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/output.py +0 -0
  117. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/response_builder.py +0 -0
  118. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/signal_emission.py +0 -0
  119. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/signals.py +0 -0
  120. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/lib/tools.py +0 -0
  121. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/__init__.py +0 -0
  122. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/factory.py +0 -0
  123. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/state.py +0 -0
  124. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/types.py +0 -0
  125. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/validation/__init__.py +0 -0
  126. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/validation/config.py +0 -0
  127. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/llm/validation/operational.py +0 -0
  128. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/router/__init__.py +0 -0
  129. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/router/factory.py +0 -0
  130. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/router/state.py +0 -0
  131. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/router/validation/__init__.py +0 -0
  132. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/router/validation/config.py +0 -0
  133. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/router/validation/operational.py +0 -0
  134. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/factory.py +0 -0
  135. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/lib/__init__.py +0 -0
  136. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/lib/conditions.py +0 -0
  137. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/lib/failure.py +0 -0
  138. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/lib/parameters.py +0 -0
  139. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/state.py +0 -0
  140. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/types.py +0 -0
  141. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/validation/__init__.py +0 -0
  142. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/validation/config.py +0 -0
  143. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/nodes/tool/validation/operational.py +0 -0
  144. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/types.py +0 -0
  145. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/validation/__init__.py +0 -0
  146. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/validation/config.py +0 -0
  147. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/validation/jinja.py +0 -0
  148. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe/validation/operational.py +0 -0
  149. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe_ai.egg-info/dependency_links.txt +0 -0
  150. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe_ai.egg-info/requires.txt +0 -0
  151. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/soe_ai.egg-info/top_level.txt +0 -0
  152. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/tests/test_local_storage_backends.py +0 -0
  153. {soe_ai-0.1.3 → soe_ai-0.2.0b1}/tests/test_validation_errors.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soe-ai
3
- Version: 0.1.3
3
+ Version: 0.2.0b1
4
4
  Summary: Signal-driven Orchestration Engine - Agent orchestration with event-driven workflow engine
5
5
  Author-email: Pedro Garcia <pgarcia14180@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "soe-ai"
7
- version = "0.1.3"
7
+ version = "0.2.0b1"
8
8
  description = "Signal-driven Orchestration Engine - Agent orchestration with event-driven workflow engine"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -15,6 +15,12 @@ from .soe_copy_context import create_soe_copy_context_tool
15
15
  from .soe_list_contexts import create_soe_list_contexts_tool
16
16
  from .soe_add_signal import create_soe_add_signal_tool
17
17
  from .soe_call_tool import create_soe_call_tool_tool
18
+ from .soe_get_identities import create_soe_get_identities_tool
19
+ from .soe_inject_identity import create_soe_inject_identity_tool
20
+ from .soe_remove_identity import create_soe_remove_identity_tool
21
+ from .soe_get_context_schema import create_soe_get_context_schema_tool
22
+ from .soe_inject_context_schema_field import create_soe_inject_context_schema_field_tool
23
+ from .soe_remove_context_schema_field import create_soe_remove_context_schema_field_tool
18
24
 
19
25
  # Registry of all available built-in tools
20
26
  BUILTIN_TOOLS = {
@@ -31,6 +37,12 @@ BUILTIN_TOOLS = {
31
37
  "soe_list_contexts": create_soe_list_contexts_tool,
32
38
  "soe_add_signal": create_soe_add_signal_tool,
33
39
  "soe_call_tool": create_soe_call_tool_tool,
40
+ "soe_get_identities": create_soe_get_identities_tool,
41
+ "soe_inject_identity": create_soe_inject_identity_tool,
42
+ "soe_remove_identity": create_soe_remove_identity_tool,
43
+ "soe_get_context_schema": create_soe_get_context_schema_tool,
44
+ "soe_inject_context_schema_field": create_soe_inject_context_schema_field_tool,
45
+ "soe_remove_context_schema_field": create_soe_remove_context_schema_field_tool,
34
46
  }
35
47
 
36
48
 
@@ -0,0 +1,56 @@
1
+ """Built-in context schema retrieval tool."""
2
+
3
+ from typing import Dict, Any, Callable, Optional
4
+
5
+
6
+ def create_soe_get_context_schema_tool(
7
+ execution_id: str,
8
+ backends,
9
+ tools_registry: dict = None,
10
+ ) -> Callable:
11
+ """
12
+ Factory function to create soe_get_context_schema tool.
13
+
14
+ Args:
15
+ execution_id: ID to access context schema data via backends
16
+ backends: Backend services to fetch context schema
17
+ tools_registry: Optional registry of available tools (unused by this tool)
18
+
19
+ Returns:
20
+ Configured soe_get_context_schema function
21
+ """
22
+
23
+ def soe_get_context_schema(
24
+ field_name: Optional[str] = None,
25
+ ) -> Dict[str, Any]:
26
+ """
27
+ Get context schema information from the current execution.
28
+
29
+ Args:
30
+ field_name: If provided, get only this specific field's definition.
31
+ If None, returns the full schema.
32
+
33
+ Returns:
34
+ If field_name provided: {"field_name": "...", "definition": {...}}
35
+ Otherwise: Full schema dict of field_name -> field_definition
36
+ """
37
+ schema = backends.context_schema.get_context_schema(execution_id)
38
+
39
+ if schema is None:
40
+ schema = {}
41
+
42
+ if field_name:
43
+ if field_name in schema:
44
+ return {
45
+ "field_name": field_name,
46
+ "definition": schema[field_name],
47
+ }
48
+ else:
49
+ return {
50
+ "error": f"Field '{field_name}' not found in context schema",
51
+ "available": list(schema.keys()),
52
+ }
53
+
54
+ return schema
55
+
56
+ return soe_get_context_schema
@@ -0,0 +1,63 @@
1
+ """Built-in identity retrieval tool."""
2
+
3
+ from typing import Dict, Any, Callable, Optional
4
+
5
+
6
+ def create_soe_get_identities_tool(
7
+ execution_id: str,
8
+ backends,
9
+ tools_registry: dict = None,
10
+ ) -> Callable:
11
+ """
12
+ Factory function to create soe_get_identities tool.
13
+
14
+ Args:
15
+ execution_id: ID to access identity data via backends
16
+ backends: Backend services to fetch identities
17
+ tools_registry: Optional registry of available tools (unused by this tool)
18
+
19
+ Returns:
20
+ Configured soe_get_identities function
21
+ """
22
+
23
+ def soe_get_identities(
24
+ identity_name: Optional[str] = None,
25
+ list_only: bool = False,
26
+ ) -> Dict[str, Any]:
27
+ """
28
+ Get identity information from the current execution.
29
+
30
+ Args:
31
+ identity_name: If provided, get only this specific identity's system prompt.
32
+ If None, returns info about all identities.
33
+ list_only: If True, only return identity names (not full system prompts).
34
+ Default is False.
35
+
36
+ Returns:
37
+ If list_only=True: {"identity_names": ["assistant", "expert", ...]}
38
+ If identity_name provided: {"identity_name": "...", "system_prompt": "..."}
39
+ Otherwise: Full dict of identity_name -> system_prompt
40
+ """
41
+ identities = backends.identity.get_identities(execution_id)
42
+
43
+ if identities is None:
44
+ identities = {}
45
+
46
+ if list_only:
47
+ return {"identity_names": list(identities.keys())}
48
+
49
+ if identity_name:
50
+ if identity_name in identities:
51
+ return {
52
+ "identity_name": identity_name,
53
+ "system_prompt": identities[identity_name],
54
+ }
55
+ else:
56
+ return {
57
+ "error": f"Identity '{identity_name}' not found",
58
+ "available": list(identities.keys()),
59
+ }
60
+
61
+ return identities
62
+
63
+ return soe_get_identities
@@ -0,0 +1,80 @@
1
+ """Built-in context schema field injection tool."""
2
+
3
+ import json
4
+ from typing import Dict, Any, Callable
5
+ from ..types import EventTypes
6
+ from ..lib.register_event import register_event
7
+ from ..lib.yaml_parser import parse_yaml
8
+
9
+
10
+ def create_soe_inject_context_schema_field_tool(
11
+ execution_id: str,
12
+ backends,
13
+ tools_registry: dict = None,
14
+ ) -> Callable:
15
+ """
16
+ Factory function to create soe_inject_context_schema_field tool.
17
+
18
+ Args:
19
+ execution_id: ID to access context schema data via backends
20
+ backends: Backend services to fetch/update context schema
21
+ tools_registry: Optional registry of available tools (unused by this tool)
22
+
23
+ Returns:
24
+ Configured soe_inject_context_schema_field function
25
+ """
26
+
27
+ def soe_inject_context_schema_field(
28
+ field_name: str,
29
+ field_definition: str,
30
+ ) -> Dict[str, Any]:
31
+ """
32
+ Add or update a field in the context schema.
33
+
34
+ Args:
35
+ field_name: Name of the field to add/update
36
+ field_definition: JSON or YAML string with field definition
37
+ (e.g., {"type": "string", "description": "..."})
38
+
39
+ Returns:
40
+ Success confirmation with field info and action taken
41
+ """
42
+ parsed_definition = None
43
+
44
+ try:
45
+ parsed_definition = json.loads(field_definition)
46
+ except json.JSONDecodeError:
47
+ parsed_definition = parse_yaml(field_definition)
48
+
49
+ if not isinstance(parsed_definition, dict):
50
+ raise ValueError("Field definition must be a dictionary/object")
51
+
52
+ schema = backends.context_schema.get_context_schema(execution_id)
53
+
54
+ if schema is None:
55
+ schema = {}
56
+
57
+ action = "updated" if field_name in schema else "created"
58
+
59
+ schema[field_name] = parsed_definition
60
+ backends.context_schema.save_context_schema(execution_id, schema)
61
+
62
+ register_event(
63
+ backends,
64
+ execution_id,
65
+ EventTypes.NODE_EXECUTION,
66
+ {
67
+ "tool": "soe_inject_context_schema_field",
68
+ "field_name": field_name,
69
+ "action": action,
70
+ },
71
+ )
72
+
73
+ return {
74
+ "success": True,
75
+ "field_name": field_name,
76
+ "action": action,
77
+ "message": f"Successfully {action} field '{field_name}' in context schema",
78
+ }
79
+
80
+ return soe_inject_context_schema_field
@@ -0,0 +1,64 @@
1
+ """Built-in identity injection tool."""
2
+
3
+ from typing import Dict, Any, Callable
4
+ from ..types import EventTypes
5
+ from ..lib.register_event import register_event
6
+
7
+
8
+ def create_soe_inject_identity_tool(
9
+ execution_id: str,
10
+ backends,
11
+ tools_registry: dict = None,
12
+ ) -> Callable:
13
+ """
14
+ Factory function to create soe_inject_identity tool.
15
+
16
+ Args:
17
+ execution_id: ID to access identity data via backends
18
+ backends: Backend services to fetch/update identities
19
+ tools_registry: Optional registry of available tools (unused by this tool)
20
+
21
+ Returns:
22
+ Configured soe_inject_identity function that can add/update identities
23
+ """
24
+
25
+ def soe_inject_identity(identity_name: str, system_prompt: str) -> Dict[str, Any]:
26
+ """
27
+ Add or update an identity definition.
28
+
29
+ Args:
30
+ identity_name: Name/key for the identity
31
+ system_prompt: The system prompt text for this identity
32
+
33
+ Returns:
34
+ Success confirmation with identity info and action taken
35
+ """
36
+ identities = backends.identity.get_identities(execution_id)
37
+
38
+ if identities is None:
39
+ identities = {}
40
+
41
+ action = "updated" if identity_name in identities else "created"
42
+
43
+ identities[identity_name] = system_prompt
44
+ backends.identity.save_identities(execution_id, identities)
45
+
46
+ register_event(
47
+ backends,
48
+ execution_id,
49
+ EventTypes.NODE_EXECUTION,
50
+ {
51
+ "tool": "soe_inject_identity",
52
+ "identity_name": identity_name,
53
+ "action": action,
54
+ },
55
+ )
56
+
57
+ return {
58
+ "success": True,
59
+ "identity_name": identity_name,
60
+ "action": action,
61
+ "message": f"Successfully {action} identity '{identity_name}'",
62
+ }
63
+
64
+ return soe_inject_identity
@@ -0,0 +1,61 @@
1
+ """Built-in context schema field removal tool."""
2
+
3
+ from typing import Dict, Any, Callable
4
+ from ..types import EventTypes
5
+ from ..lib.register_event import register_event
6
+
7
+
8
+ def create_soe_remove_context_schema_field_tool(
9
+ execution_id: str,
10
+ backends,
11
+ tools_registry: dict = None,
12
+ ) -> Callable:
13
+ """
14
+ Factory function to create soe_remove_context_schema_field tool.
15
+
16
+ Args:
17
+ execution_id: ID to access context schema data via backends
18
+ backends: Backend services to fetch/update context schema
19
+ tools_registry: Optional registry of available tools (unused by this tool)
20
+
21
+ Returns:
22
+ Configured soe_remove_context_schema_field function
23
+ """
24
+
25
+ def soe_remove_context_schema_field(field_name: str) -> Dict[str, Any]:
26
+ """
27
+ Remove a field from the context schema.
28
+
29
+ Args:
30
+ field_name: Name of the field to remove
31
+
32
+ Returns:
33
+ Success confirmation with removed field info
34
+ """
35
+ schema = backends.context_schema.get_context_schema(execution_id)
36
+
37
+ if schema is None or field_name not in schema:
38
+ raise ValueError(
39
+ f"Field '{field_name}' not found in context schema"
40
+ )
41
+
42
+ del schema[field_name]
43
+ backends.context_schema.save_context_schema(execution_id, schema)
44
+
45
+ register_event(
46
+ backends,
47
+ execution_id,
48
+ EventTypes.NODE_EXECUTION,
49
+ {
50
+ "tool": "soe_remove_context_schema_field",
51
+ "field_name": field_name,
52
+ },
53
+ )
54
+
55
+ return {
56
+ "removed": True,
57
+ "field_name": field_name,
58
+ "message": f"Successfully removed field '{field_name}' from context schema",
59
+ }
60
+
61
+ return soe_remove_context_schema_field
@@ -0,0 +1,61 @@
1
+ """Built-in identity removal tool."""
2
+
3
+ from typing import Dict, Any, Callable
4
+ from ..types import EventTypes
5
+ from ..lib.register_event import register_event
6
+
7
+
8
+ def create_soe_remove_identity_tool(
9
+ execution_id: str,
10
+ backends,
11
+ tools_registry: dict = None,
12
+ ) -> Callable:
13
+ """
14
+ Factory function to create soe_remove_identity tool.
15
+
16
+ Args:
17
+ execution_id: ID to access identity data via backends
18
+ backends: Backend services to fetch/update identities
19
+ tools_registry: Optional registry of available tools (unused by this tool)
20
+
21
+ Returns:
22
+ Configured soe_remove_identity function that can remove identities
23
+ """
24
+
25
+ def soe_remove_identity(identity_name: str) -> Dict[str, Any]:
26
+ """
27
+ Remove an identity definition.
28
+
29
+ Args:
30
+ identity_name: Name of the identity to remove
31
+
32
+ Returns:
33
+ Success confirmation with removed identity info
34
+ """
35
+ identities = backends.identity.get_identities(execution_id)
36
+
37
+ if identities is None or identity_name not in identities:
38
+ raise ValueError(
39
+ f"Identity '{identity_name}' not found"
40
+ )
41
+
42
+ del identities[identity_name]
43
+ backends.identity.save_identities(execution_id, identities)
44
+
45
+ register_event(
46
+ backends,
47
+ execution_id,
48
+ EventTypes.NODE_EXECUTION,
49
+ {
50
+ "tool": "soe_remove_identity",
51
+ "identity_name": identity_name,
52
+ },
53
+ )
54
+
55
+ return {
56
+ "removed": True,
57
+ "identity_name": identity_name,
58
+ "message": f"Successfully removed identity '{identity_name}'",
59
+ }
60
+
61
+ return soe_remove_identity
@@ -0,0 +1,158 @@
1
+
2
+ # Built-in: Context Schema Management
3
+
4
+ ## Runtime Schema Control
5
+
6
+ These built-in tools enable workflows to **manage context schemas at runtime**. Context schemas define the structure and types of context fields—querying, adding, and removing fields enables self-evolving data structures.
7
+
8
+ ---
9
+
10
+ ## Available Tools
11
+
12
+ | Tool | Purpose |
13
+ |------|---------|
14
+ | `soe_get_context_schema` | Query current context schema |
15
+ | `soe_inject_context_schema_field` | Add or update a schema field |
16
+ | `soe_remove_context_schema_field` | Remove a schema field |
17
+
18
+ ---
19
+
20
+ ## soe_get_context_schema
21
+
22
+ Query the context schema for the current execution.
23
+
24
+ ### Parameters
25
+
26
+ | Parameter | Type | Default | Description |
27
+ |-----------|------|---------|-------------|
28
+ | `field_name` | `Optional[str]` | `None` | Get a specific field's definition |
29
+
30
+ ### Return Values
31
+
32
+ - **No parameters**: Returns full schema dict of `field_name -> field_definition`
33
+ - **`field_name` provided**: Returns `{"field_name": "...", "definition": {...}}`
34
+ - **Not found**: Returns `{"error": "...", "available": [...]}`
35
+
36
+ ### Use Cases
37
+
38
+ - **Introspection** — Let LLMs understand expected data structure
39
+ - **Validation** — Check schema before writing context
40
+ - **Documentation** — Generate field descriptions dynamically
41
+
42
+ ---
43
+
44
+ ## soe_inject_context_schema_field
45
+
46
+ Add or update a single field in the context schema.
47
+
48
+ ### Parameters
49
+
50
+ | Parameter | Type | Description |
51
+ |-----------|------|-------------|
52
+ | `field_name` | `str` | Name of the field to add/update |
53
+ | `field_definition` | `str` | JSON or YAML string with field definition |
54
+
55
+ ### Field Definition Format
56
+
57
+ ```json
58
+ {
59
+ "type": "string",
60
+ "description": "User's preferred language",
61
+ "required": false,
62
+ "default": "en"
63
+ }
64
+ ```
65
+
66
+ Or in YAML:
67
+
68
+ ```yaml
69
+ type: object
70
+ description: User preferences
71
+ properties:
72
+ theme: string
73
+ language: string
74
+ ```
75
+
76
+ ### Return Value
77
+
78
+ ```python
79
+ {
80
+ "success": True,
81
+ "field_name": "user_preferences",
82
+ "action": "created", # or "updated"
83
+ "message": "Successfully created field 'user_preferences' in context schema"
84
+ }
85
+ ```
86
+
87
+ ### Use Cases
88
+
89
+ - **Dynamic schemas** — Add fields based on workflow needs
90
+ - **Self-evolution** — Workflows define their own data structures
91
+ - **Extension** — Add domain-specific fields at runtime
92
+
93
+ ---
94
+
95
+ ## soe_remove_context_schema_field
96
+
97
+ Remove a single field from the context schema.
98
+
99
+ ### Parameters
100
+
101
+ | Parameter | Type | Description |
102
+ |-----------|------|-------------|
103
+ | `field_name` | `str` | Name of field to remove |
104
+
105
+ ### Return Value
106
+
107
+ ```python
108
+ {
109
+ "removed": True,
110
+ "field_name": "deprecated_field",
111
+ "message": "Successfully removed field 'deprecated_field' from context schema"
112
+ }
113
+ ```
114
+
115
+ Raises `ValueError` if field not found.
116
+
117
+ ### Use Cases
118
+
119
+ - **Cleanup** — Remove unused schema fields
120
+ - **Refactoring** — Remove deprecated fields
121
+ - **Evolution** — Replace outdated field definitions
122
+
123
+ ---
124
+
125
+ ## Schema Patterns
126
+
127
+ ### Self-Documenting Workflows
128
+
129
+ A workflow that describes its own data requirements:
130
+
131
+
132
+ ```yaml
133
+ self_documenting:
134
+ DescribeNeeds:
135
+ node_type: llm
136
+ event_triggers: [START]
137
+ prompt: "Based on task {{ context.task }}, what data fields do we need?"
138
+ output_field: needed_fields
139
+ event_emissions:
140
+ - signal_name: NEEDS_DESCRIBED
141
+
142
+ CreateSchema:
143
+ node_type: tool
144
+ event_triggers: [NEEDS_DESCRIBED]
145
+ tool_name: soe_inject_context_schema_field
146
+ context_parameter_field: schema_field_config
147
+ output_field: schema_result
148
+ event_emissions:
149
+ - signal_name: SCHEMA_READY
150
+ ```
151
+
152
+
153
+ ---
154
+
155
+ ## Related
156
+
157
+ - [Built-in Tools Overview](../guide_11_builtins.md) — All available built-ins
158
+ - [Context Schema Guide](../guide_06_schema.md) — Schema fundamentals