Context
First of all — great work on the async capabilities in Neuron! The chatAsync() support (v1.12) and especially the HttpClientInterface abstraction with the AMP adapter in v3 are exactly what's needed for building scalable AI applications in PHP. The event-driven Workflow redesign in v2 is also a much cleaner foundation than the previous graph-based approach.
This feature request builds on top of that existing async infrastructure and proposes extending it into the Workflow layer.
Use case
Many real-world workflows contain independent branches that don't depend on each other. For example, a document analysis pipeline:
StartEvent
├── ExtractTextNode (~3s LLM call)
├── AnalyzeImagesNode (~5s LLM call)
└── ClassifyMetadataNode (~2s LLM call)
MergeResultsNode
StopEvent
Currently, this runs sequentially (~10s total). If the independent nodes could run in parallel, it would complete in ~5s — leveraging the same async I/O that already works beautifully at the agent level.
Current behavior
Workflow::execute() processes nodes one at a time in a while loop:
Node A → wait for completion → Node B → wait for completion → Node C
Even when using AmpHttpClient inside individual nodes, the orchestration layer itself runs them sequentially — only one node executes at a time.
Proposed enhancement
Allow a node to emit multiple events that trigger parallel execution, with a join mechanism to collect results:
// Conceptual API — just to illustrate the idea
class AnalyzeDocument extends Node {
public function __invoke(StartEvent $event, WorkflowState $state): ParallelEvent {
return new ParallelEvent([
new ExtractTextEvent(),
new AnalyzeImagesEvent(),
new ClassifyMetadataEvent(),
], joinOn: MergeResultsEvent::class);
}
}
This would integrate naturally with the existing event-driven architecture — parallel branches are just multiple events dispatched simultaneously, and the join is simply a node that waits for all expected events before proceeding.
Inspiration
Both LlamaIndex Workflows and LangGraph (Python) solve this elegantly within an event-driven model similar to Neuron's:
- LlamaIndex:
@step(num_workers=3) + ctx.collect_events() for fork/join
- LangGraph: Implicit parallelism from graph topology + edge lists for joins
Related issues
These progressively extended async capabilities from agent → tools → evaluation. Workflow feels like the natural next step in that journey.
Context
First of all — great work on the async capabilities in Neuron! The
chatAsync()support (v1.12) and especially theHttpClientInterfaceabstraction with the AMP adapter in v3 are exactly what's needed for building scalable AI applications in PHP. The event-driven Workflow redesign in v2 is also a much cleaner foundation than the previous graph-based approach.This feature request builds on top of that existing async infrastructure and proposes extending it into the Workflow layer.
Use case
Many real-world workflows contain independent branches that don't depend on each other. For example, a document analysis pipeline:
Currently, this runs sequentially (~10s total). If the independent nodes could run in parallel, it would complete in ~5s — leveraging the same async I/O that already works beautifully at the agent level.
Current behavior
Workflow::execute()processes nodes one at a time in a while loop:Even when using
AmpHttpClientinside individual nodes, the orchestration layer itself runs them sequentially — only one node executes at a time.Proposed enhancement
Allow a node to emit multiple events that trigger parallel execution, with a join mechanism to collect results:
This would integrate naturally with the existing event-driven architecture — parallel branches are just multiple events dispatched simultaneously, and the join is simply a node that waits for all expected events before proceeding.
Inspiration
Both LlamaIndex Workflows and LangGraph (Python) solve this elegantly within an event-driven model similar to Neuron's:
@step(num_workers=3)+ctx.collect_events()for fork/joinRelated issues
ParallelToolNode)These progressively extended async capabilities from agent → tools → evaluation. Workflow feels like the natural next step in that journey.