An AgentDefinition describes a reusable subagent; a DelegationInput
describes one task for it: what to do, constraints, evidence, the expected
deliverable and when to stop. A plain string task is the same as
DelegationInput(task).
Arguments
- task
The task, as a single non-empty string.
- constraints
Constraints on the task, as a character vector.
- evidence
Sources to give the subagent: an unnamed list of lists, each with the
source_idand exactrevisionof a record passed to LeadAgent asdelegation_sources. They are not file paths or URLs.- deliverable
Optional description of the expected output.
- stop_conditions
When to stop, as a character vector. These are instructions for the model; use UsageLimits to enforce limits.
Details
constraints, evidence and stop_conditions hold up to 64 entries
each, and the whole input must be under 1 MiB. A LeadAgent also applies
its delegation_max_bytes limit, 64 KiB by default.
The object is read-only; read its fields with $. To store it, save
S7::props(x) and rebuild it with do.call(DelegationInput, record). When
reading the record from JSON, keep lists intact with
jsonlite::fromJSON(json, simplifyVector = FALSE).
Examples
DelegationInput("Review the contrast", constraints = "Preserve units")
#> <deputy::DelegationInput>
#> @ task : chr "Review the contrast"
#> @ constraints : chr "Preserve units"
#> @ evidence : list()
#> @ deliverable : NULL
#> @ stop_conditions: chr(0)
DelegationInput("Review the contrast", evidence = list(
list(source_id = "assay-17", revision = "r3")
))
#> <deputy::DelegationInput>
#> @ task : chr "Review the contrast"
#> @ constraints : chr(0)
#> @ evidence :List of 1
#> .. $ :List of 2
#> .. ..$ source_id: chr "assay-17"
#> .. ..$ revision : chr "r3"
#> @ deliverable : NULL
#> @ stop_conditions: chr(0)