docs/en/documentation/getting-started/local_quickstart_js.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.
(Optional) Initialize a Node.js project:
npm init -y
In a new terminal, install the SDK package. {{< tabpane persist=header >}} {{< tab header="LangChain" lang="bash" >}} npm install @toolbox-sdk/core {{< /tab >}} {{< tab header="GenkitJS" lang="bash" >}} npm install @toolbox-sdk/core {{< /tab >}} {{< tab header="LlamaIndex" lang="bash" >}} npm install @toolbox-sdk/core {{< /tab >}} {{< tab header="GoogleGenAI" lang="bash" >}} npm install @toolbox-sdk/core {{< /tab >}} {{< tab header="ADK" lang="bash" >}} npm install @toolbox-sdk/adk {{< /tab >}} {{< /tabpane >}}
Install other required dependencies
{{< tabpane persist=header >}} {{< tab header="LangChain" lang="bash" >}} npm install langchain @langchain/google-genai {{< /tab >}} {{< tab header="GenkitJS" lang="bash" >}} npm install genkit @genkit-ai/googleai {{< /tab >}} {{< tab header="LlamaIndex" lang="bash" >}} npm install llamaindex @llamaindex/google @llamaindex/workflow {{< /tab >}} {{< tab header="GoogleGenAI" lang="bash" >}} npm install @google/genai {{< /tab >}} {{< tab header="ADK" lang="bash" >}} npm install @google/adk {{< /tab >}} {{< /tabpane >}}
Create a new file named hotelAgent.js and copy the following code to create
an agent:
{{< tabpane persist=header >}} {{< tab header="LangChain" lang="js" >}}
{{< include "quickstart/js/langchain/quickstart.js" >}}
{{< /tab >}}
{{< tab header="GenkitJS" lang="js" >}}
{{< include "quickstart/js/genkit/quickstart.js" >}}
{{< /tab >}}
{{< tab header="LlamaIndex" lang="js" >}}
{{< include "quickstart/js/llamaindex/quickstart.js" >}}
{{< /tab >}}
{{< tab header="GoogleGenAI" lang="js" >}}
{{< include "quickstart/js/genAI/quickstart.js" >}}
{{< /tab >}}
{{< tab header="ADK" lang="js" >}}
{{< include "quickstart/js/adk/quickstart.js" >}}
{{< /tab >}}
{{< /tabpane >}}
Run your agent, and observe the results:
node hotelAgent.js
{{< notice info >}} For more information, visit the JS SDK repo. {{</ notice >}}