Skip to content

Instantly share code, notes, and snippets.

@minherz
Created October 15, 2025 15:19
Show Gist options
  • Select an option

  • Save minherz/700cc949e95fb1765def712fa3fed183 to your computer and use it in GitHub Desktop.

Select an option

Save minherz/700cc949e95fb1765def712fa3fed183 to your computer and use it in GitHub Desktop.
Main application
import os
from google.adk.cli.fast_api import get_fast_api_app
from fastapi import FastAPI
import logging
logger = logging.getLogger(__name__)
# Discover the `weather_agent` directory in current working dir
AGENT_DIR = os.path.dirname(os.path.abspath(__file__))
# Create FastAPI app with enabled cloud tracing
app: FastAPI = get_fast_api_app(
agents_dir=AGENT_DIR,
web=True,
session_service_uri='agentengine://projects/genai-with-internet-001/locations/us-west1/reasoningEngines/2798951984038674432',
# trace_to_cloud=True,
)
app.title = "Friendly Zoo keeper"
app.description = "Get your questions about animals answered by AI zoo keeper."
# Main execution
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=os.environ.get("PORT", "8080"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment