Documentation
¶
Index ¶
- type AgentTeam
- type TeamBuilder
- func (b *TeamBuilder) AddMember(a agent.Agent, role string) *TeamBuilder
- func (b *TeamBuilder) Build(logger *zap.Logger) (*AgentTeam, error)
- func (b *TeamBuilder) WithMaxRounds(n int) *TeamBuilder
- func (b *TeamBuilder) WithMode(mode TeamMode) *TeamBuilder
- func (b *TeamBuilder) WithPlanner(enabled bool) *TeamBuilder
- func (b *TeamBuilder) WithSelectorPrompt(prompt string) *TeamBuilder
- func (b *TeamBuilder) WithTerminationFunc(fn func([]TurnRecord) bool) *TeamBuilder
- func (b *TeamBuilder) WithTimeout(d time.Duration) *TeamBuilder
- type TeamConfig
- type TeamMode
- type TurnRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentTeam ¶
type AgentTeam struct {
// contains filtered or unexported fields
}
AgentTeam implements the agent.Team interface with multiple collaboration modes.
func (*AgentTeam) Execute ¶
func (t *AgentTeam) Execute(ctx context.Context, task string, opts ...agent.TeamOption) (*agent.TeamResult, error)
Execute runs the team on the given task using the configured mode strategy.
func (*AgentTeam) Members ¶
func (t *AgentTeam) Members() []agent.TeamMember
Members returns the team's members.
type TeamBuilder ¶
type TeamBuilder struct {
// contains filtered or unexported fields
}
TeamBuilder provides a fluent API for constructing an AgentTeam.
func NewTeamBuilder ¶
func NewTeamBuilder(name string) *TeamBuilder
NewTeamBuilder creates a new TeamBuilder with sensible defaults.
func (*TeamBuilder) AddMember ¶
func (b *TeamBuilder) AddMember(a agent.Agent, role string) *TeamBuilder
AddMember adds an agent as a team member with the given role.
func (*TeamBuilder) Build ¶
func (b *TeamBuilder) Build(logger *zap.Logger) (*AgentTeam, error)
Build constructs the AgentTeam. Returns an error if validation fails.
func (*TeamBuilder) WithMaxRounds ¶
func (b *TeamBuilder) WithMaxRounds(n int) *TeamBuilder
WithMaxRounds sets the maximum number of rounds.
func (*TeamBuilder) WithMode ¶
func (b *TeamBuilder) WithMode(mode TeamMode) *TeamBuilder
WithMode sets the team collaboration mode.
func (*TeamBuilder) WithPlanner ¶
func (b *TeamBuilder) WithPlanner(enabled bool) *TeamBuilder
WithPlanner enables or disables the TaskPlanner integration (supervisor mode only).
func (*TeamBuilder) WithSelectorPrompt ¶
func (b *TeamBuilder) WithSelectorPrompt(prompt string) *TeamBuilder
WithSelectorPrompt sets the prompt prefix for selector mode.
func (*TeamBuilder) WithTerminationFunc ¶
func (b *TeamBuilder) WithTerminationFunc(fn func([]TurnRecord) bool) *TeamBuilder
WithTerminationFunc sets a custom termination function.
func (*TeamBuilder) WithTimeout ¶
func (b *TeamBuilder) WithTimeout(d time.Duration) *TeamBuilder
WithTimeout sets the execution timeout.
type TeamConfig ¶
type TeamConfig struct {
Mode TeamMode
MaxRounds int
Timeout time.Duration
EnablePlanner bool
SelectorPrompt string
TerminationFunc func(history []TurnRecord) bool
}
TeamConfig holds configuration for an AgentTeam.
type TurnRecord ¶
TurnRecord records a single turn in the team conversation.