yunfengzhou-hub opened a new issue, #1139: URL: https://github.com/apache/flink-agents/issues/1139
### Search before asking - [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar. ### Description ## Motivation ReActAgent already ships as a programmatic general-purpose agent with a model reasoning/tool loop (Java `org.apache.flink.agents.api.agents.ReActAgent`, Python `flink_agents.api.agents.react_agent`). Using an agent as a subagent currently requires authoring a custom Agent or a deferred SubagentSetup. Making ReActAgent directly usable as a ready-made general-purpose subagent lets a parent agent, or its chat model, delegate open-ended reasoning and tool tasks into an isolated sub-context without writing a bespoke subagent. ## Proposed scope - Allow a ReActAgent instance to be registered as an AGENT resource of a parent agent and executed as an internal subagent, with isolation and durability between parent and child. - Ensure the ReActAgent chat-model invocation, tool-execution loop, and skills compose correctly inside the internal-subagent execution scope (scope-aware runner context, isolated memory, durable call events). - Expose a ReActAgent subagent to the parent chat model as a delegation tool with a caller-facing input schema and description, so the model can route open-ended tasks to it. - Provide a documented recipe and convenience for using ReActAgent as the default general-purpose subagent, in both Java and Python. ## Acceptance criteria - A parent agent delegates a task to a ReActAgent subagent, which runs its reasoning/tool loop in an isolated, durable sub-context and returns the result to the parent. - Delegation works both caller-driven and model-driven (sub-agent as tool). - Behavior is at parity across Java and Python, with MiniCluster end-to-end coverage and docs. ## Dependencies - AGENT resource type and Subagent API (#938). - Registering an Agent as an isolated, durable subagent (internal sub-agent). - LLM invocation of subagents (sub-agent as tool). - Tracked under the Subagent umbrella #1134; background #660, #909. ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
