Wednesday, 14 May 2025
  • My Feed
  • My Interests
  • My Saves
  • History
  • Blog
Subscribe
Capernaum
  • Finance
    • Cryptocurrency
    • Stock Market
    • Real Estate
  • Lifestyle
    • Travel
    • Fashion
    • Cook
  • Technology
    • AI
    • Data Science
    • Machine Learning
  • Health
    HealthShow More
    Skincare as You Age Infographic
    Skincare as You Age Infographic

    When I dove into the scientific research for my book How Not…

    By capernaum
    Treating Fatty Liver Disease with Diet 
    Treating Fatty Liver Disease with Diet 

    What are the three sources of liver fat in fatty liver disease,…

    By capernaum
    Bird Flu: Emergence, Dangers, and Preventive Measures

    In the United States in January 2025 alone, approximately 20 million commercially-raised…

    By capernaum
    Inhospitable Hospital Food 
    Inhospitable Hospital Food 

    What do hospitals have to say for themselves about serving meals that…

    By capernaum
    Gaming the System: Cardiologists, Heart Stents, and Upcoding 
    Gaming the System: Cardiologists, Heart Stents, and Upcoding 

    Cardiologists can criminally game the system by telling patients they have much…

    By capernaum
  • Sport
  • 🔥
  • Cryptocurrency
  • Data Science
  • Travel
  • Real Estate
  • AI
  • Technology
  • Machine Learning
  • Stock Market
  • Finance
  • Fashion
Font ResizerAa
CapernaumCapernaum
  • My Saves
  • My Interests
  • My Feed
  • History
  • Travel
  • Health
  • Technology
Search
  • Pages
    • Home
    • Blog Index
    • Contact Us
    • Search Page
    • 404 Page
  • Personalized
    • My Feed
    • My Saves
    • My Interests
    • History
  • Categories
    • Technology
    • Travel
    • Health
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Home » Blog » A Coding Implementation with Arcad: Integrating Gemini Developer API Tools into LangGraph Agents for Autonomous AI Workflows
AITechnology

A Coding Implementation with Arcad: Integrating Gemini Developer API Tools into LangGraph Agents for Autonomous AI Workflows

capernaum
Last updated: 2025-04-26 20:00
capernaum
Share
A Coding Implementation with Arcad: Integrating Gemini Developer API Tools into LangGraph Agents for Autonomous AI Workflows
SHARE

Arcade transforms your LangGraph agents from static conversational interfaces into dynamic, action-driven assistants by providing a rich suite of ready-made tools, including web scraping and search, as well as specialized APIs for finance, maps, and more. In this tutorial, we will learn how to initialize ArcadeToolManager, fetch individual tools (such as Web.ScrapeUrl) or entire toolkits, and seamlessly integrate them into Google’s Gemini Developer API chat model via LangChain’s ChatGoogleGenerativeAI. With a few steps, we installed dependencies, securely loaded your API keys, retrieved and inspected your tools, configured the Gemini model, and spun up a ReAct-style agent complete with checkpointed memory. Throughout, Arcade’s intuitive Python interface kept your code concise and your focus squarely on crafting powerful, real-world workflows, no low-level HTTP calls or manual parsing required.

Copy CodeCopiedUse a different Browser
!pip install langchain langchain-arcade langchain-google-genai langgraph

We integrate all the core libraries you need, including LangChain’s core functionality, the Arcade integration for fetching and managing external tools, the Google GenAI connector for Gemini access via API key, and LangGraph’s orchestration framework, so you can get up and running in one go.

Copy CodeCopiedUse a different Browser
from getpass import getpass
import os


if "GOOGLE_API_KEY" not in os.environ:
    os.environ["GOOGLE_API_KEY"] = getpass("Gemini API Key: ")


if "ARCADE_API_KEY" not in os.environ:
    os.environ["ARCADE_API_KEY"] = getpass("Arcade API Key: ")

We securely prompt you for your Gemini and Arcade API keys, without displaying them on the screen. It sets them as environment variables, only asking if they are not already defined, to keep your credentials out of your notebook code.

Copy CodeCopiedUse a different Browser
from langchain_arcade import ArcadeToolManager


manager = ArcadeToolManager(api_key=os.environ["ARCADE_API_KEY"])
tools = manager.get_tools(tools=["Web.ScrapeUrl"], toolkits=["Google"])
print("Loaded tools:", [t.name for t in tools])

We initialize the ArcadeToolManager with your API key, then fetch both the Web.ScrapeUrl tool and the full Google toolkit. It finally prints out the names of the loaded tools, allowing you to confirm which capabilities are now available to your agent.

Copy CodeCopiedUse a different Browser
from langchain_google_genai import ChatGoogleGenerativeAI
from langgraph.checkpoint.memory import MemorySaver


model = ChatGoogleGenerativeAI(
    model="gemini-1.5-flash",
    temperature=0,
    max_tokens=None,
    timeout=None,
    max_retries=2,
)


bound_model = model.bind_tools(tools)


memory = MemorySaver()

We initialize the Gemini Developer API chat model (gemini-1.5-flash) with zero temperature for deterministic replies, bind in your Arcade tools so the agent can call them during its reasoning, and set up a MemorySaver to persist the agent’s state checkpoint by checkpoint.

Copy CodeCopiedUse a different Browser
from langgraph.prebuilt import create_react_agent


graph = create_react_agent(
    model=bound_model,
    tools=tools,
    checkpointer=memory
)

We spin up a ReAct‐style LangGraph agent that wires together your bound Gemini model, the fetched Arcade tools, and the MemorySaver checkpointer, enabling your agent to iterate through thinking, tool invocation, and reflection with state persisted across calls.

Copy CodeCopiedUse a different Browser
from langgraph.errors import NodeInterrupt


config = {
    "configurable": {
        "thread_id": "1",
        "user_id": "user@example.com"
    }
}
user_input = {
    "messages": [
        ("user", "List any new and important emails in my inbox.")
    ]
}


try:
    for chunk in graph.stream(user_input, config, stream_mode="values"):
        chunk["messages"][-1].pretty_print()
except NodeInterrupt as exc:
    print(f"n🔒 NodeInterrupt: {exc}")
    print("Please update your tool authorization or adjust your request, then re-run.")

We set up your agent’s config (thread ID and user ID) and user prompt, then stream the ReAct agent’s responses, pretty-printing each chunk as it arrives. If a tool call hits an authorization guard, it catches the NodeInterrupt and tells you to update your credentials or adjust the request before retrying.

In conclusion, by centering our agent architecture on Arcade, we gain instant access to a plug-and-play ecosystem of external capabilities that would otherwise take days to build from scratch. The bind_tools pattern merges Arcade’s toolset with Gemini’s natural-language reasoning, while LangGraph’s ReAct framework orchestrates tool invocation in response to user queries. Whether you’re crawling websites for real-time data, automating routine lookups, or embedding domain-specific APIs, Arcade scales with your ambitions, letting you swap in new tools or toolkits as your use cases evolve.


Here is the Colab Notebook. Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn Group. Don’t Forget to join our 90k+ ML SubReddit.

🔥 [Register Now] miniCON Virtual Conference on AGENTIC AI: FREE REGISTRATION + Certificate of Attendance + 4 Hour Short Event (May 21, 9 am- 1 pm PST) + Hands on Workshop

The post A Coding Implementation with Arcad: Integrating Gemini Developer API Tools into LangGraph Agents for Autonomous AI Workflows appeared first on MarkTechPost.

Share This Article
Twitter Email Copy Link Print
Previous Article Bitcoin Price Confirms Breakout To $106,000 As Technicals Align Bitcoin Price Confirms Breakout To $106,000 As Technicals Align
Next Article Peter Schiff Explains How Donald Trump’s Tariffs Contradicts The President’s Bitcoin Plans Peter Schiff Explains How Donald Trump’s Tariffs Contradicts The President’s Bitcoin Plans
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Your Trusted Source for Accurate and Timely Updates!

Our commitment to accuracy, impartiality, and delivering breaking news as it happens has earned us the trust of a vast audience. Using RSS feeds, we aggregate news from trusted sources to ensure real-time updates on the latest events and trends. Stay ahead with timely, curated information designed to keep you informed and engaged.
TwitterFollow
TelegramFollow
LinkedInFollow
- Advertisement -
Ad imageAd image

You Might Also Like

Reinforcement Learning, Not Fine-Tuning: Nemotron-Tool-N1 Trains LLMs to Use Tools with Minimal Supervision and Maximum Generalization
AIMachine LearningTechnology

Reinforcement Learning, Not Fine-Tuning: Nemotron-Tool-N1 Trains LLMs to Use Tools with Minimal Supervision and Maximum Generalization

By capernaum

FHA cites AI emergence as it ‘archives’ inactive policy documents

By capernaum

Better leans on AI, sees first profitable month since 2022

By capernaum
A Step-by-Step Guide to Deploy a Fully Integrated Firecrawl-Powered MCP Server on Claude Desktop with Smithery and VeryaX
AI

A Step-by-Step Guide to Deploy a Fully Integrated Firecrawl-Powered MCP Server on Claude Desktop with Smithery and VeryaX

By capernaum
Capernaum
Facebook Twitter Youtube Rss Medium

Capernaum :  Your instant connection to breaking news & stories . Stay informed with real-time coverage across  AI ,Data Science , Finance, Fashion , Travel, Health. Your trusted source for 24/7 insights and updates.

© Capernaum 2024. All Rights Reserved.

CapernaumCapernaum
Welcome Back!

Sign in to your account

Lost your password?