Python [BREAKING]: support magentic agent tool call approvals and plan stalling HITL behavior (#2569)

* Provide way for HITL with magentic

* support tool call approvals and hitl stall replan

* human plan intervention sample

* Clean up

* Improve loging

* updates
This commit is contained in:
Evan Mattson
2025-12-04 14:13:27 +09:00
committed by GitHub
Unverified
parent 292a2078fa
commit 19ac6e57c0
11 changed files with 1152 additions and 207 deletions
@@ -48,13 +48,21 @@ async def main() -> None:
tools=HostedCodeInterpreterTool(),
)
# Create a manager agent for orchestration
manager_agent = ChatAgent(
name="MagenticManager",
description="Orchestrator that coordinates the research and coding workflow",
instructions="You coordinate a team to complete complex tasks efficiently.",
chat_client=OpenAIChatClient(),
)
print("\nBuilding Magentic Workflow...")
workflow = (
MagenticBuilder()
.participants(researcher=researcher_agent, coder=coder_agent)
.with_standard_manager(
chat_client=OpenAIChatClient(),
agent=manager_agent,
max_round_count=10,
max_stall_count=3,
max_reset_count=2,