soe-ai 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- soe/broker.py +4 -5
- soe/docs_index.py +1 -1
- soe/init.py +2 -2
- soe/types.py +40 -28
- {soe_ai-0.1.0.dist-info → soe_ai-0.1.1.dist-info}/METADATA +70 -7
- soe_ai-0.1.1.dist-info/RECORD +10 -0
- soe/validation.py +0 -8
- soe_ai-0.1.0.dist-info/RECORD +0 -11
- {soe_ai-0.1.0.dist-info → soe_ai-0.1.1.dist-info}/WHEEL +0 -0
- {soe_ai-0.1.0.dist-info → soe_ai-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {soe_ai-0.1.0.dist-info → soe_ai-0.1.1.dist-info}/top_level.txt +0 -0
soe/init.py
CHANGED
|
@@ -14,7 +14,7 @@ from .nodes.agent.factory import create_agent_node_caller
|
|
|
14
14
|
from .nodes.tool.factory import create_tool_node_caller
|
|
15
15
|
from .nodes.child.factory import create_child_node_caller
|
|
16
16
|
from .lib.yaml_parser import parse_yaml
|
|
17
|
-
from .types import CallLlm, Backends
|
|
17
|
+
from .types import CallLlm, Backends, NodeCaller, BroadcastSignalsCaller
|
|
18
18
|
from .local_backends import create_in_memory_backends, create_local_backends
|
|
19
19
|
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ def create_all_nodes(
|
|
|
22
22
|
backends: Backends,
|
|
23
23
|
call_llm: Optional[CallLlm] = None,
|
|
24
24
|
tools_registry: Optional[Dict[str, Callable]] = None,
|
|
25
|
-
) -> Tuple[Dict[str,
|
|
25
|
+
) -> Tuple[Dict[str, NodeCaller], BroadcastSignalsCaller]:
|
|
26
26
|
"""
|
|
27
27
|
Create all node types with automatic wiring.
|
|
28
28
|
|
soe/types.py
CHANGED
|
@@ -7,6 +7,26 @@ from __future__ import annotations
|
|
|
7
7
|
from typing import Protocol, Optional, Any, Dict, List
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
class EventTypes:
|
|
11
|
+
"""Constants for telemetry event types"""
|
|
12
|
+
|
|
13
|
+
ORCHESTRATION_START = "orchestration_start"
|
|
14
|
+
SIGNALS_BROADCAST = "signals_broadcast"
|
|
15
|
+
NODE_EXECUTION = "node_execution"
|
|
16
|
+
TOOL_CALL = "tool_call"
|
|
17
|
+
LLM_CALL = "llm_call"
|
|
18
|
+
SIGNALS_TO_PARENT = "signals_to_parent"
|
|
19
|
+
NODE_ERROR = "node_error"
|
|
20
|
+
CONTEXT_WARNING = "context_warning"
|
|
21
|
+
AGENT_TOOLS_LOADED = "agent_tools_loaded"
|
|
22
|
+
AGENT_TOOL_CALL = "agent_tool_call"
|
|
23
|
+
AGENT_TOOL_RESULT = "agent_tool_result"
|
|
24
|
+
AGENT_TOOL_NOT_FOUND = "agent_tool_not_found"
|
|
25
|
+
CONFIG_INHERITANCE_START = "config_inheritance_start"
|
|
26
|
+
CONTEXT_INHERITANCE_START = "context_inheritance_start"
|
|
27
|
+
CONTEXT_MERGE = "context_merge"
|
|
28
|
+
|
|
29
|
+
|
|
10
30
|
class TelemetryBackend(Protocol):
|
|
11
31
|
"""Protocol for telemetry backend"""
|
|
12
32
|
|
|
@@ -30,7 +50,7 @@ class WorkflowBackend(Protocol):
|
|
|
30
50
|
def save_workflows_registry(self, id: str, workflows: Dict[str, Any]) -> None:
|
|
31
51
|
...
|
|
32
52
|
|
|
33
|
-
def
|
|
53
|
+
def get_workflows_registry(self, id: str) -> Any:
|
|
34
54
|
...
|
|
35
55
|
|
|
36
56
|
def save_current_workflow_name(self, id: str, name: str) -> None:
|
|
@@ -40,13 +60,6 @@ class WorkflowBackend(Protocol):
|
|
|
40
60
|
...
|
|
41
61
|
|
|
42
62
|
|
|
43
|
-
class OrchestrateCaller(Protocol):
|
|
44
|
-
"""Protocol for orchestrate caller function"""
|
|
45
|
-
|
|
46
|
-
def __call__(self, execution_id: str, signals: List[str]) -> None:
|
|
47
|
-
...
|
|
48
|
-
|
|
49
|
-
|
|
50
63
|
class BroadcastSignalsCaller(Protocol):
|
|
51
64
|
"""Protocol for broadcast signals caller function"""
|
|
52
65
|
|
|
@@ -54,41 +67,40 @@ class BroadcastSignalsCaller(Protocol):
|
|
|
54
67
|
...
|
|
55
68
|
|
|
56
69
|
|
|
57
|
-
class
|
|
58
|
-
"""Protocol for
|
|
70
|
+
class NodeCaller(Protocol):
|
|
71
|
+
"""Protocol for node caller function"""
|
|
59
72
|
|
|
60
73
|
def __call__(self, execution_id: str, node_config: Dict[str, Any]) -> None:
|
|
61
74
|
...
|
|
62
75
|
|
|
63
76
|
|
|
64
|
-
class
|
|
65
|
-
"""Protocol for
|
|
77
|
+
class LlmNodeCaller(NodeCaller):
|
|
78
|
+
"""Protocol for LLM node caller function"""
|
|
79
|
+
pass
|
|
66
80
|
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
|
|
82
|
+
class RouterNodeCaller(NodeCaller):
|
|
83
|
+
"""Protocol for router node caller function"""
|
|
84
|
+
pass
|
|
69
85
|
|
|
70
86
|
|
|
71
|
-
class
|
|
72
|
-
"""Protocol for
|
|
87
|
+
class AgentNodeCaller(NodeCaller):
|
|
88
|
+
"""Protocol for agent node caller function"""
|
|
89
|
+
pass
|
|
73
90
|
|
|
74
|
-
def __call__(self, execution_id: str, node_config: Dict[str, Any]) -> None:
|
|
75
|
-
...
|
|
76
91
|
|
|
92
|
+
class ToolNodeCaller(NodeCaller):
|
|
93
|
+
"""Protocol for tool node caller function"""
|
|
94
|
+
pass
|
|
77
95
|
|
|
78
|
-
class ChildNodeCaller(Protocol):
|
|
79
|
-
"""Protocol for child node caller function"""
|
|
80
96
|
|
|
81
|
-
|
|
82
|
-
|
|
97
|
+
class ChildNodeCaller(NodeCaller):
|
|
98
|
+
"""Protocol for child node caller function"""
|
|
99
|
+
pass
|
|
83
100
|
|
|
84
101
|
|
|
85
102
|
class OrchestrateCaller(Protocol):
|
|
86
|
-
"""Protocol for starting child workflows (wrapper around orchestrate)
|
|
87
|
-
|
|
88
|
-
Supports optional inheritance parameters:
|
|
89
|
-
- inherit_config_from_id: Inherit workflows, identities, schema from existing execution
|
|
90
|
-
- inherit_context_from_id: Inherit context from existing execution (resets operational)
|
|
91
|
-
"""
|
|
103
|
+
"""Protocol for starting child workflows (wrapper around orchestrate)"""
|
|
92
104
|
|
|
93
105
|
def __call__(
|
|
94
106
|
self,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: soe-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Signal-driven Orchestration Engine - Agent orchestration with event-driven workflow engine
|
|
5
5
|
Author-email: Pedro Garcia <pedro@example.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -91,12 +91,44 @@ All workflow state flows through **context**—a shared dictionary accessible vi
|
|
|
91
91
|
- LLM prompts can interpolate any context field
|
|
92
92
|
- No hidden state—everything is inspectable
|
|
93
93
|
|
|
94
|
-
### 3. Deterministic
|
|
95
|
-
|
|
94
|
+
### 3. Purely Deterministic or Hybrid Agentic
|
|
95
|
+
SOE is a complete orchestration solution. You can use it as a purely deterministic engine for standard business logic, or mix in LLM-driven "Agentic" behavior.
|
|
96
|
+
- **Deterministic**: Use `router` and `tool` nodes for 100% predictable workflows.
|
|
97
|
+
- **Agentic**: Add `llm` and `agent` nodes for creative, reasoning-based tasks.
|
|
98
|
+
You get the safety of code with the flexibility of AI in a single, unified system.
|
|
96
99
|
|
|
97
100
|
### 4. Portable
|
|
98
101
|
Workflows are YAML. Run them locally, in CI, in production. Extract them, version them, share them.
|
|
99
102
|
|
|
103
|
+
### 5. Self-Evolving
|
|
104
|
+
Workflows can modify themselves at runtime. Built-in tools like `inject_workflow`, `inject_node_configuration`, and `add_signal` allow agents to:
|
|
105
|
+
- Create new workflows dynamically
|
|
106
|
+
- Add or modify nodes in existing workflows
|
|
107
|
+
- Update signal routing on the fly
|
|
108
|
+
|
|
109
|
+
This enables **meta-programming**: an AI system that can extend its own capabilities without human intervention.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## What SOE Unlocks
|
|
114
|
+
|
|
115
|
+
SOE is a **Protocol for Intelligence** that unlocks new forms of intelligent behavior:
|
|
116
|
+
|
|
117
|
+
### Self-Evolving Intelligence
|
|
118
|
+
AI systems that can rewrite and improve themselves at runtime - the ultimate evolution of software.
|
|
119
|
+
|
|
120
|
+
### Swarm Intelligence
|
|
121
|
+
Efficient collective decision-making among multiple agents through signal-based consensus.
|
|
122
|
+
|
|
123
|
+
### Hybrid Intelligence
|
|
124
|
+
Seamless combination of deterministic logic and AI creativity with programmatic safety rails.
|
|
125
|
+
|
|
126
|
+
### Fractal Intelligence
|
|
127
|
+
Hierarchical agent organizations that scale complexity while remaining manageable.
|
|
128
|
+
|
|
129
|
+
### Infrastructure Intelligence
|
|
130
|
+
AI orchestration that works everywhere - from edge devices to cloud platforms.
|
|
131
|
+
|
|
100
132
|
---
|
|
101
133
|
|
|
102
134
|
## Installation
|
|
@@ -117,6 +149,37 @@ cd soe && uv sync
|
|
|
117
149
|
|
|
118
150
|
## Quick Start
|
|
119
151
|
|
|
152
|
+
### 1. Provide Your LLM
|
|
153
|
+
|
|
154
|
+
SOE is LLM-agnostic. You must provide a `call_llm` function that matches this signature:
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
def call_llm(
|
|
158
|
+
prompt: str,
|
|
159
|
+
config: dict,
|
|
160
|
+
) -> str:
|
|
161
|
+
"""
|
|
162
|
+
Called by SOE when a node needs LLM processing.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
prompt: The rendered prompt string (includes instructions, context, and schemas)
|
|
166
|
+
config: The full node configuration from YAML (useful for model parameters)
|
|
167
|
+
|
|
168
|
+
Returns:
|
|
169
|
+
The raw text response from the LLM.
|
|
170
|
+
"""
|
|
171
|
+
# Example with OpenAI:
|
|
172
|
+
from openai import OpenAI
|
|
173
|
+
client = OpenAI()
|
|
174
|
+
response = client.chat.completions.create(
|
|
175
|
+
model=config.get("model", "gpt-4o"),
|
|
176
|
+
messages=[{"role": "user", "content": prompt}],
|
|
177
|
+
)
|
|
178
|
+
return response.choices[0].message.content
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 2. Run a Workflow
|
|
182
|
+
|
|
120
183
|
```python
|
|
121
184
|
from soe import orchestrate, create_all_nodes
|
|
122
185
|
from soe.local_backends import create_local_backends
|
|
@@ -134,8 +197,8 @@ example_workflow:
|
|
|
134
197
|
# Create backends (storage for context, workflows, etc.)
|
|
135
198
|
backends = create_local_backends("./data")
|
|
136
199
|
|
|
137
|
-
# Create all node handlers
|
|
138
|
-
nodes, broadcast = create_all_nodes(backends)
|
|
200
|
+
# Create all node handlers (pass your call_llm function)
|
|
201
|
+
nodes, broadcast = create_all_nodes(backends, call_llm=call_llm)
|
|
139
202
|
|
|
140
203
|
# Run the workflow
|
|
141
204
|
execution_id = orchestrate(
|
|
@@ -158,8 +221,8 @@ execution_id = orchestrate(
|
|
|
158
221
|
| Audience | Start Here |
|
|
159
222
|
|----------|------------|
|
|
160
223
|
| **Builders** (workflow authors) | [Documentation](docs/index.md) — Step-by-step chapters |
|
|
161
|
-
| **Engineers** (infrastructure) | [
|
|
162
|
-
| **Researchers** (advanced patterns) | [Advanced Patterns](docs/advanced_patterns/
|
|
224
|
+
| **Engineers** (infrastructure) | [Infrastructure Guide](docs/guide_10_infrastructure.md) — Backend protocols |
|
|
225
|
+
| **Researchers** (advanced patterns) | [Advanced Patterns](docs/advanced_patterns/) — Swarm, hybrid, self-evolving |
|
|
163
226
|
|
|
164
227
|
---
|
|
165
228
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
soe/__init__.py,sha256=4g0b-2C4wlr3Aq9eSmISxEMeWRCI4fim_I1v4nfW_Cs,1131
|
|
2
|
+
soe/broker.py,sha256=F_lKV0uqi9_dY1NIzQnUFJm84r6xd1CmvXjjfgRpwrM,5956
|
|
3
|
+
soe/docs_index.py,sha256=L-VkR0rfr9qGbMHIhhc_gAZKToBsFyiAxW42qj1bFag,3425867
|
|
4
|
+
soe/init.py,sha256=SdVV1oTmh63BCtJpaYZavyO0ALfffsFgd75Vb8aJmXI,5928
|
|
5
|
+
soe/types.py,sha256=3CERX7rti_xRSliH2knZKeNDWqbetWg0z-tTQaGZODk,5929
|
|
6
|
+
soe_ai-0.1.1.dist-info/licenses/LICENSE,sha256=SvEn330zvSOu83Vi4lDCX2QHgr6bmSSXOV1YClLGk1Y,1069
|
|
7
|
+
soe_ai-0.1.1.dist-info/METADATA,sha256=3i9sm4-lbSA6kKZhHcEeIkkvvPH2gWDrIaAK7wh3Pl8,8781
|
|
8
|
+
soe_ai-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
soe_ai-0.1.1.dist-info/top_level.txt,sha256=TUufXyVAQnzN6iT6zRb4dRHdfBSiWXuAL8EoyvugZuY,4
|
|
10
|
+
soe_ai-0.1.1.dist-info/RECORD,,
|
soe/validation.py
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
DEPRECATED: This module has been moved to soe/validation/ folder.
|
|
3
|
-
This file is kept temporarily but will be removed.
|
|
4
|
-
|
|
5
|
-
Import from soe.validation instead:
|
|
6
|
-
from soe.validation import validate_config, validate_operational
|
|
7
|
-
"""
|
|
8
|
-
# This file should be deleted - Python will import from soe/validation/ folder instead
|
soe_ai-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
soe/__init__.py,sha256=4g0b-2C4wlr3Aq9eSmISxEMeWRCI4fim_I1v4nfW_Cs,1131
|
|
2
|
-
soe/broker.py,sha256=R5s5GvgmwgBQK9FyI-UAMVb7nf14tMdXpeEZ-t8d3rE,5987
|
|
3
|
-
soe/docs_index.py,sha256=mDnQ-LVyPgF25_8yCuD04j2PxiQCR_6Si_NMkfJyk-0,3055071
|
|
4
|
-
soe/init.py,sha256=Fzw7MDoEOlZLfCwH-kL0evUjc3WHmLEVOaeR2-dgwWs,5876
|
|
5
|
-
soe/types.py,sha256=xSmkRcKehYW2pesnzB0qCZHjpm_IoDTBbQcb1SwV-8o,5712
|
|
6
|
-
soe/validation.py,sha256=SeBfGaaGjUi73ejnHNqVLTv7LYtU_gFHX8OJ3iytJMo,318
|
|
7
|
-
soe_ai-0.1.0.dist-info/licenses/LICENSE,sha256=SvEn330zvSOu83Vi4lDCX2QHgr6bmSSXOV1YClLGk1Y,1069
|
|
8
|
-
soe_ai-0.1.0.dist-info/METADATA,sha256=bWjq5DC6W9NenF18lKAgVkK-xZE_9cYGYJOOCQCoHSM,6558
|
|
9
|
-
soe_ai-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
-
soe_ai-0.1.0.dist-info/top_level.txt,sha256=TUufXyVAQnzN6iT6zRb4dRHdfBSiWXuAL8EoyvugZuY,4
|
|
11
|
-
soe_ai-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|