Support running agents fully locally without Vertex AI (offline mode)
Description Currently, running the agents appears to require setting GOOGLE_GENAI_USE_VERTEXAI=true, which tightly couples the agent with Vertex AI for model inference. This limits the ability to run and test the agent completely locally without using Google Cloud services.
LLM auditor agent as a reference: https://github.com/google/adk-samples/tree/main/agents/llm-auditor#setup-and-installation
Proposed Solution I’d like to propose adding support for a fully local execution mode, where the agent can:
- Run locally via adk run llm_auditor or adk web.
- Operate without relying on Vertex AI (GOOGLE_GENAI_USE_VERTEXAI=false).
- This will be a small change
Additional context This feature would be extremely helpful for local development and debugging.
I’m happy to help contribute or test this functionality for all agent samples if it aligns with the project goals. Let me know your thoughts and suggestions !
Mark, need support DeepSeek-R1 And QwQ-32b please
I was able to run the travel concierge locally with the setting as FALSE using the adk web command.
Thanks for your feedback !
I'd like to work on a PR to add support for running agents locally without Vertex AI. Let me know if you have any thoughts before I start.
You should be able to run all the agents locally using adk web (file an issue if you find a problem). At the moment you do need to use either Vertex AI or AI Studio for access to Gemini as the default LLM. Some of the agents also depend on Google Cloud for other services (eg. BigQuery or Cloud Storage).
You could look into pointing the agents at a different LLM, although it might change how well they work. Removing the dependency on GCP (where it exists) for the other services might be more difficult.
Thanks @mstyer-google — that makes sense.
Just to share, I was able to run an agent connected to Gemini without going through Vertex AI by setting GOOGLE_GENAI_USE_VERTEXAI=false. So it seems local mode does work to some extent already, which is great for standalone/local experiments.
It might be helpful to update the docs to reflect this as an option for local development. I'd be happy to submit a small PR to include this note in the setup instructions if that sounds good.
That's great. Glad that worked for you!
Yes, a note making that option more explicit in the docs would be welcome.
If this PR looks good to you, I'd be happy to submit additional PRs for other agents after I’ve tested them in this local mode. Let me know if you have any further suggestions or if you'd like me to make any adjustments to the PR.