Load creates and returns the agent-builder team load result. The agent builder helps users create their own agent configurations interactively. Parameters: - ctx: Context for the operation - runConfig: Runtime configuration including working directory and environment - modelNameOverride: Optional m
(ctx context.Context, runConfig *config.RuntimeConfig, modelNameOverride string)
| 36 | // |
| 37 | // Returns the configured team or an error if configuration fails. |
| 38 | func Load(ctx context.Context, runConfig *config.RuntimeConfig, modelNameOverride string) (*teamloader.LoadResult, error) { |
| 39 | instructions := buildInstructions(ctx, runConfig) |
| 40 | |
| 41 | configYAML, err := buildCreatorConfigYAML(instructions) |
| 42 | if err != nil { |
| 43 | return nil, fmt.Errorf("building creator config: %w", err) |
| 44 | } |
| 45 | |
| 46 | return teamloader.LoadWithConfig( |
| 47 | ctx, |
| 48 | config.NewBytesSource("creator", configYAML), |
| 49 | runConfig, |
| 50 | append(loaderdefaults.Opts(), teamloader.WithModelOverrides([]string{modelNameOverride}))..., |
| 51 | ) |
| 52 | } |
| 53 | |
| 54 | // Agent creates and returns a team configured for the agent builder functionality. |
| 55 | func Agent(ctx context.Context, runConfig *config.RuntimeConfig, modelNameOverride string) (*team.Team, error) { |
no test coverage detected