- Treat Part(thought=True) as reasoning_content when building assistant messages.
- Add unit tests for thought-only and thought+text cases.
Close#4069
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 853790274
Default session and artifact services to in-memory when running in Cloud Run/Kubernetes (or when agents_dir isn’t writable) to prevent startup failures from attempting to create .adk under read-only/unwritable container paths (e.g. /app/agents/.adk). Local development defaults are unchanged.
- ADK_FORCE_LOCAL_STORAGE=1 to always use .adk defaults
- ADK_DISABLE_LOCAL_STORAGE=1 to always avoid local storage
If local artifact initialization raises PermissionError, fall back to in-memory and log a warning
Close#3907
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 853315459
Currently Live API only allow one response modality although the config is defined as a list.
Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com>
PiperOrigin-RevId: 853107710
LlmAgent now resolves model from ancestors or a system default (gemini-2.5-flash) when unset. Added LlmAgent.set_default_model() to override the default globally
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 853006116
The `adk create` command now checks if the provided agent name is a valid Python identifier. An invalid name, such as one containing hyphens, will raise a `click.BadParameter` error before any files are created.
Close#3977
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 853001295
Before Python 3.10, asyncio.Queue() required a running event loop at creation time. This was deprecated in 3.8-3.9 and fully removed in 3.10. ADK requires Python 3.10+, thus remove this unecessary logic
Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com>
PiperOrigin-RevId: 852989791
This change introduces a `_sanitize_schema_types` method to the OpenAPI spec parser. This method recursively removes or filters out non-standard schema types (e.g., "Any", "Unknown") from the OpenAPI specification
Close#3704Close#3108
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 852986491
Final part of https://github.com/google/adk-python/discussions/3605.
This change introduces:
- A new `adk migrate session` CLI command to run database schema upgrades.
- A migration script to upgrade from the old Pickle-based session schema (v0) to the new JSON-based schema (v1).
- A migration runner that orchestrates the upgrade process, handling sequential migrations and using temporary SQLite databases for intermediate steps if needed.
- Unit tests for the v0 to v1 migration.
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 852983323
This change modifies `load_dotenv_for_agent` to first capture the environment variables already set in the process. After loading the `.env` file with `override=True`, it restores the values of these initially set variables, ensuring that explicitly set environment variables are not overwritten by the `.env` file. A new environment variable, `ADK_DISABLE_LOAD_DOTENV`, is also introduced to completely skip the `.env` loading process
Close#4020
Close $4018
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 852981654
Thought parts represent internal model reasoning and should not be included in the content sent back to the model in subsequent turns
Close#3948
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 852965417