Commit Graph

256 Commits

Author SHA1 Message Date
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
Shangjie Chen 9dce06f9b0 feat: Add rewind_async to support rewinding the session to before a previous invocation
PiperOrigin-RevId: 820552460
2025-10-16 23:24:40 -07:00
Kathy Wu 6dcbb5aca6 feat: Support dynamic per-request headers in MCPToolset
Add a header_provider param which is a callable[ReadonlyContext, Dict[str, Any]] for users to build headers in MCPToolset
fix: https://github.com/google/adk-python/issues/3156
PiperOrigin-RevId: 820412372
2025-10-16 15:12:43 -07:00
Xiang (Sean) Zhou 2a8fdd94e1 chore: Add computer use sample agent
PiperOrigin-RevId: 820407078
2025-10-16 14:59:27 -07:00
Xuan Yang 37a153ef94 ci: Fix the logs importing for PR triaging agent
PiperOrigin-RevId: 820395414
2025-10-16 14:27:18 -07:00
Xuan Yang 9dc00360e3 ci: Add state info for PR triaging agent
PiperOrigin-RevId: 820340584
2025-10-16 13:07:18 -07:00
Xuan Yang f51380f9ea feat: Extend ReflectAndRetryToolPlugin to support hallucinating function calls
PiperOrigin-RevId: 820051762
2025-10-16 13:06:51 -07:00
Xuan Yang 3734ceaa6c fix: Use the agent's model when creating Google search agent tool
PiperOrigin-RevId: 819980797
2025-10-16 13:06:41 -07:00