8 Commits

Author SHA1 Message Date
George Weale d92bb42ccf fix(samples): make the human-in-the-loop sample respect the human's decision
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 960963424
2026-08-07 09:14:45 -07:00
Haran Rajkumar d86ae20c6a feat(samples): add ManagedAgent create-and-use custom-agent sample
Add a self-contained ManagedAgent sample that provisions a custom managed-agent
resource (custom persona + server-side google_search) via `--create` / `--delete`
CLI flags, reusing the genai client on `ManagedAgent.api_client`, then drives it
with `adk web` / `adk run`.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 954729930
2026-07-27 11:16:08 -07:00
Haran Rajkumar 597fac3a4f docs(agents): add system-instruction sample and guide section
Add a runnable sample under
contributing/samples/managed_agent/system_instruction demonstrating the new
ManagedAgent.instruction field, and document the field in the ManagedAgent
guide.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 951709300
2026-07-21 14:46:43 -07:00
Haran Rajkumar cc444b6cbf docs(samples): add ManagedAgent remote MCP (Maps Grounding Lite) sample
Add a runnable sample wiring `ManagedAgent` to the Maps Grounding Lite MCP
server via `RemoteMcpServer`, with a `header_provider` callback that reads
`GOOGLE_MAPS_API_KEY` and sends it as the `X-Goog-Api-Key` header. Demonstrates
server-side remote MCP execution with runtime header minting.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 947137422
2026-07-13 11:07:40 -07:00
Haran Rajkumar 57e1ba66ee docs(samples): Add ManagedAgent single-turn sub-agent sample
Add a runnable sample under contributing/samples/managed_agent/single_turn
showing a local LlmAgent coordinator that calls two server-backed ManagedAgent
specialists (server-side google_search and code execution) as single-turn
sub-agents (mode='single_turn'). ADK auto-wraps each single-turn sub-agent as an
inline tool, so the coordinator stays in control and can call both specialists
within one turn; unlike AgentTool, the specialists' internal events are
preserved in the shared session. The sample exposes a root_agent in agent.py and
ships a README covering setup and example prompts.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 945969891
2026-07-10 17:32:20 -07:00
Haran Rajkumar 3834c0bdb6 docs(samples): Link ManagedAgent sample READMEs to the guide
Point the basic and code-execution managed_agent sample READMEs at the common
ManagedAgent guide for setup, authentication, backends, and background, now that
that general content is consolidated in the guide.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 944601306
2026-07-08 11:18:08 -07:00
Haran Rajkumar 527e3c1089 docs(samples): Add ManagedAgent code-execution sample
Add a runnable sample under contributing/samples/managed_agent/code_execution
showing how to use ManagedAgent with the server-side code execution tool. Since
ManagedAgent has no code_executor field, code execution is enabled by passing the
raw types.Tool(code_execution=types.ToolCodeExecution()) config in tools. The
sample exposes a root_agent in agent.py and ships a README plus a matching
single-turn live integration test that verifies a code-executed prime-sum
computation.

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 943548907
2026-07-06 16:15:37 -07:00
Haran Rajkumar 969909f2ba docs(samples): Add ManagedAgent sample using server-side google_search
Add a runnable sample under contributing/samples/managed_agent/basic showing how
to use ManagedAgent (backed by the Managed Agents API) with the server-side
google_search tool, mirroring the live integration test flow. The sample
exposes a root_agent in agent.py and ships a README covering the required
enterprise/ADC setup and example prompts (including a multi-turn follow-up that
reuses the recovered remote sandbox).

Co-authored-by: Haran Rajkumar <haranrk@google.com>
PiperOrigin-RevId: 943536117
2026-07-06 15:48:57 -07:00