diff --git a/AGENTS.md b/AGENTS.md index f9905dd08..419dcf105 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -80,8 +80,6 @@ cagent is a multi-agent AI system with hierarchical agent structure and pluggabl #### Agent Configuration ```yaml -version: "2" - agents: root: model: model_ref # Can be inline like "openai/gpt-4o" or reference defined models @@ -251,8 +249,6 @@ toolsets: ### Agent Hierarchy Example ```yaml -version: "2" - agents: root: model: anthropic/claude-sonnet-4-0 diff --git a/README.md b/README.md index 1b71adcfd..9743777f1 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,6 @@ Here, we're giving the same basic agent from the example above access to a Gateway: ```yaml -version: "2" - agents: root: model: openai/gpt-5-mini @@ -85,8 +83,6 @@ Here's an example similar to the above but adding `read_file` and `write_file` tools from the `rust-mcp-filesystem` MCP server: ```yaml -version: "2" - agents: root: model: openai/gpt-5-mini diff --git a/cagent-schema.json b/cagent-schema.json index 52abd00d8..ce1ee269d 100644 --- a/cagent-schema.json +++ b/cagent-schema.json @@ -9,16 +9,14 @@ "type": "string", "description": "Configuration version", "enum": [ + "0", "1", - "2", - "v1", - "v2" + "2" ], "examples": [ + "0", "1", - "2", - "v1", - "v2" + "2" ] }, "agents": { diff --git a/examples/42.yaml b/examples/42.yaml index d7e447f41..b1467cffe 100755 --- a/examples/42.yaml +++ b/examples/42.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/airbnb.yaml b/examples/airbnb.yaml index 5b6603f7c..ec5da1023 100755 --- a/examples/airbnb.yaml +++ b/examples/airbnb.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/alloy.yaml b/examples/alloy.yaml index 8c7950fd6..977239320 100755 --- a/examples/alloy.yaml +++ b/examples/alloy.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/apify.yaml b/examples/apify.yaml index 2cc118a19..49801d513 100755 --- a/examples/apify.yaml +++ b/examples/apify.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/basic_agent.yaml b/examples/basic_agent.yaml index 82dcba810..50b119541 100644 --- a/examples/basic_agent.yaml +++ b/examples/basic_agent.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/bio.yaml b/examples/bio.yaml index f4eb8ba4c..bf9aa3874 100755 --- a/examples/bio.yaml +++ b/examples/bio.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/blog.yaml b/examples/blog.yaml index c00e0a07a..11e9086ce 100755 --- a/examples/blog.yaml +++ b/examples/blog.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/code.yaml b/examples/code.yaml index ebabf3f2c..0fa0ec08b 100755 --- a/examples/code.yaml +++ b/examples/code.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/code_mode.yaml b/examples/code_mode.yaml index 9ca838b19..f1cc21fb3 100755 --- a/examples/code_mode.yaml +++ b/examples/code_mode.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/contradict.yaml b/examples/contradict.yaml index d03a36521..1b6daf329 100755 --- a/examples/contradict.yaml +++ b/examples/contradict.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/couchbase_agent.yaml b/examples/couchbase_agent.yaml index 53f2ae95e..5433100ff 100644 --- a/examples/couchbase_agent.yaml +++ b/examples/couchbase_agent.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run agents: root: diff --git a/examples/dev-team.yaml b/examples/dev-team.yaml index 01c82f454..6bc8be401 100755 --- a/examples/dev-team.yaml +++ b/examples/dev-team.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" models: model: diff --git a/examples/dhi/dhi.yaml b/examples/dhi/dhi.yaml index 3e66a28fd..87b667d49 100755 --- a/examples/dhi/dhi.yaml +++ b/examples/dhi/dhi.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/diag.yaml b/examples/diag.yaml index 500d0c19f..38552ef60 100755 --- a/examples/diag.yaml +++ b/examples/diag.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/dmr.yaml b/examples/dmr.yaml index d5340e276..658e8e009 100755 --- a/examples/dmr.yaml +++ b/examples/dmr.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/doc_generator.yaml b/examples/doc_generator.yaml index 1c764449d..0cc7e3d96 100755 --- a/examples/doc_generator.yaml +++ b/examples/doc_generator.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/echo-agent.yaml b/examples/echo-agent.yaml index 7de1e1e8b..f595f913b 100755 --- a/examples/echo-agent.yaml +++ b/examples/echo-agent.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" metadata: readme: | diff --git a/examples/env_placeholders.yaml b/examples/env_placeholders.yaml index 510376c95..d09a66a2d 100644 --- a/examples/env_placeholders.yaml +++ b/examples/env_placeholders.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" # Example demonstrating environment variable placeholder expansion in commands # diff --git a/examples/fetch_docker.yaml b/examples/fetch_docker.yaml index b998a039c..77791edaf 100644 --- a/examples/fetch_docker.yaml +++ b/examples/fetch_docker.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/filesystem.yaml b/examples/filesystem.yaml index 48531d16e..8a2095ea3 100644 --- a/examples/filesystem.yaml +++ b/examples/filesystem.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run agents: root: diff --git a/examples/finance.yaml b/examples/finance.yaml index 18d4abcc1..217612dd9 100755 --- a/examples/finance.yaml +++ b/examples/finance.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/github-toon.yaml b/examples/github-toon.yaml index 4a8958806..481f9a153 100644 --- a/examples/github-toon.yaml +++ b/examples/github-toon.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/github.yaml b/examples/github.yaml index 2a3408a41..f4201dcc0 100755 --- a/examples/github.yaml +++ b/examples/github.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/github_issue_manager.yaml b/examples/github_issue_manager.yaml index 453510153..0be1f36c9 100644 --- a/examples/github_issue_manager.yaml +++ b/examples/github_issue_manager.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run models: claude: diff --git a/examples/go_packages.yaml b/examples/go_packages.yaml index cf7184e66..625b2a39a 100644 --- a/examples/go_packages.yaml +++ b/examples/go_packages.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/gopher.yaml b/examples/gopher.yaml index b7fe639e6..626e2c4d6 100755 --- a/examples/gopher.yaml +++ b/examples/gopher.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/grok.yaml b/examples/grok.yaml index 2d656e660..c4dcce482 100644 --- a/examples/grok.yaml +++ b/examples/grok.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run agents: root: diff --git a/examples/haiku.yaml b/examples/haiku.yaml index 9cb3fe589..b69d7638e 100755 --- a/examples/haiku.yaml +++ b/examples/haiku.yaml @@ -1,5 +1,4 @@ -#!/usr/bin/env cagent exec -version: "2" +#!/usr/bin/env cagent run agents: root: diff --git a/examples/image_text_extractor.yaml b/examples/image_text_extractor.yaml index d29faa065..475a7420e 100644 --- a/examples/image_text_extractor.yaml +++ b/examples/image_text_extractor.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run models: gpt4_vision: diff --git a/examples/k8s_debugger.yaml b/examples/k8s_debugger.yaml index 28db69c2f..83981a8ea 100644 --- a/examples/k8s_debugger.yaml +++ b/examples/k8s_debugger.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/mcp_generator.yaml b/examples/mcp_generator.yaml index 73ce457ac..8aed58522 100755 --- a/examples/mcp_generator.yaml +++ b/examples/mcp_generator.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/mem.yaml b/examples/mem.yaml index 849ed4c9f..34fb92f2b 100755 --- a/examples/mem.yaml +++ b/examples/mem.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/mistral.yaml b/examples/mistral.yaml index 0a0348d81..8c076a885 100644 --- a/examples/mistral.yaml +++ b/examples/mistral.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/moby.yaml b/examples/moby.yaml index ded364e92..69d14f329 100755 --- a/examples/moby.yaml +++ b/examples/moby.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/multi-code.yaml b/examples/multi-code.yaml index 57fd32112..d348a2593 100755 --- a/examples/multi-code.yaml +++ b/examples/multi-code.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/nebius.yaml b/examples/nebius.yaml index aa93f450f..3138d43b5 100644 --- a/examples/nebius.yaml +++ b/examples/nebius.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run agents: root: diff --git a/examples/notion-expert.yaml b/examples/notion-expert.yaml index ae3c897b4..ddea875cf 100644 --- a/examples/notion-expert.yaml +++ b/examples/notion-expert.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/pirate.yaml b/examples/pirate.yaml index f08805a42..e2f4ddaea 100755 --- a/examples/pirate.yaml +++ b/examples/pirate.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/post_edit.yaml b/examples/post_edit.yaml index f7a301b26..1f8c4a45c 100644 --- a/examples/post_edit.yaml +++ b/examples/post_edit.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/professional/professional_writing_agent.yaml b/examples/professional/professional_writing_agent.yaml index a3dab35ad..d6ec85c23 100644 --- a/examples/professional/professional_writing_agent.yaml +++ b/examples/professional/professional_writing_agent.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run models: claude: diff --git a/examples/pythonist.yaml b/examples/pythonist.yaml index 71c14514f..3c7d2cef3 100755 --- a/examples/pythonist.yaml +++ b/examples/pythonist.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/review.yaml b/examples/review.yaml index 78399c832..9bf17744b 100755 --- a/examples/review.yaml +++ b/examples/review.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/script_shell.yaml b/examples/script_shell.yaml index a66c8c9b0..ed2f7be14 100644 --- a/examples/script_shell.yaml +++ b/examples/script_shell.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/search.yaml b/examples/search.yaml index 0c71ed460..9f6ba7d91 100755 --- a/examples/search.yaml +++ b/examples/search.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/shared-todo.yaml b/examples/shared-todo.yaml index 579c337ad..7e7ffe171 100755 --- a/examples/shared-todo.yaml +++ b/examples/shared-todo.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/shell.yaml b/examples/shell.yaml index d89385b62..2d799d31e 100755 --- a/examples/shell.yaml +++ b/examples/shell.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/silvia.yaml b/examples/silvia.yaml index a259dd3e6..ec071abf8 100755 --- a/examples/silvia.yaml +++ b/examples/silvia.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/structured-output.yaml b/examples/structured-output.yaml index ac48005a5..3fe58e8e5 100644 --- a/examples/structured-output.yaml +++ b/examples/structured-output.yaml @@ -1,4 +1,4 @@ -version: "2" +#!/usr/bin/env cagent run models: gpt4_structured: diff --git a/examples/thinking_budget.yaml b/examples/thinking_budget.yaml index fb5034209..3cbd7f0a0 100644 --- a/examples/thinking_budget.yaml +++ b/examples/thinking_budget.yaml @@ -3,8 +3,6 @@ # Run the demo command with: # cagent run thinking_budget.yaml -c demo -version: "2" - agents: root: model: gpt-5-mini-min # <- try with gpt-5-mini-high diff --git a/examples/todo.yaml b/examples/todo.yaml index e971ec92d..9ecdb3d0c 100755 --- a/examples/todo.yaml +++ b/examples/todo.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/typo.yaml b/examples/typo.yaml index e5227a4f3..3836e3466 100644 --- a/examples/typo.yaml +++ b/examples/typo.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/examples/writer.yaml b/examples/writer.yaml index 8cc86644a..7739868c2 100755 --- a/examples/writer.yaml +++ b/examples/writer.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/golang_developer.yaml b/golang_developer.yaml index d869aeba8..45bf0c859 100755 --- a/golang_developer.yaml +++ b/golang_developer.yaml @@ -1,5 +1,4 @@ #!/usr/bin/env cagent run -version: "2" agents: root: diff --git a/pkg/config/config.go b/pkg/config/config.go index 1c4bf55a3..e5c87414b 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -11,7 +11,8 @@ import ( v0 "github.com/docker/cagent/pkg/config/v0" v1 "github.com/docker/cagent/pkg/config/v1" - latest "github.com/docker/cagent/pkg/config/v2" + latest "github.com/docker/cagent/pkg/config/v2" //nolint:staticcheck // This is used everywhere we reference the latest version + v2 "github.com/docker/cagent/pkg/config/v2" //nolint:staticcheck // This is used for migrations to v2 "github.com/docker/cagent/pkg/environment" "github.com/docker/cagent/pkg/filesystem" ) @@ -32,11 +33,14 @@ func LoadConfig(path string, fs filesystem.FS) (*latest.Config, error) { } var raw struct { - Version any `yaml:"version"` + Version string `yaml:"version,omitempty"` } if err := yaml.UnmarshalWithOptions(data, &raw); err != nil { return nil, fmt.Errorf("looking for version in config file %s\n%s", path, yaml.FormatError(err, true, true)) } + if raw.Version == "" { + raw.Version = latest.Version + } oldConfig, err := parseCurrentVersion(data, raw.Version) if err != nil { @@ -48,6 +52,8 @@ func LoadConfig(path string, fs filesystem.FS) (*latest.Config, error) { return nil, fmt.Errorf("migrating config: %w", err) } + config.Version = raw.Version + if err := validateConfig(&config); err != nil { return nil, err } @@ -75,22 +81,24 @@ func CheckRequiredEnvVars(ctx context.Context, cfg *latest.Config, env environme return nil } -func parseCurrentVersion(data []byte, version any) (any, error) { +func parseCurrentVersion(data []byte, version string) (any, error) { options := []yaml.DecodeOption{yaml.Strict()} switch version { - case nil, "0", 0: + case v0.Version: var cfg v0.Config err := yaml.UnmarshalWithOptions(data, &cfg, options...) return cfg, err - case "1", 1: + case v1.Version: var cfg v1.Config err := yaml.UnmarshalWithOptions(data, &cfg, options...) return cfg, err - default: - var cfg latest.Config + case v2.Version: + var cfg v2.Config err := yaml.UnmarshalWithOptions(data, &cfg, options...) return cfg, err + default: + return nil, fmt.Errorf("unsupported config version: %v", version) } } diff --git a/pkg/config/examples_test.go b/pkg/config/examples_test.go index f4741eee9..a9bf19bfa 100644 --- a/pkg/config/examples_test.go +++ b/pkg/config/examples_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/xeipuuv/gojsonschema" + latest "github.com/docker/cagent/pkg/config/v2" "github.com/docker/cagent/pkg/filesystem" "github.com/docker/cagent/pkg/modelsdev" ) @@ -45,7 +46,7 @@ func TestParseExamples(t *testing.T) { cfg, err := LoadConfig(file, filesystem.AllowAll) require.NoError(t, err) - require.Equal(t, "2", cfg.Version, "Version should be 2 in %s", file) + require.Equal(t, latest.Version, cfg.Version, "Version should be %d in %s", latest.Version, file) require.NotEmpty(t, cfg.Agents["root"].Description, "Description should not be empty in %s", file) require.NotEmpty(t, cfg.Agents["root"].Instruction, "Instruction should not be empty in %s", file) diff --git a/pkg/config/testdata/commands_v0.yaml b/pkg/config/testdata/commands_v0.yaml index 54a08503e..b6e702efa 100644 --- a/pkg/config/testdata/commands_v0.yaml +++ b/pkg/config/testdata/commands_v0.yaml @@ -1,5 +1,6 @@ -agents: +version: "0" +agents: root: model: openai/gpt-4o instruction: you are a helpful computer assistant diff --git a/pkg/config/testdata/memory_v0.yaml b/pkg/config/testdata/memory_v0.yaml index ca61b741c..2ff067d80 100755 --- a/pkg/config/testdata/memory_v0.yaml +++ b/pkg/config/testdata/memory_v0.yaml @@ -1,3 +1,5 @@ +version: "0" + agents: root: model: gpt diff --git a/pkg/config/testdata/provider_v0.yaml b/pkg/config/testdata/provider_v0.yaml index bb4f98167..f0c7a2289 100644 --- a/pkg/config/testdata/provider_v0.yaml +++ b/pkg/config/testdata/provider_v0.yaml @@ -1,3 +1,5 @@ +version: "0" + agents: root: model: gpt diff --git a/pkg/config/testdata/shared_todo_v0.yaml b/pkg/config/testdata/shared_todo_v0.yaml index 74996c400..c9cef7742 100755 --- a/pkg/config/testdata/shared_todo_v0.yaml +++ b/pkg/config/testdata/shared_todo_v0.yaml @@ -1,3 +1,5 @@ +version: "0" + agents: root: model: gpt diff --git a/pkg/config/testdata/think_v0.yaml b/pkg/config/testdata/think_v0.yaml index 9b992a669..0b09ac018 100755 --- a/pkg/config/testdata/think_v0.yaml +++ b/pkg/config/testdata/think_v0.yaml @@ -1,3 +1,5 @@ +version: "0" + agents: root: model: gpt diff --git a/pkg/config/testdata/todo_v0.yaml b/pkg/config/testdata/todo_v0.yaml index 7728fe3ec..b9a9e2328 100755 --- a/pkg/config/testdata/todo_v0.yaml +++ b/pkg/config/testdata/todo_v0.yaml @@ -1,3 +1,5 @@ +version: "0" + agents: root: model: gpt diff --git a/pkg/config/v0/types.go b/pkg/config/v0/types.go index d967af261..630ce7989 100644 --- a/pkg/config/v0/types.go +++ b/pkg/config/v0/types.go @@ -6,6 +6,8 @@ import ( "github.com/docker/cagent/pkg/config/types" ) +const Version = "0" + // Toolset represents a tool configuration type Toolset struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` @@ -111,7 +113,8 @@ type ModelConfig struct { // Config represents the entire configuration file type Config struct { - Agents map[string]AgentConfig `json:"agents,omitempty" yaml:"agents,omitempty"` - Models map[string]ModelConfig `json:"models,omitempty" yaml:"models,omitempty"` - Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"` + Version string `json:"version,omitempty"` + Agents map[string]AgentConfig `json:"agents,omitempty" yaml:"agents,omitempty"` + Models map[string]ModelConfig `json:"models,omitempty" yaml:"models,omitempty"` + Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"` } diff --git a/pkg/config/v1/types.go b/pkg/config/v1/types.go index 939a449ee..dd5d52069 100644 --- a/pkg/config/v1/types.go +++ b/pkg/config/v1/types.go @@ -7,6 +7,8 @@ import ( "github.com/docker/cagent/pkg/config/types" ) +const Version = "1" + // ScriptShellToolConfig represents a custom shell tool configuration type ScriptShellToolConfig struct { Cmd string `json:"cmd" yaml:"cmd"` diff --git a/pkg/config/v2/types.go b/pkg/config/v2/types.go index bd377e0dd..19b6f1121 100644 --- a/pkg/config/v2/types.go +++ b/pkg/config/v2/types.go @@ -1,8 +1,8 @@ package v2 -import ( - "github.com/docker/cagent/pkg/config/types" -) +import "github.com/docker/cagent/pkg/config/types" + +const Version = "2" // Config represents the entire configuration file type Config struct { diff --git a/pkg/creator/agent.go b/pkg/creator/agent.go index c487cf4ea..8c58236ef 100644 --- a/pkg/creator/agent.go +++ b/pkg/creator/agent.go @@ -176,7 +176,6 @@ func Agent(ctx context.Context, baseDir string, runConfig config.RuntimeConfig, suggestedMaxTokens = 16000 } instructions += fmt.Sprintf(` - version: "2" models: %s: provider: %s diff --git a/pkg/creator/instructions.txt b/pkg/creator/instructions.txt index 8af1e9d63..b2562ffd3 100644 --- a/pkg/creator/instructions.txt +++ b/pkg/creator/instructions.txt @@ -14,11 +14,7 @@ A yaml file contains everyting needed to run a team of agents: If you are making a team of agents you should make one `root` agent whose job is to delegate tasks to its subagents -Important: always include top level `version: "2"` - ```yaml -version: "2" - agents: agent_name: model: string # Model reference @@ -46,8 +42,6 @@ The todo, memory, and script tools can be configured: Todos can be shared between different agents in a team ``` -version: "2" - agents: root: ... @@ -59,8 +53,6 @@ agents: Memory needs a path to the sqlite database file ``` -version: "2" - agents: root: ... @@ -72,8 +64,6 @@ agents: Script tools allow you to define custom shell commands with typed parameters: ``` -version: "2" - agents: root: ... @@ -126,8 +116,6 @@ Note: Arguments are substituted as environment variables in the command using $V Example of using the `youtube_transcript` MCP server, from the docker MCP Catalog, using the docker MCP Gateway: ```yaml -version: "2" - agents: root: ... @@ -156,8 +144,6 @@ docker mcp server inspect Multiple MCP Servers can be configured when multiple tools are useful. ```yaml -version: "2" - agents: root: ... @@ -173,8 +159,6 @@ agents: ### Model Configuration ```yaml -version: "2" - models: model_name: provider: string # Provider: openai, anthropic, dmr