summaryrefslogtreecommitdiff
path: root/internal/agentloop/tools.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/agentloop/tools.go')
-rw-r--r--internal/agentloop/tools.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/agentloop/tools.go b/internal/agentloop/tools.go
index fcb17a2..fc003cb 100644
--- a/internal/agentloop/tools.go
+++ b/internal/agentloop/tools.go
@@ -52,6 +52,7 @@ func agentToolSpecs() []provider.ToolSpec {
"instructions": strProp("complete instructions for the subtask agent"),
"model": strProp("optional model override"),
"max_budget_usd": map[string]any{"type": "number", "description": "optional budget cap in USD"},
+ "role": strProp("optional role name to dispatch the subtask through instead of a fixed model (e.g. an evaluator role); when set, model is ignored and the role's escalation ladder picks the provider/model"),
},
"required": []string{"name", "instructions"},
},
@@ -153,6 +154,7 @@ func (l *Loop) dispatchTool(ctx context.Context, name, argsJSON string) (result
Instructions string `json:"instructions"`
Model string `json:"model"`
MaxBudgetUSD float64 `json:"max_budget_usd"`
+ Role string `json:"role"`
}
_ = json.Unmarshal([]byte(argsJSON), &a)
id, ssErr := l.Channel.SpawnSubtask(ctx, agentchannel.SubtaskSpec{
@@ -160,6 +162,7 @@ func (l *Loop) dispatchTool(ctx context.Context, name, argsJSON string) (result
Instructions: a.Instructions,
Model: a.Model,
MaxBudgetUSD: a.MaxBudgetUSD,
+ Role: a.Role,
})
if ssErr != nil {
return "", false, ssErr