<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tanmay Bangale on Medium]]></title>
        <description><![CDATA[Stories by Tanmay Bangale on Medium]]></description>
        <link>https://medium.com/@bangaletanmay?source=rss-ae7ba9db88eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PXFCMahol6F3A-uj.jpg</url>
            <title>Stories by Tanmay Bangale on Medium</title>
            <link>https://medium.com/@bangaletanmay?source=rss-ae7ba9db88eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:21:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bangaletanmay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Leveraging Apigee API Hub Tools with ADK]]></title>
            <link>https://medium.com/@bangaletanmay/leveraging-apigee-api-hub-tools-with-adk-c251db0c2451?source=rss-ae7ba9db88eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c251db0c2451</guid>
            <category><![CDATA[adk]]></category>
            <category><![CDATA[api-hub]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[apigee]]></category>
            <dc:creator><![CDATA[Tanmay Bangale]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 09:13:12 GMT</pubDate>
            <atom:updated>2025-04-22T09:13:12.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9sqwpl2Ix_PwfN-a" /></figure><p>ADK is like a simple set of tools to help build smart computer helpers (agents) that can use different abilities to get things done. Apigee API Hub is like a single place to keep track of all the ways different computer programs talk to each other (APIs) in a company, making it easy to find and use them.</p><p>Turning API instructions into interactive tools lets people try out the APIs directly. This makes it much easier to understand how they work and helps them use the APIs in their own programs without needing to do a lot of extra setup.</p><h3>Creating a Documented API in Apigee API Hub</h3><h4>Steps to Create a Documented API</h4><ol><li>Navigate to Apigee API Hub.</li><li>Register the API</li><li>Create a version defining the API specification.</li></ol><p>For more detailed instructions you can follow the guide <a href="https://cloud.google.com/apigee/docs/apihub/manage-specifications">here</a></p><h3>Building an ADK Agent to Interact with the API</h3><h4>Setting Up the Development Environment</h4><ul><li><a href="https://google.github.io/adk-docs/get-started/installation/">Install ADK</a></li><li>Install the <a href="https://cloud.google.com/sdk/docs/install?db=bigtable-docs#installation_instructions">Google Cloud CLI</a> and get the access token</li></ul><p>Ensure that the account used has the required permissions. You can use the pre-defined role roles/apihub.viewer.</p><ul><li>Set up your project structure and create required files as below :</li></ul><pre>project_root_folder<br> |<br> `-- my_agent<br>     |-- .env<br>     |-- __init__.py<br>     |-- agent.py<br>     `__ tool.py</pre><h3>Creating the ADK Agent</h3><h4>Code Examples</h4><p>__init__.py</p><pre><br>from . import agent</pre><p>agent.py</p><pre>from google.adk.agents.llm_agent import LlmAgent<br>from .tool import sample_toolset<br>from google.adk.tools.openapi_tool.auth.auth_helpers import token_to_scheme_credential<br>from google.adk.tools.apihub_tool.apihub_toolset import APIHubToolset<br>root_agent = LlmAgent(<br>model=&#39;gemini-2.0-flash&#39;,<br>name=&#39;enterprise_assistant&#39;,<br>instruction=&#39;Help user, leverage the tools you have access to&#39;,<br>tools=sample_toolset.get_tools(),<br>)</pre><p>tool.py</p><pre>from google.adk.tools.openapi_tool.auth.auth_helpers import token_to_scheme_credential<br>from google.adk.tools.apihub_tool.apihub_toolset import APIHubToolset<br>sample_toolset = APIHubToolset(<br>name=&quot;apihub-sample-tool&quot;,<br>description=&quot;Sample Tool&quot;,<br>access_token=&quot;&quot;, # Copy your access token generated using gcloud command<br>apihub_resource_name=&quot;projects/YourProjectID/locations/us-central1/apis/YourAPIIDfromAPIHUB&quot;,<br>)</pre><p>.env</p><pre>GOOGLE_GENAI_USE_VERTEXAI=FALSE<br>GOOGLE_API_KEY= aistudio apikey<br>GOOGLE_PROJECT_ID=YourProjectID<br>GOOGLE_LOCATION=us-central1<br>GOOGLE_MODEL=gemini-2.0-flash<br>GOOGLE_MODEL_ID=gemini-2.0-flash</pre><h3>Testing and Deployment</h3><ul><li>Test the ADK agent locally by running “adk web” command at root directory</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9sqwpl2Ix_PwfN-a" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P7gWNcjZIDzR2Kpf" /></figure><h3>Conclusion</h3><p>In conclusion, the Google Agent Development Kit (ADK) significantly streamlines the process of empowering your agents with access to crucial business systems and data. By leveraging Google Cloud tools, particularly the ApiHubToolset alongside Apigee API Hub, you can transform any documented API into a functional agent tool with remarkable efficiency. Don’t hesitate to explore the steps outlined in this article; try integrating your Apigee-hosted APIs using the ADK and discover the ease with which you can build more capable and context-aware enterprise agents.</p><h3>Additional Resources</h3><ul><li><a href="https://google.github.io/adk-docs/tools/google-cloud-tools/">https://google.github.io/adk-docs/tools/google-cloud-tools/</a></li><li><a href="https://google.github.io/adk-docs/get-started/quickstart/">https://google.github.io/adk-docs/get-started/quickstart/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c251db0c2451" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Apigee X Multi-Region Architecture for internal clients]]></title>
            <link>https://medium.com/google-cloud/setting-up-apigee-x-multi-region-failover-setup-for-internal-clients-7027da07fa44?source=rss-ae7ba9db88eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/7027da07fa44</guid>
            <category><![CDATA[apigee-x]]></category>
            <category><![CDATA[cloud-dns]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[availability]]></category>
            <category><![CDATA[failover]]></category>
            <dc:creator><![CDATA[Tanmay Bangale]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 06:14:10 GMT</pubDate>
            <atom:updated>2023-05-11T08:37:29.492Z</atom:updated>
            <content:encoded><![CDATA[<p>This article talks about setting up multi region Apigee failover setup specifically for the traffic that is internal to GCP cloud. The setup leverages the health checks feature of Geolocation policy in GCP Cloud DNS to route the traffic to appropriate Apigee instances through internal load balancer.</p><p>Authors : <a href="https://medium.com/u/ae7ba9db88eb">Tanmay Bangale</a> , <a href="https://medium.com/u/78d712cbc1aa">Payal Jindal</a></p><p><strong>Context</strong></p><p>We can have a multi region failover setup for the Apigee for internal clients. This means internal clients coming from respective geographies can reach the closest Apigee instance region. In case of failover of Apigee instance in either of the regions, the traffic can then be forwarded to available regions without any downtime.</p><p>For this we rely on two features :</p><ol><li>DNS Geolocation Routing policy with health checks</li><li>Internal Load Balancer with global access enabled.</li></ol><p>Let’s discuss them one by one.</p><p><strong>DNS Geolocation Routing policy with health checks</strong></p><p>Cloud DNS supports health checks for internal TCP/UDP load balancers that have global access enabled. Also, an appropriate routing policy within Cloud DNS also needs to be configured. In this case, we are going with a geo routing policy. Geo routing policy. This policy will direct the whole traffic coming from us-central1 region to the us-central1 Internal load balancer and similarly traffic coming from region 2 will be routed to load balancer in the second region. All other traffic from other regions will be rerouted based on which region is closer.</p><p>This policy leverages the load balancer health checks [only internal TCP/UDP load balancers] to determine whether to resolve the domain name to that particular load balancer.</p><p><strong>TCP load balancer with Global access</strong></p><p>Global access will be enabled on the Internal TCP Load balancers so that cloud DNS supports the health checks. By Global access, we mean that the internal clients who are sending the request to these load balancers could reside in any region, but the backends of these load balancers need to be in the same region as the load balancer.</p><p><strong>End-to-End</strong></p><p>So, this is how the whole flow will look like-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*w2H5CkUrcG_38UgTwVZuLg.png" /><figcaption>Cloud DNS resolving FQDN to respectively Load Balancer IP closer to clients</figcaption></figure><p>Requests from internal clients or customers use a domain name to reach Apigee. The resolution is directed to privately hosted Cloud DNS to resolve it to the IP address of the load balancer. Cloud DNS selects load balancer ip addresses based on the region from where the traffic is coming, as determined by the geolocation policy. This policy can also be configured to use health checks. Thus, if the selected load balancer is not healthy during DNS resolution, Cloud DNS will resolve the ip address to another load balancer in the closest region.</p><p>Once the resolution is complete, the request is sent to the specific load balancer, which forwards it to the backend, which is a MIG that redirects all requests to the Apigee Instance.</p><p>Thus such multi-region failover setup can help to improve the availability of Apigee services by providing a backup region in case of an outage in the primary region as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*cGK-kdzcJvMXwkPGcveIQA.png" /><figcaption>Cloud DNS resolving the FQDN to Load Balancer IP in another region</figcaption></figure><p>Steps to create above setup</p><p><strong>Step 1 — Setting up the internal Load Balancer</strong></p><ol><li>Create an HTTPS health check.</li></ol><pre>gcloud compute health-checks create https test-health-check \<br>--region europe-west1 \<br>--port 443 \<br>--request-path /healthz/ingress</pre><p>2. Create a backend service.</p><pre>gcloud compute backend-services create network-lb-backend-service \<br>--load-balancing-scheme=INTERNAL \<br>--network apigee-network \<br>--protocol TCP \<br>--health-checks test-health-check \<br>--health-checks-region europe-west1 \<br>--region europe-west1</pre><p>3. Add instance groups to backend services.</p><pre>gcloud compute backend-services add-backend network-lb-backend-service \<br>--instance-group mig-ew1 \<br>--instance-group-zone europe-west1-b \<br>--region europe-west1</pre><p>4. Create the forwarding rule</p><pre>gcloud compute forwarding-rules create network-lb-forwarding-rule-ipv4 \<br>--load-balancing-scheme INTERNAL \<br>--region europe-west1 \<br>--ports 80 \<br>--backend-service network-lb-backend-service \<br>--allow-global-access \<br>--network apigee-network \<br>--subnet apigee-exposure-1</pre><p>NOTE: You’ll also have to enable certain firewall rules as well.</p><p><strong>Step 2 — Setting up Cloud DNS with health checks</strong></p><ol><li>Create a private Cloud DNS managed zone</li></ol><pre>gcloud dns managed-zones create eg-dns-zone \<br>--dns-name=apg.local. \<br>--description=&quot;Private DNS zone for network1-vpc&quot; \<br>--visibility=private \<br>--networks=apigee-network</pre><p>2. Add a record in the managed zone</p><pre>gcloud dns record-sets create foo.apg.local. \<br>--type=A \<br>--ttl=60 \<br>--routing-policy-type=GEO \<br>--routing-policy-data=&quot;europe-west1=network-lb-forwarding-rule-ipv4;europe-west2=network-lb-forwarding-rule2-ipv4&quot; \<br>--enable-health-checking \<br>--zone=eg-dns-zone</pre><p><strong>This setup to have a failover access route for Apigee instances can also be replicated for any other backend resources like compute engine or cluster served by internal load balancer.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7027da07fa44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/setting-up-apigee-x-multi-region-failover-setup-for-internal-clients-7027da07fa44">Setting up Apigee X Multi-Region Architecture for internal clients</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>