Proposal: Handoff agent-workflow builder (agentworkflow.NewHandoffWorkflowBuilder)

Đang mở
#520 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
go
Lĩnh vực
ai, backend

Hướng nghiên cứu

Bắt đầu với docs/dotnet-go-sdk-feature-comparison.md và các builder hiện có trong workflow/agentworkflow, sau đó kiểm tra các package agent và workflow để xem phần plumbing hiện tại cho executor-graph và group-chat manager. Xem xét semantics của .NET HandoffBuilder và giải quyết các câu hỏi thiết kế được liệt kê trước khi triển khai. Được xem là hoàn tất khi đã thống nhất API và hành vi để định tuyến các cuộc hội thoại dùng chung giữa các agent, cùng với các test và tài liệu tương ứng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Gap

docs/dotnet-go-sdk-feature-comparison.md marks the agent-workflow builders as Partial: Go has NewSequentialWorkflowBuilder, NewConcurrentWorkflowBuilder, and NewGroupChatWorkflowBuilder, but the doc notes "Handoff and Magentic builders are not yet implemented." There is no handoff reference anywhere in workflow/ or agent/ today.

Handoff is the missing member of the core orchestration set and the more broadly useful of the two gaps: a triage/router agent hands control to a specialist based on the conversation; the specialist can hand back, or on to another agent.

Proposed shape (seeking design alignment before any code)

A sibling builder in workflow/agentworkflow, matching the existing builders' convention (New…WorkflowBuilder(agents ...*agent.Agent), WithName / WithDescription / WithOutputFrom, Build() (*workflow.Workflow, error)):

agentworkflow.NewHandoffWorkflowBuilder(triage).
    WithHandoff(triage, billing, refunds).
    WithHandoff(billing, triage).
    Build()

Modeled on .NET's HandoffBuilder (Microsoft.Agents.AI.Workflows): each participating agent is given handoff tools (one per allowed target); when the agent calls a handoff tool, the workflow routes the turn to that target carrying the shared conversation. Under the hood it should compose onto the existing executor graph / group-chat manager plumbing rather than introduce a new engine.

Design questions I'd want the team's steer on first

  1. Handoff surfaced as auto-injected function tools (the .NET approach), vs. an edge condition on the agent's chosen target?
  2. Reuse the group-chat manager machinery, or a dedicated handoff executor?
  3. Termination: an explicit end agent, a max-turns cap, or a "no handoff called → done" signal?
  4. Scope handoff only for this issue; track Magentic separately?

Why I'm asking first

This is a feature, not a bug fix, so I don't want to drop an unsolicited large PR that then rots. If the team is open to it and we can agree on the shape (tools-vs-edges especially), I'm happy to implement it with the same test rigor as the recent fixes, matching the .NET semantics for cross-SDK parity.

Ngôn ngữ chính
Go
Star
659
Fork
67
Merge trung bình
18 giờ 54 phút
Pull request đã merge (30 ngày)
75

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/agent-framework-go

Tất cả issue của microsoft/agent-framework-go

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.