branch: externals/ellama
commit 9fc0500936ed41b0b423eab9296b5e6a71b688d8
Author: Sergey Kostyaev <[email protected]>
Commit: Sergey Kostyaev <[email protected]>

    Add task delegation tool
    
    This adds a new `task` tool to the tool specification that allows 
delegating a
    task to a sub-agent. The tool accepts a description and a role from the
    available subagent roles, and runs asynchronously.
---
 ellama-tools.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ellama-tools.el b/ellama-tools.el
index e8ac006026..a9e27dc6d5 100644
--- a/ellama-tools.el
+++ b/ellama-tools.el
@@ -771,5 +771,14 @@ When the task is COMPLETE you MUST call `report_result` 
exactly once."
              role-key)
     nil))
 
+(ellama-tools-define-tool
+ `(:function ellama-tool-task
+             :name "task"
+             :async t
+             :description "Delegate a task to a sub-agent."
+             :args ((:name "description" :type string)
+                    (:name "role" :type string
+                           :enum ,(seq--into-vector (mapcar #'car 
ellama-subagent-roles))))))
+
 (provide 'ellama-tools)
 ;;; ellama-tools.el ends here

Reply via email to