Commit Graph

9 Commits

Author SHA1 Message Date
Ben Taylor f1d5d80c00 fix(examples): expose frontend tools to the ADK agent via AGUIToolset [OSS-561] (#6107)
## What & why

The **"Frontend Tools"** demo (`setThemeColor`) silently fails in
`examples/integrations/adk`: asking "set the theme to green" makes the
agent reply *"I can only help with proverbs or the weather"* and nothing
recolors.

**Root cause:** the ADK agent's tools are static `[set_proverbs,
get_weather]`. `ag_ui_adk` only injects a run's forwarded client tools
(the frontend-registered `setThemeColor`) into the LLM's tool set when
the agent's `tools` include an **`AGUIToolset`** placeholder — it swaps
that for a `ClientProxyToolset` wired to `input.tools`. Without it,
`gemini-2.5-flash` never sees `setThemeColor` and declines. (No
CopilotKit ADK example currently includes `AGUIToolset`, and the docs
don't mention it.)

## Change

```python
from ag_ui_adk import ADKAgent, add_adk_fastapi_endpoint, AGUIToolset
...
tools=[set_proverbs, get_weather, AGUIToolset()],
```

Agent-side only; no prompt change needed.

## Testing

Verified **live** (real Gemini key) via the identical change in
`examples/integrations/adk-angular` (same `agent/main.py` + `ag_ui_adk`
adapter): "Set the theme to green" now recolors the panel; before the
fix the agent refused. Because the fix is agent-side and
framework-agnostic, and `setThemeColor` was already confirmed forwarded
in the run body, the React `adk` frontend + this agent behaves
identically.

## Related

- Companion to CopilotKit/CopilotKit#6097 (the new `adk-angular` example
carries the same fix).
- Discovered while validating #6097 by live-comparing Angular vs React
ADK behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-08-31 07:55:10 -05:00
Mark 6294579fbc chore(examples): bump ADK starters to ag-ui-adk==0.7.0 for A2UI support 2026-07-29 00:25:04 +00:00
Mike Ryan c484312e7c fix(adk): pin working GCP resource detector 2026-07-23 10:58:45 -07:00
Benjamin Taylor ae301ffdee fix(examples): expose frontend tools to the adk agent via AGUIToolset
The 'Frontend Tools' suggestion (setThemeColor) silently failed: the agent's
tools were static [set_proverbs, get_weather], and ag_ui_adk only injects the
run's forwarded client tools when the agent's tools include an AGUIToolset
placeholder (swapped for a ClientProxyToolset wired to input.tools). Without it,
gemini-2.5-flash never sees setThemeColor and declines ('I can only help with
proverbs or the weather'). Added AGUIToolset() to expose forwarded frontend tools.

Verified live via the identical change in examples/integrations/adk-angular
(same agent main.py + ag_ui_adk): 'Set the theme to green' now recolors the
panel; previously refused. No prompt change needed.
2026-07-22 07:29:23 -05:00
Jordan Ritter f630372347 fix(examples): align starter agent Python pins to fleet standard
Bring the starter agents' Python dependency pins (pyproject.toml + uv.lock
for adk, langgraph-fastapi, langgraph-python, pydantic-ai, strands-python;
requirements.txt + docker override for crewai-crews) in line with the
showcase fleet pin standard.
2026-06-10 15:02:19 -07:00
Jordan Ritter 2482317ccc style: apply ruff format to Python codebase
320 files reformatted. One-time alignment to match the ruff format
check added to CI in #4812.
2026-05-13 23:10:35 -07:00
Jordan Ritter 65508a641d feat: add /health endpoint to all starter integration examples 2026-04-09 20:40:10 -07:00
Alem Tuzlak 79ce60c580 chore: migrate from eslint+prettier to oxlint+oxfmt
Replace eslint and prettier with oxlint and oxfmt for faster linting
and formatting across the monorepo. Remove all eslint and prettier
configs, dependencies, and related packages. Add .oxlintrc.json and
.oxfmtrc.json for the new tooling. Update CI workflows and lefthook
hooks accordingly. Reformat codebase with oxfmt.

https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
2026-04-02 16:39:05 +02:00
Jordan Ritter ec3a5ff114 feat: consolidate 47 demo repos into examples/ 2026-03-12 13:06:02 -07:00