]> git.giacomolli.uk - onechat/blobdiff - agent.go
Deliver routed WhatsApp batches to children
[onechat] / agent.go
index 9a85426382c900f69e9b6d1aaf4493d2fe9d71d3..dbcabd24321ffc33ed4607a00159239d598786b9 100644 (file)
--- a/agent.go
+++ b/agent.go
@@ -107,12 +107,12 @@ func (a *Agent) Prompt() (string, error) {
 }
 
 // Tools returns the tools shared by the turns and compactions of this agent. A
-// child has neither WhatsApp tools nor child creation.
+// child has no WhatsApp, child creation, or route tools.
 func (a *Agent) Tools() []ModelTool {
        tools := promptTools()
        if a.config.Parent != "" {
                tools = slices.DeleteFunc(tools, func(tool ModelTool) bool {
-                       return strings.HasPrefix(tool.Name, "whatsapp_") || tool.Name == "agent_create"
+                       return strings.HasPrefix(tool.Name, "whatsapp_") || tool.Name == "agent_create" || tool.Name == "route" || tool.Name == "unroute" || tool.Name == "routes"
                })
        }