You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b3d4f02
Browse filesBrowse the repository at this point in the historyBrowse files
feat(agents-runtime): add explicit self-send option to send tool (#4398)
## Summary
- add a `self: true` option to the send tool for sending to the current
entity
- document that agents should use `self: true` with `afterMs` to
schedule future work for themselves
- wire Horton and Worker send tools with their current entity URL
## Test
- `pnpm --dir packages/agents-runtime test --run test/send-tool.test.ts`
---------
Co-authored-by: Ilia Borovitinov <icehaunter@gmail.com>
description: `Send a message to an Electric Agent/entity by entity URL. Use afterMs to schedule delayed delivery.`,
35
+
description: `Send a message to an Electric Agent/entity. Set self: true to send to yourself; use this with afterMs to schedule future work for yourself. Otherwise provide entityUrl.`,
28
36
parameters: Type.Object({
29
-
entityUrl: Type.String({
30
-
description: `Target entity URL to send the message to.`,
31
-
}),
37
+
entityUrl: Type.Optional(
38
+
Type.String({
39
+
description: `Target entity URL to send the message to. Omit when self is true.`,
40
+
})
41
+
),
42
+
self: Type.Optional(
43
+
Type.Boolean({
44
+
description: `Send to this agent/entity. Use self: true with afterMs when scheduling future work for yourself.`,
45
+
})
46
+
),
32
47
payload: Type.Any({
33
48
description: `Message payload to deliver to the target entity.`,
34
49
}),
@@ -42,8 +57,9 @@ export function createSendTool(send: SendFn): AgentTool {
0 commit comments