kdeps-resource-agent
v2.58.2The `agent:` resource calls a sibling agent's entire workflow within the same [agency](https://kdeps.com/agencies/) and returns that agent's `apiResponse` output. It is how one agent delegates a subtask to another specialized agent.
Usage
Built into kdeps: no install. Add it to a resource under the agent: key.
Documentation
Agent resource (delegation)
The agent: resource calls a sibling agent's entire workflow within the same agency and returns that agent's apiResponse output. It is how one agent delegates a subtask to another specialized agent.
Where it runs
Both workflow mode and agent mode. Only valid between agents bundled in the same agency.yaml - see Agencies for how agents are grouped and discover each other.
Basic usage
# resources/delegate.yaml
actionId: delegate
name: Ask the Research Agent
agent:
name: research-agent # metadata.name of the target agent in agency.yaml
params:
topic: "{{ get('q') }}"
depth: deep
# resources/respond.yaml
actionId: respond
requires: [delegate]
apiResponse:
success: true
response:
result: "{{ output('delegate') }}"
Configuration options
| Option | Description |
|---|---|
name | metadata.name of the target agent's workflow, as declared in agency.yaml (required) |
params | Key-value pairs forwarded to the target agent. The target agent reads them via get('key'), same as it would read HTTP request fields |
Output
The target agent's own apiResponse output, unchanged - whatever shape that agent returns is what output('delegate') gives you here.
See also
- Agencies - multi-agent orchestration, how agents are bundled and named
- Component resource - call a reusable resource bundle instead of a full sibling agent
- Resources overview - all resource types
Versions
| Version | Published | Status |
|---|---|---|
| 2.58.2 | 10/12/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 2.58.2
- Published
- 10/12/2026