-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Open
Copy link
Description
Hi SK team!
I’ve been experimenting with different agent execution patterns,
and noticed something about the current Agent Orchestration flow
(Planner + Kernel).
Right now the Planner dynamically generates a task/step sequence using LLM reasoning.
This is extremely flexible, but also inherently non-deterministic:
- For the same input, different runs may follow different execution paths
- Small context changes can alter the Planner’s reasoning
- This makes reproducibility and replay debugging harder
- Audit logs show the steps, but not a stable route that can be re-executed
This is expected given LLM-driven planning, but it made me wonder:
Idea: Add an optional compiled plan execution mode
The idea is simple:
- The user expression/request is converted once into a static execution graph (a “compiled plan”).
- The runtime scheduler executes the graph deterministically, step by step.
- Same input + same plan → same route + identical audit structure.
This would not replace dynamic planning
(LLM planning is extremely powerful and should remain the default).
It would just be a supplemental mode for workflows that prefer:
- deterministic behavior
- reproducibility
- easier debugging
- stable audit trails
- high-assurance task execution
Example: Minimal compiled plan format
Here’s an extremely small example of what a static plan might look like:
Metadata
Metadata
Assignees
Labels
No labels
{ "plan_id": "sample-plan-001", "nodes": [ { "id": "analyze", "type": "llm", "inputs": ["user_message"], "outputs": ["analysis"], "next": ["tool_select"] }, { "id": "tool_select", "type": "router", "inputs": ["analysis"], "outputs": ["tool_id"], "next": ["tool_call"] }, { "id": "tool_call", "type": "tool", "inputs": ["tool_id"], "outputs": ["tool_result"], "next": ["final_answer"] }, { "id": "final_answer", "type": "llm", "inputs": ["analysis", "tool_result"], "outputs": ["answer"], "next": [] } ] } This isn’t meant to define a formal schema— just a simple illustration of what a static route graph could look like. Why this could be helpful A static compiled plan mode may help with: deterministic multi-step workflows reproducible agent routing consistent evaluation and testing audit logging (route + input/output pairs are stable) debugging (easy to replay the plan) fallback / rollback logic It also gives SK two complementary execution modes: dynamic planning (default) → flexible, model-driven compiled plan execution (optional) → stable, deterministic If helpful, I can provide a tiny PoC If the team is interested, I can share a very small (30–40 line) PoC of a deterministic scheduler executing a compiled plan like the example above. Happy to contribute if this aligns with the roadmap! Thanks for reviewing!