Skip to content

feat: expose credential service in readonly context - #1829

Merged
copybara-service[bot] merged 5 commits into
google:mainfrom
matino:expose_credential_service
Jul 11, 2025
Merged

copybara-service[bot] merged 5 commits into
google:mainfrom
matino:expose_credential_service

Conversation

@matino

@matino matino commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

The problem is described in #1816.
TLDR; currently, there's no clean way to pass secrets to the LLM.

This PR makes it possible to access the credential service in a read-only context. It can be use to pass the authorization header to the LlmAgent tool:

  • In Runner instance, call save_credential()
  • In LLM, use tool_context.credential_service.load_credential() to load the credential (tool_context is of ToolContext type)

@matino
matino force-pushed the expose_credential_service branch from e37ae28 to d3b500b Compare July 8, 2025 09:32
Comment thread src/google/adk/tools/agent_tool.py Resolved
@matino

matino commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

@hangfei Do you think we can merge this? It's a real blocker for my use case (especially passing credential service to the Runner in agent_tool)

@seanzhou1023
seanzhou1023 force-pushed the expose_credential_service branch from 9531852 to 997b6a9 Compare July 11, 2025 22:38
@seanzhou1023 seanzhou1023 added the ready to pull [Status] This PR is ready to be imported back to Google label Jul 11, 2025
@copybara-service
copybara-service Bot merged commit 202558f into google:main Jul 11, 2025
pandasanjay pushed a commit to pandasanjay/adk-python that referenced this pull request Jul 28, 2025
FrigaZzz pushed a commit to FrigaZzz/adk-python that referenced this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to pull [Status] This PR is ready to be imported back to Google

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants