GitHub user pltbkd added a comment to the discussion: [Feature] Sub-agent Resource for Flink Agents - Framework part
Hi joeyutong, Thanks for sharing your thoughts. I understand the confusion. The InternalSubagent preview in the proposal intentionally simplified many of the details, so let me briefly clarify a few points here. First, I'd like to clarify that Subagent is a separate interface intended for callers and is independent of the concrete Agent implementation. Callers always use subagent.call(), regardless of whether the target is an internal or external subagent. However, only external subagents need to implement this method themselves; for internal subagents, the framework handles it transparently. In that sense, its role is essentially the same as the SubagentInvoker abstraction you described. Any Agent that satisfies the required constraints can be registered as an internal subagent without any modification. InternalSubagent is a framework-provided abstraction that translates a call() request into an InputEvent within the subagent scope and returns the subagent's OutputEvent as the call result. Once the event is emitted, the calling Action yields, and the remainder of the execution continues under the existing event-driven execution model. There will be some framework changes to ensure that SubagentCallEvent can be dispatched and processed at that point. In short, callers only need to understand subagent.call() and do not need to care whether the target is internal or external. Implementers only need to develop a standard Agent—they do not need to modify it or understand or implement call(). From the framework's perspective, there is still only a single event-driven execution model; subagent.call() is simply a resource-oriented invocation interface built on top of that model. I hope this addresses your concerns. If anything is still unclear, I'd be happy to discuss it further here, or we can dive into the details in the dedicated InternalSubagent discussion. GitHub link: https://github.com/apache/flink-agents/discussions/909#discussioncomment-17668597 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
