@aramisfa/openclaw-a2a-outbound 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +268 -17
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +224 -10
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +37 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -20
- package/dist/index.js.map +1 -1
- package/dist/request-normalization.d.ts +23 -0
- package/dist/request-normalization.d.ts.map +1 -0
- package/dist/request-normalization.js +109 -0
- package/dist/request-normalization.js.map +1 -0
- package/dist/result-shape.d.ts +68 -25
- package/dist/result-shape.d.ts.map +1 -1
- package/dist/result-shape.js +192 -59
- package/dist/result-shape.js.map +1 -1
- package/dist/schemas.d.ts +81 -779
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +308 -275
- package/dist/schemas.js.map +1 -1
- package/dist/sdk-client-pool.d.ts +8 -4
- package/dist/sdk-client-pool.d.ts.map +1 -1
- package/dist/sdk-client-pool.js +21 -1
- package/dist/sdk-client-pool.js.map +1 -1
- package/dist/service.d.ts +33 -4
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +381 -60
- package/dist/service.js.map +1 -1
- package/dist/target-catalog.d.ts +66 -0
- package/dist/target-catalog.d.ts.map +1 -0
- package/dist/target-catalog.js +309 -0
- package/dist/target-catalog.js.map +1 -0
- package/dist/task-handle-registry.d.ts +29 -0
- package/dist/task-handle-registry.d.ts.map +1 -0
- package/dist/task-handle-registry.js +141 -0
- package/dist/task-handle-registry.js.map +1 -0
- package/openclaw.plugin.json +69 -2
- package/package.json +2 -1
- package/skills/remote-agent/SKILL.md +93 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remote-agent
|
|
3
|
+
description: Delegate work to external A2A agents using the remote_agent tool.
|
|
4
|
+
metadata: {"openclaw": {"requires": {"config": ["plugins.entries.openclaw-a2a-outbound.enabled"]}}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Remote Agent Delegation
|
|
8
|
+
|
|
9
|
+
Use the `remote_agent` tool to delegate work to external A2A-compatible agents and manage delegated tasks.
|
|
10
|
+
|
|
11
|
+
## When to delegate
|
|
12
|
+
|
|
13
|
+
Delegate when:
|
|
14
|
+
|
|
15
|
+
- The task requires capabilities you do not have (e.g. code execution, web search, domain-specific APIs)
|
|
16
|
+
- The user explicitly asks to send work to an external agent
|
|
17
|
+
- A configured target agent is better suited for the request
|
|
18
|
+
|
|
19
|
+
Do not delegate when you can handle the request directly.
|
|
20
|
+
|
|
21
|
+
## Tool
|
|
22
|
+
|
|
23
|
+
The `remote_agent` tool exposes five actions: `list_targets`, `send`, `watch`, `status`, `cancel`.
|
|
24
|
+
|
|
25
|
+
## Choosing a target
|
|
26
|
+
|
|
27
|
+
Call `list_targets` first to discover available agents. Prefer `target_alias` over `target_url` — aliases are stable names configured by the user. If a default target is configured, you can omit `target_alias` from `send`.
|
|
28
|
+
|
|
29
|
+
## Actions
|
|
30
|
+
|
|
31
|
+
### list_targets
|
|
32
|
+
|
|
33
|
+
Discover configured targets.
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{ "action": "list_targets" }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### send
|
|
40
|
+
|
|
41
|
+
Send a request to a remote agent.
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"action": "send",
|
|
46
|
+
"target_alias": "my-agent",
|
|
47
|
+
"input": "Summarize the latest quarterly report.",
|
|
48
|
+
"follow_updates": true
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- `input` (required): the user text to send.
|
|
53
|
+
- `target_alias`: configured target name. Omit when a default target exists.
|
|
54
|
+
- `follow_updates`: when `true`, streams updates and returns the full event log.
|
|
55
|
+
- `attachments`: optional array of file or data attachments.
|
|
56
|
+
|
|
57
|
+
### status
|
|
58
|
+
|
|
59
|
+
Poll the current state of a delegated task.
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{ "action": "status", "task_handle": "rah_abc123" }
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### watch
|
|
66
|
+
|
|
67
|
+
Subscribe to live updates from a running task.
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{ "action": "watch", "task_handle": "rah_abc123" }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### cancel
|
|
74
|
+
|
|
75
|
+
Cancel a running task.
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{ "action": "cancel", "task_handle": "rah_abc123" }
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Task handles
|
|
82
|
+
|
|
83
|
+
After a successful `send`, the result includes a `task_handle` (prefixed `rah_`). Always prefer `task_handle` over `target_alias + task_id` for follow-up actions — the handle encodes the target and task identity in one opaque token. Handles are process-local and expire after restart or TTL. If a handle expires, fall back to `target_alias` + `task_id`.
|
|
84
|
+
|
|
85
|
+
## watch vs status
|
|
86
|
+
|
|
87
|
+
Use `watch` when the remote agent supports streaming and you want live incremental updates. Use `status` to poll a snapshot of the current task state. If you are unsure whether the target supports streaming, start with `status`.
|
|
88
|
+
|
|
89
|
+
## Errors
|
|
90
|
+
|
|
91
|
+
- `UNKNOWN_TASK_HANDLE` — the handle is expired or invalid. Retry with `target_alias` + `task_id`, or re-send.
|
|
92
|
+
- `TARGET_RESOLUTION_ERROR` — the alias or URL did not resolve. Call `list_targets` to check available targets.
|
|
93
|
+
- `VALIDATION_ERROR` — invalid parameters. Check required fields for the action.
|