docs/en/documentation/getting-started/local_quickstart.md
This guide assumes you have already done the following:
psql client.{{< regionInclude "quickstart/shared/cloud_setup.md" "cloud_setup" >}}
{{< regionInclude "quickstart/shared/database_setup.md" "database_setup" >}}
{{< regionInclude "quickstart/shared/configure_toolbox.md" "configure_toolbox" >}}
In this section, we will write and run an agent that will load the Tools from MCP Toolbox.
{{< notice tip>}} If you prefer to experiment within a Google Colab environment, you can connect to a local runtime. {{< /notice >}}
In a new terminal, install the SDK package.
{{< tabpane persist=header >}} {{< tab header="ADK" lang="bash" >}}
pip install google-adk[toolbox] {{< /tab >}} {{< tab header="Langchain" lang="bash" >}}
pip install toolbox-langchain {{< /tab >}} {{< tab header="LlamaIndex" lang="bash" >}}
pip install toolbox-llamaindex {{< /tab >}} {{< tab header="Core" lang="bash" >}}
pip install toolbox-core {{< /tab >}} {{< /tabpane >}}
Install other required dependencies:
{{< tabpane persist=header >}} {{< tab header="ADK" lang="bash" >}}
{{< /tab >}} {{< tab header="Langchain" lang="bash" >}}
pip install langgraph langchain-google-vertexai
{{< /tab >}} {{< tab header="LlamaIndex" lang="bash" >}}
pip install llama-index-llms-google-genai
{{< /tab >}} {{< tab header="Core" lang="bash" >}}
pip install google-genai {{< /tab >}} {{< /tabpane >}}
Create the agent: {{< tabpane persist=header >}} {{% tab header="ADK" text=true %}}
Create a new agent project. This will create a new directory named my_agent
with a file agent.py.
adk create my_agent
Update my_agent/agent.py with the following content to connect to MCP Toolbox:
{{< regionInclude "quickstart/python/adk/quickstart.py" "quickstart" "python" >}}
Create a .env file with your Google API key:
echo 'GOOGLE_API_KEY="YOUR_API_KEY"' > my_agent/.env
{{% /tab %}}
{{% tab header="LangChain" text=true %}}
Create a new file named agent.py and copy the following code:
{{< include "quickstart/python/langchain/quickstart.py" "python" >}}
{{% /tab %}}
{{% tab header="LlamaIndex" text=true %}}
Create a new file named agent.py and copy the following code:
{{< include "quickstart/python/llamaindex/quickstart.py" "python" >}}
{{% /tab %}}
{{% tab header="Core" text=true %}}
Create a new file named agent.py and copy the following code:
{{< include "quickstart/python/core/quickstart.py" "python" >}}
{{% /tab %}}
{{< /tabpane >}}
{{< tabpane text=true persist=header >}}
{{% tab header="ADK" lang="en" %}} To learn more about Agent Development Kit, check out the ADK Documentation. {{% /tab %}} {{% tab header="Langchain" lang="en" %}} To learn more about Agents in LangChain, check out the LangGraph Agent Documentation. {{% /tab %}} {{% tab header="LlamaIndex" lang="en" %}} To learn more about Agents in LlamaIndex, check out the LlamaIndex AgentWorkflow Documentation. {{% /tab %}} {{% tab header="Core" lang="en" %}} To learn more about tool calling with Google GenAI, check out the Google GenAI Documentation. {{% /tab %}} {{< /tabpane >}}
Run your agent, and observe the results:
{{< tabpane persist=header >}} {{% tab header="ADK" text=true %}} Run your agent locally for testing:
adk run my_agent
Alternatively, serve it via a web interface:
adk web --port 8000
For more information, refer to the ADK documentation on Running Agents and Deploying to Cloud.
{{% /tab %}} {{< tab header="Langchain" lang="bash" >}} python agent.py {{< /tab >}} {{< tab header="LlamaIndex" lang="bash" >}} python agent.py {{< /tab >}} {{< tab header="Core" lang="bash" >}} python agent.py {{< /tab >}} {{< /tabpane >}}
{{< notice info >}} For more information, visit the Python SDK repo. {{</ notice >}}