Where Workflow should initialized? #260
Replies: 2 comments
-
|
Hi, thank you for posting your question, The Workflow component is designed to allow the implementation of complex agentic entities. The Workflow is just like the Agent or RAG class, but it can incorporate a completely customized logic. So running a workflow it's intended to run your agentic entity. Thanks to the modular design of Neuron you can clearly run a workflow as a tool of an agent, but it's something weird. You should have a clear design reason to do that. Typically you should approach with Workflow when the standard implementation of the Agent or RAG class is not enough for your use case. You could need a completely different retrieval implementation, or a Tool call strategy with human in the loop. So Workflow can be the orchestration layer of a totally customized AI agent implementation. Anyway you can see an example of a script running a workflow here: https://github.com/inspector-apm/neuron-ai/blob/1.x/examples/workflow/workflow-interrupt.php Feel free to follow up with more questions or add more details about your implementation needs. |
Beta Was this translation helpful? Give feedback.
-
|
That’s a good question. In practice, whether you initialize the workflow inside the tool itself or at a higher level depends on how much flexibility you want later on. If the workflow is tightly coupled to a single agent or tool, initializing it inside that tool is fine. If you expect to mix in other AI tools or swap out retrieval strategies, then keeping the workflow initialization separate gives you more control. One practical tip: it helps to think of the workflow as an orchestrator, not just another tool. That way, you can treat it like a semantic firewall that manages how context flows between agents, tools, and memory. This avoids situations where headers, metadata, or context segments are dropped. Some people also use lightweight wrappers (like TXTOS or wfgy core) to externalize the workflow setup. That way the logic is clear, portable, and you can ask your AI assistant to walk through how to extend or modify it step by step. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
First off—thanks for the great package! 🙏
I know this might sound like a very basic question — I understand how to create — but what I’m trying to figure out is the best practice for where to initialize the workflow from in a real application that also has other AI tools.
Inside the tool itself?
It would also be great if you could show me a very simple example of triggering a workflow
Thanks
Beta Was this translation helpful? Give feedback.
All reactions