Skip to content
70 changes: 47 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ the start of the entry's title.
capability…**; Added: **`task` is a reserved…**)
- In an ADK app built from configs, a sub-agent is called through `task` and
returns (no `transfer_to_agent`), seeing only its task unless
`inherit_context=True`; a synchronous tool must be safe in a worker thread
beside other calls; a prompt's `{name}` is not filled from session state.
(Changed: **ADK sub-agents are delegated…**, **On ADK, synchronous…**, **On
ADK, an agent's prompt…**)
`inherit_context=True`, and shares only the plan, the tasks and the
outside-content mark with its caller: any other session-state key an ADK
tool writes in a sub-agent run, `user:` and `app:` keys too, never
reaches the conversation; a synchronous tool must be safe in a worker
thread beside other calls; a prompt's `{name}` is not filled from session
state.
(Changed: **ADK sub-agents are delegated…**, **One `task` tool on both
backends…**, **On ADK, synchronous…**, **On ADK, an agent's prompt…**)
- On both backends a coordinator delegates with `task(agent_type=, title=,
objective=, ...)` and reads the run's envelope, a JSON object, as the
call's result: a prompt that names a sub-agent's own tool
Expand Down Expand Up @@ -610,11 +614,14 @@ the start of the entry's title.
starts, is cancelled (`"status": "cancelled"`, `"cancelled_by":
"limit"`, `"error": "time limit reached"`), the text it wrote so far its
partial result, and a question or permission prompt it waited at is
withdrawn; a model call that takes a run past its `max_tokens` and asks
for tools is its last, its calls dropped, and the run is cancelled
withdrawn; a model call that takes a run past its `max_tokens` (checked
after each of its model calls, against the run's total as its usage
record counts it: its own calls, its tools' side calls such as
web_fetch's summary, and Deep Agents' summaries of its conversation) and
asks for tools is its last, its calls dropped, and the run is cancelled
likewise (`"token limit reached"`), that answer's text its result, while
one that asks for none ends the run as it would, completed, its result
whole (a model that reports no usage is not limited by tokens).
whole (a model that reports no usage counts none of its own).
Construction refuses, with a `ValueError` naming the field, a limit that
is not a positive int (a timeout: a positive, finite number; `True` and
`False` are no numbers here) and a policy whose `limits` is not an
Expand Down Expand Up @@ -682,7 +689,8 @@ the start of the entry's title.
conversation's sub-agent runs, each followed by the runs it started:
instance, type, status (`running`, `queued` waiting for a free working
slot, `needs you` waiting on the user, `completed`, `completed (partial)`
for an answer cut at its output limit, `refused`, `failed`, `interrupted`),
for an answer cut at its output limit, `refused`, `failed`, `cancelled`,
`interrupted`),
run, title, tokens in/out (from the usage ledger, so a run still going
shows what it has used so far) and time. `/agents <id>` shows one instance
(`researcher-2`) or run (`researcher-2#1`): its type, parent and title,
Expand Down Expand Up @@ -736,12 +744,20 @@ the start of the entry's title.
brief's title, the brief's filled fields (`brief`), who started it
(`started_by`: `agent:<instance>`, `agent:root` for the main agent) and
how it runs (`mode`: `blocking`, its caller waiting for it), then, while
it works, `queued` (waiting for a free working slot), `running` (once it
has one, and once the user has answered) and `input_required` (waiting
on the user), then `completed` (`partial` for an answer cut at its output
limit), `refused`, `failed` or `interrupted`, with the first 200
characters of its result; a run fails when it cannot finish (a model call of its fails, its request no
longer fits its model's window, or its model gives no answer), and the
it works, `queued` (waiting for a free working slot: to start, or to
take its own back once the user has answered while another run works in
it), `running` (once it has one) and `input_required` (waiting on the
user), then `completed` (`partial` for an answer cut at its output
limit), `refused`, `failed`, `cancelled` (by its parent, the user or a
limit: `cancelled_by`) or `interrupted`, with the first 200
characters of its result; a run fails when it cannot finish (a model
call of its fails, its request no longer fits its model's window, or, on
ADK, its model's last reply has nothing in it and ends for a reason that
is none of stop, a refusal or the output limit, such as a malformed
function call: `<model> returned no answer`; a refused or blocked reply
ends the run `refused`, an empty one cut at the output limit `completed`
and `partial`, and a run whose model wrote no text at all completes, its
result empty), and the
sub-agent's answer is never read for success, so an answer that is JSON
saying it failed completes), the same on both backends: the framework
starts and ends every run (`workflow/agents/delegate.py`), each at its own
Expand Down Expand Up @@ -1325,9 +1341,10 @@ the start of the entry's title.
sees only the task its parent gives it; True also sees the parent's
conversation as it stands, after any summary and without the parent's
reasoning, the same way on both backends: the run starts from that
conversation, less the message that called `task`, then its task message,
which ends with a note (`agents/brief.py::INHERITED_CONTEXT_NOTE`) that the
conversation is its parent's and its task the message the note ends:
conversation (on Deep Agents less the message that called `task`, which
ADK's copy keeps), then its task message, which ends with a note
(`agents/brief.py::INHERITED_CONTEXT_NOTE`) that the conversation is its
parent's and its task the message the note ends:
without it, Claude at times answered the user's request to the
coordinator instead of its own. On ADK the conversation's events are
copied into the run's child session; on Deep Agents they are the run's
Expand Down Expand Up @@ -1627,10 +1644,16 @@ the start of the entry's title.
its result is `{"success": false, "error": ...}` naming what to fix. A
run starts from the conversation's `plan` and `tasks`, and the changes it
makes to them reach its caller's state when it returns (the status bar's
task list moves then). On ADK each sub-agent type runs on a runner of its
own over the manager's session service, on a child session of the run
(app `<app_name>--agents`, id `<conversation id>/<instance>`), which no
conversation list shows, and, an agent of its own there, its system
task list moves then). On ADK nothing else of a run's session state does
(with the outside-content mark, these are all a run and its caller
share): any other key an app's ADK tool writes in a sub-agent run stays
in the run's child session, and a `user:` or `app:` scoped one is kept
under the child app (`<app_name>--agents`), so the conversation never
sees it, where in 0.6 such keys reached the conversation; nor does a run
read the conversation's other keys. On ADK each sub-agent type runs on a
runner of its own over the manager's session service, on a child session
of the run (app `<app_name>--agents`, id `<conversation id>/<instance>`),
which no conversation list shows, and, an agent of its own there, its system
instruction gets ADK's identity line after its prompt as the root's does
(`You are an agent. Your internal name is "<name>".`, then its
description); on Deep Agents each type's graph runs apart from
Expand All @@ -1641,7 +1664,8 @@ the start of the entry's title.
"agent": "<instance>", "run": "<run id>", "status": "<status>",
"partial": <bool>, "result": "<its last text>", "error": <null or one
line>}`: a failed run's `error` is the provider's reason (where ADK said
"Dynamic node <agent> failed"), a refused run's `a model refused the
"Dynamic node <agent> failed"), its `result` the text it wrote before it
failed, a refused run's `a model refused the
request` with the refusal notice as its `result`, an interrupted run's
`interrupted before it finished`. No delegation is an error result any
more ("Error running sub-agent: …" is gone): the envelope says how the
Expand Down Expand Up @@ -2080,7 +2104,7 @@ the start of the entry's title.
longer takes over the conversation on later turns. Sub-agents see only
their task, where they saw the whole conversation (set
`inherit_context=True` for that).
`inherit_context` is for the main agent's own sub-agents in 0.7.0:
`inherit_context` is for the main agent's own sub-agents:
`validate_agent_graph` refuses it below another sub-agent, on every
backend. A prompt
that names `transfer_to_agent` should say to delegate to the agent
Expand Down
Loading
Loading