Add a `task_completed` function to the agent so when a model finished the task, it can send a signal and the program knows it can go to next agent.
This cl include:
* Implements the `_run_live_impl` in `sequential_agent` so it can handle live case.
* Add an example for sequential agent.
* Improve error message for unimplemented _run_live_impl in other agents.
Note:
1. Compared to non-live case, live agents process a continuous streams of audio
or video, so it doesn't have a native way to tell if it's finished and should pass
to next agent or not. So we introduce a task_compelted() function so the
model can call this function to signal that it's finished the task and we
can move on to next agent.
2. live agents doesn't seems to be very useful or natural in parallel or loop agents so we don't implement it for now. If there is user demand, we can implement it easily using similar approach.
PiperOrigin-RevId: 758315430
The old implementation:
1. We only started transcription at the beginning of agent transferring.
2. The transcription service we used is not as good / fast as the model/native transcription.
In the current implementation, the live agent will rely on the llm's transcription, instead of our transcription when llm support audio transcription in the input. And in that case, the live agent won't use our own audio transcriber. This reduces the latency from 5secs to 2 secs during agent transferring. It also improves the transcription quality.
When the llm doesn't support audio transcription, we still use our audio transcriber to transcribe audio input.
PiperOrigin-RevId: 758296647
Details:
- Add a in-memory SpanExporter to capture all trace information.
- Add /debug/trace/session/{session_id} endpoint to retrieve traces from the in-memory exporter.
- Add Session ID in Telemetry spans.
PiperOrigin-RevId: 757984565
--
d481e0604a79470e2c1308827b3ecb78bfb5327e by Alan B <alan@nerds.ai>:
feat: 🚧 catch user transcription
--
bba436bb76d1d2f9d5ba969fce38ff8b8a443254 by Alan B <alan@nerds.ai>:
feat: ✨ send user transcription event as llm_response
--
ad2abf540c60895b79c50f9051a6289ce394b98d by Alan B <death1027@outlook.com>:
style: 💄 update lint problems
--
744703c06716300c0f9f41633d3bafdf4cb180a1 by Hangfei Lin <hangfeilin@gmail.com>:
fix: set right order for input transcription
--
31a5d42d6155b0e5caad0c73c8df43255322016f by Hangfei Lin <hangfeilin@gmail.com>:
remove print
--
59e5d9c72060f97d124883150989315401a4c1b5 by Hangfei Lin <hangfeilin@gmail.com>:
remove api version
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/590 from BloodBoy21:feat/api-version-vertex 1ed855249cae398b40691b91c6e468bccec07a3a
PiperOrigin-RevId: 757840099
--
84abc07d2342e88e601949faa67a3014c0f491e8 by mukundjha-mj <mukundjha204@gmail.com>:
Fix spelling mistakes, reorder sections, and improve readability in pyproject.toml
--
122c19d4be0fad394fbd02720734aa4625877637 by mukundjha-mj <mukundjha204@gmail.com>:
fix(pyproject): correct spelling and reorder config sections for clarity
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/669 from mukundjha-mj:fix/typos-pyproject 122c19d4be0fad394fbd02720734aa4625877637
PiperOrigin-RevId: 757318920
Copybara import of the project:
--
ade1d98e030a966183f56cb5c9c1b04cf51f5337 by Thiago Neves <thiagohneves@gmail.com>:
fix(tests): use mock GCS client in artifact service tests to avoid real credentials
--
becd2925feebf60196129b029a0ab8d490f7b19e by Thiago Neves <thiagohneves@gmail.com>:
test(agents): add unit tests for live_request_queue, readonly_context, and run_config
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/641 from thiagoneves:feature/increase-test-coverage 0f7a9fc55d97902e190a394f099324fbeb1541af
PiperOrigin-RevId: 756798390
Copybara import of the project:
--
f60707a22905f30040808b41b7e3510a47a80fc6 by K <51281148+K-dash@users.noreply.github.com>:
test(cli): Add unit tests for CLI functionality
This commit introduces unit tests for the following CLI-related components:
- cli_deploy.py: Tests for the cloud deployment feature.
- cli_create.py: Tests for the agent creation feature.
- cli.py: Tests for the main CLI execution logic.
- cli_tools_click.py: Tests for the Click-based CLI tools.
--
7be2159a475d0785619fea5e40c70e6461a7f4e1 by K <51281148+K-dash@users.noreply.github.com>:
fix test_cli_eval_success_path
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/577 from K-dash:test/add-unit-tests-for-cli 69f12d3a27d9c50a46ef269075e050f498dee67a
PiperOrigin-RevId: 756602765
(before/after) tool callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.
PiperOrigin-RevId: 756526507
--
0723b0915550a0af9d1eb2952ee193238eee8178 by Thiago Neves <thiagohneves@gmail.com>:
fix(tests): use mock GCS client in artifact service tests to avoid real credentials
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/601 from thiagoneves:fix/mock-gcs-client-in-tests e7d16719b9c3116b652988d2ed1b1f8893686f3e
PiperOrigin-RevId: 756381115
Copybara import of the project:
--
a4a998d5418af47a4f263823810e8ab85a9ae4d6 by 魏超 <nneverwei@gmail.com>:
fix(cli): Disable auto-reload feature on Windows system
Fixed the issue caused by the auto-reload feature when running the CLI tool on Windows system. By detecting the operating system type, the auto-reload is disabled on Windows system to avoid potential errors: When mcp is asynchronously loaded, it will enter the _make_subprocess_transport NotImplementedError logic due to uvicorn reload=True in fastapi.
--
46c9bb600e4530d3f9c22369c4a99774efa024c9 by 魏超 <nneverwei@gmail.com>:
add an option in the CLI to enable or disable the reload feature. So users(esp. windows) can disable this if they come across the '_make_subprocess_transport NotImplementedError' bug on windows.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/415 from nneverwei:win-subprocess-NotImplError-with-mcp fbb9ab03350bb0a98769cf1a4cf930983ba9fa78
PiperOrigin-RevId: 756360981
(before/after) agent callbacks are invoked throughout the provided chain until one callback does not return None. Callbacks can be async and sync.
PiperOrigin-RevId: 756359693
--session_id : The session ID to save the session to on exit when --save_session is set to true. User will be prompted to enter a session ID if not set.
PiperOrigin-RevId: 756335619
--
5eabc6c1fe339e87637b9ed6d0516a3edcbcb060 by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix readme pip install
--
bb21018aea7a4b8d8a60e6ef42b084dae51d7845 by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: added build and local testing command
--
aa1f2305b098b79480eab9ab37b744d0273a5fcf by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: added example
--
69b649d81e6757d6305c481e3415ec8f017a75ac by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: updated the windows command
--
bd5202308bf08b9b44099c4cd016af23f2e2350e by kavinkumarbaskar <kavinkumarbaskar@gmail.com>:
fix: removed redundant code
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/529 from kavinkumar807:fix-readme-pip-install a49d82d49a0cecb4cee399620c62ae10c1f3370a
PiperOrigin-RevId: 756122021