Commit Graph

263 Commits

Author SHA1 Message Date
Artem Oroberts edfe553942 feat: Add sample agent for VertexAiCodeExecutor
This change introduces a new sample agent and documentation to demonstrate the usage of the `VertexAiCodeExecutor`.

The new agent, located at `vertex_code_execution/agent.py`, is a direct counterpart to the existing sample at `code_execution/agent.py`. The key difference is that this new agent uses `VertexAiCodeExecutor` to execute code within the Vertex AI Code Interpreter Extension, whereas the original sample uses `BuiltInCodeExecutor` to run code in the model's built-in sandbox.

A `README.md` file is also included to provide an overview, setup instructions, and sample usage for the new agent.

Related: #2993
PiperOrigin-RevId: 825239758
2025-10-28 15:52:14 -07:00
Google Team Member 9851340ad1 feat: Add Bigquery detect_anomalies tool
This change introduces a new `detect_anomalies` tool in `query_tool.py` which uses BigQuery ML's `CREATE MODEL` with `ARIMA_PLUS` type and `ML.DETECT_ANOMALIES` to detect anomalies. The new function is also added to the `bigquery_toolset`.

PiperOrigin-RevId: 825181489
2025-10-28 13:30:04 -07:00
Wei Sun (Jack) 86f01550bd docs: Fixes null check for reflect_retry plugin sample
PiperOrigin-RevId: 824836190
2025-10-27 22:13:06 -07:00
Google Team Member 87dcb3f7ba feat: Add ApigeeLlm as a model that let's ADK Agent developers to connect with an Apigee proxy
PiperOrigin-RevId: 824712152
2025-10-27 15:53:33 -07:00
George Weale 0a87e02ffd fix: Rename agent config files to match the agent name
PiperOrigin-RevId: 824702674
2025-10-27 15:27:45 -07:00
George Weale 19f52467db docs: Update ADK agent builder instructions for model callback signatures
PiperOrigin-RevId: 824690587
2025-10-27 14:58:32 -07:00
George Weale 1ca82068fd docs: Automatically create __init__.py files when writing Python files
PiperOrigin-RevId: 824690193
2025-10-27 14:57:34 -07:00
Google Team Member 5d9a7e7f79 feat: enable persistent browser sessions in the computer use sample
The computer_use sample now supports launching with a `user_data_dir` to maintain browser state across runs. The sample agent is updated to use a shared temporary directory for the browser profile, preserving login sessions and other data.

PiperOrigin-RevId: 823749082
2025-10-24 19:15:10 -07:00
George Weale f8a9672b38 docs: Make sure LlmAgent as the immutable root agent in ADK configurations
PiperOrigin-RevId: 823699363
2025-10-24 16:10:24 -07:00
Kathy Wu fb96d17230 fix: Fix import for live bidi streaming single agent
While testing the bidi streaming sample agent, I noticed that the import was erroring and I think it's a typo -- the other bidi sample agents all import `from google.adk.agents.llm_agent`.

PiperOrigin-RevId: 823662586
2025-10-24 14:17:04 -07:00
George Weale d193c396d6 docs: Add root agent requirement to instructions so it does not create workflow agents as root agent
PiperOrigin-RevId: 823256724
2025-10-23 17:46:11 -07:00
George Weale 53209f1bb9 docs: Clarify research tool instructions in YAML agent
PiperOrigin-RevId: 823255928
2025-10-23 17:43:20 -07:00
Xuan Yang 0d0fb4d034 ci: Remove reviewer assignment in the PR triaging agent
PiperOrigin-RevId: 823255296
2025-10-23 17:40:57 -07:00
George Weale 0660779ff0 docs: Update agent builder instructions to restrict fields on workflow agents
PiperOrigin-RevId: 823254695
2025-10-23 17:39:07 -07:00
Vrajesh Babu A V 45a2168e0e chore: Adds a new sample agent that demonstrates how to integrate PostgreSQL databases using the Model Context Protocol (MCP)
## What's Added

- **PostgreSQL MCP Agent** ([mcp_postgres_agent/agent.py](cci:7://file:///Users/admin/git%20repos/adk-python/contributing/samples/mcp_postgres_agent/agent.py:0:0-0:0)): A fully functional agent that connects to PostgreSQL databases via the `postgres-mcp` MCP server
- **Comprehensive README** ([mcp_postgres_agent/README.md](cci:7://file:///Users/admin/git%20repos/adk-python/contributing/samples/mcp_postgres_agent/README.md:0:0-0:0)): Documentation with setup instructions, configuration details, and example queries
- **Environment Configuration**: Support for secure credential management via `.env` files

## Key Features

- **MCP Integration**: Demonstrates proper use of `MCPToolset` with `StdioConnectionParams`
- **Zero Installation**: Uses `uvx` to run the MCP server without manual installation
- **Secure Credentials**: Database connection strings passed via environment variables
- **Production-Ready**: Uses Gemini 2.0 Flash with unrestricted access mode for full database operations

## Technical Details

- **Model**: Gemini 2.0 Flash
- **MCP Server**: `postgres-mcp` (via `uvx`)
- **Connection**: StdioConnectionParams with 60-second timeout
- **Environment Variable**: Maps `POSTGRES_CONNECTION_STRING` to `DATABASE_URI`

## Testing

The agent has been tested with:
- PostgreSQL database connections (local and remote)
- Schema inspection queries
- Data querying operations
- Table listing and management

## Example Queries

Users can interact with the agent using natural language queries like:
- "What tables are in the database?"
- "Show me the schema for the users table"
- "Query the first 10 rows from the products table"

This sample serves as a reference implementation for developers looking to integrate PostgreSQL databases with ADK agents using MCP.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3182 from Vrajesh-Babu:postgres-mcp f3b3846abae37ae376d3554624ac2b1be82f7adc
PiperOrigin-RevId: 822865931
2025-10-22 21:44:25 -07:00
George Weale 9cf7ab11a8 docs: Update agent builder instructions for clarity and best practices for ADK specific requirements
PiperOrigin-RevId: 822862453
2025-10-22 21:31:40 -07:00
George Weale 4c58b767e5 docs: Update ADK Agent Builder Assistant instructions for workflow tools
PiperOrigin-RevId: 822756480
2025-10-22 15:11:16 -07:00
George Weale f1e01ea4b0 docs: Update ADK Agent Builder Assistant instructions and clarified built-in tool naming
PiperOrigin-RevId: 822752065
2025-10-22 14:59:50 -07:00
George Weale c9647f3536 docs: Update agent builder instructions to require explicit agent_class
PiperOrigin-RevId: 822742468
2025-10-22 14:31:32 -07:00
Luis Pabon 409df1378f feat: Granular Per Agent Speech Configuration
Merge https://github.com/google/adk-python/pull/3170

Addresses Feature Request: #3116

This PR adds a `speech_config` to the **LLM Agent configuration** for the **live use case**. When an **asynchronous LLM** call is made to the **Gemini Live API**, it prioritizes the most specific agent configuration's speech_config. If that is null, it then uses the run configuration's speech_config. Unit tests have been added to verify this behavior.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3170 from qyuo:bidi_agent_speech_config af1bd277d4f95c4a7d9aa0b16828ba3de826ce08
PiperOrigin-RevId: 822305427
2025-10-21 15:44:00 -07:00
Xuan Yang c850da3a07 fix: Fix the broken langchain importing caused their 1.0.0 release
PiperOrigin-RevId: 822279014
2025-10-21 14:30:34 -07:00
Wei Sun (Jack) 0bdba30263 docs: format README.md for samples
PiperOrigin-RevId: 822180731
2025-10-21 10:35:43 -07:00
Google Team Member ee39a89110 feat: introduces a new AgentEngineSandboxCodeExecutor class that supports executes agent generated code
The AgentEngineSandboxCodeExecutor uses the Vertex AI Code Execution Sandbox API to execute code

PiperOrigin-RevId: 821699641
2025-10-20 10:14:34 -07:00
Google Team Member a5b742b360 feat: introduces a new AgentEngineSandboxCodeExecutor class that supports executes agent generated code
The AgentEngineSandboxCodeExecutor uses the Vertex AI Code Execution Sandbox API to execute code

PiperOrigin-RevId: 821197794
2025-10-18 20:24:04 -07:00
Google Team Member dbd818be0b feat: introduces a new AgentEngineSandboxCodeExecutor class that supports executes agent generated code
The AgentEngineSandboxCodeExecutor uses the Vertex AI Code Execution Sandbox API to execute code

PiperOrigin-RevId: 820854185
2025-10-17 15:42:24 -07:00