Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/code/guides/agentauth/auth_with_google.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { google } from "googleapis";
* In this example, we will use Arcade to authenticate with Google and
* retrieve Gmail messages.
*
* Consider using the Arcade Google toolkit, which simplifies the process for
* Consider using the Arcade Gmail toolkit, which simplifies the process for
* retrieving email messages even further!
*
* Below we are just showing how to use Arcade as an auth provider, if you need to directly get a token to use with Google.
Expand Down
2 changes: 1 addition & 1 deletion examples/code/guides/agentauth/auth_with_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
In this example, we will use Arcade to authenticate with Google and
retrieve Gmail messages.

Consider using the Arcade Google toolkit, which simplifies the process for
Consider using the Arcade Gmail toolkit, which simplifies the process for
retrieving email messages even further!

Below we are just showing how to use Arcade as an auth provider, if you need to directly get a token to use with Google.
Expand Down
2 changes: 1 addition & 1 deletion examples/code/home/crewai/custom_auth_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def tool_manager_callback(tool_manager: ArcadeToolManager, tool_name: str, **too

manager = ArcadeToolManager(executor=tool_manager_callback)

tools = manager.get_tools(tools=["Google.ListEmails"], toolkits=["Slack"])
tools = manager.get_tools(tools=["Gmail.ListEmails"], toolkits=["Slack"])

crew_agent = Agent(
role="Main Agent",
Expand Down
2 changes: 1 addition & 1 deletion examples/code/home/crewai/use_arcade_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

manager = ArcadeToolManager(default_user_id="{arcade_user_id}")

tools = manager.get_tools(tools=["Google.ListEmails"])
tools = manager.get_tools(tools=["Gmail.ListEmails"])


crew_agent = Agent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ try {
const callToolRequest: CallToolRequest = {
method: "tools/call",
params: {
name: "Google_ListEmails",
name: "Gmail_ListEmails",
arguments: {
n_emails: 5,
},
Expand Down
8 changes: 4 additions & 4 deletions pages/home/auth-providers/google.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Google auth provider enables tools and agents to call Google/Google Workspac

<Tip>
Want to quickly get started with Google services in your agent or AI app? The
pre-built [Arcade Google toolkit](/toolkits/productivity/google/gmail) is what
pre-built [Arcade Gmail toolkit](/toolkits/productivity/gmail) is what
you want!
</Tip>

Expand All @@ -16,7 +16,7 @@ This page describes how to use and configure Google auth with Arcade.

This auth provider is used by:

- The [Arcade Google toolkit](/toolkits/productivity/google/gmail), which provides pre-built tools for interacting with Google services
- The [Arcade Gmail toolkit](/toolkits/productivity/gmail), which provides pre-built tools for interacting with Google services
- Your [app code](#using-google-auth-in-app-code) that needs to call Google APIs
- Or, your [custom tools](#using-google-auth-in-custom-tools) that need to call Google APIs

Expand Down Expand Up @@ -149,9 +149,9 @@ Use `client.auth.start()` to get a user token for Google APIs:

## Using Google auth in custom tools

You can use the pre-built [Arcade Google toolkit](/toolkits/productivity/google/gmail) to quickly build agents and AI apps that interact with Google services like Gmail, Calendar, Drive, and more.
You can use the pre-built Arcade Google toolkits, like [Arcade Gmail toolkit](/toolkits/productivity/gmail), to quickly build agents and AI apps that interact with Google services like Gmail, Calendar, Drive, and more.

If the pre-built tools in the Google toolkit don't meet your needs, you can author your own [custom tools](/home/build-tools/create-a-toolkit) that interact with Google APIs.
If the pre-built tools in the Google toolkits don't meet your needs, you can author your own [custom tools](/home/build-tools/create-a-toolkit) that interact with Google APIs.

Use the `Google()` auth class to specify that a tool requires authorization with Google. The `context.authorization.token` field will be automatically populated with the user's Google token:

Expand Down
2 changes: 1 addition & 1 deletion pages/home/auth-providers/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ You can create multiple auth providers of the same type, for example, you can ha

However, Arcade's tools are configured to select an auth provider by the type. This means that if you have multiple auth providers of the same type, Arcade will not know which one to use and authorizing the tool will fail.

To work around this, you can fork Arcade's tools and modify them to specify your own auth provider by the unique ID that you give each of them. For example, if you have two Google auth providers, `acme-google-calendar` and `acme-google-email`, you can modify Arcade's Google.ListEmails tool like this:
To work around this, you can fork Arcade's tools and modify them to specify your own auth provider by the unique ID that you give each of them. For example, if you have two Google auth providers, `acme-google-calendar` and `acme-google-email`, you can modify Arcade's Gmail.ListEmails tool like this:

```python
@tool(
Expand Down
10 changes: 5 additions & 5 deletions pages/home/auth/auth-tool-calling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env var

### Authorize a tool directly

Many tools require authorization. For example, the `Google.ListEmails` tool requires authorization with Google.
Many tools require authorization. For example, the `Gmail.ListEmails` tool requires authorization with Google.

This authorization must be approved by the user. By approving, the user allows your agent or app to access only the data they've approved.

Expand All @@ -57,7 +57,7 @@ USER_ID = "{arcade_user_id}"

# Request access to the user's Gmail account
auth_response = client.tools.authorize(
tool_name="Google.ListEmails",
tool_name="Gmail.ListEmails",
user_id=USER_ID,
)

Expand All @@ -74,7 +74,7 @@ const userId = "{arcade_user_id}";

// Request access to the user's Gmail account
const authResponse = await client.tools.authorize({
tool_name: "Google.ListEmails",
tool_name: "Gmail.ListEmails",
user_id: userId,
});

Expand Down Expand Up @@ -117,7 +117,7 @@ Once the user has approved the action, you can run the tool. You only need to pa

```python
emails_response = client.tools.execute(
tool_name="Google.ListEmails",
tool_name="Gmail.ListEmails",
user_id=USER_ID,
)
print(emails_response)
Expand All @@ -128,7 +128,7 @@ print(emails_response)

```js
const emailsResponse = await client.tools.execute({
tool_name: "Google.ListEmails",
tool_name: "Gmail.ListEmails",
user_id: userId,
});

Expand Down
2 changes: 1 addition & 1 deletion pages/home/auth/call-third-party-apis-directly.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ For each item in the list/array, you could use the [`users.messages.get`](https:
</Steps>

<Note>
Consider using the [Arcade Google toolkit](/toolkits/productivity/google/gmail), which simplifies the process for retrieving email messages even further! The pattern described here is useful if you need to directly get a token to use with Google in other parts of your codebase.
Consider using the [Arcade Gmail toolkit](/toolkits/productivity/gmail), which simplifies the process for retrieving email messages even further! The pattern described here is useful if you need to directly get a token to use with Google in other parts of your codebase.
</Note>

### How it works
Expand Down
12 changes: 6 additions & 6 deletions pages/home/auth/how-arcade-helps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ With Arcade, developers can now create agents that can _act as the end users of

### Auth permissions and scopes

Each tool in Arcade's toolkits has a set of required permissions - or, more commonly referred to in OAuth2, **scopes**. For example, the [`Google.SendEmail`](/toolkits/productivity/google/gmail#sendemail) tool requires the [`https://www.googleapis.com/auth/gmail.send`](https://developers.google.com/identity/protocols/oauth2/scopes#gmail) scope.
Each tool in Arcade's toolkits has a set of required permissions - or, more commonly referred to in OAuth2, **scopes**. For example, the [`Gmail.SendEmail`](/toolkits/productivity/gmail#gmailsendemail) tool requires the [`https://www.googleapis.com/auth/gmail.send`](https://developers.google.com/identity/protocols/oauth2/scopes#gmail) scope.

A scope is what the user has authorized someone else (in this case, the AI agent) to do on their behalf. In any OAuth2-compatible service, each kind of action requires a different set of permissions. This gives the user fine-grained control over what data third-party services can access and what actions can be executed in their accounts.

Expand All @@ -41,7 +41,7 @@ To learn how Arcade allows for actions (tools) to be authorized through OAuth2 a

### Tools that don't require authorization

Some tools, like [`Search.SearchGoogle`](/toolkits/search/google_search#searchgoogle), allow AI agents to retrieve information or perform actions without needing user-specific authorization.
Some tools, like [`GoogleSearch.Search`](/toolkits/search/google_search#googlesearchsearch), allow AI agents to retrieve information or perform actions without needing user-specific authorization.

<Tabs items={["Python", "JavaScript"]} storageKey="preferredLanguage">
<Tabs.Tab>
Expand All @@ -50,9 +50,9 @@ from arcadepy import Arcade

client = Arcade(api_key="arcade_api_key") # or set the ARCADE_API_KEY env var

# Use the Search.SearchGoogle tool to perform a web search
# Use the GoogleSearch.Searchtool to perform a web search
response = await client.tools.execute(
tool_name="Search.SearchGoogle",
tool_name="GoogleSearch.Search",
input={"query": "Latest AI advancements"},
)
print(response.output.value)
Expand All @@ -64,9 +64,9 @@ import { Arcade } from "@arcadeai/arcadejs";

const client = new Arcade(api_key="arcade_api_key"); // or set the ARCADE_API_KEY env var

// Use the Search.SearchGoogle tool to perform a web search
// Use the GoogleSearch.Search tool to perform a web search
const response = await client.tools.execute({
tool_name: "Search.SearchGoogle",
tool_name: "GoogleSearch.Search",
input: { query: "Latest AI advancements" },
});
console.log(response.output.value);
Expand Down
4 changes: 2 additions & 2 deletions pages/home/auth/tool-auth-status.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ You can also check the authorization status for a specific tool by name:
<Tabs.Tab>
```python
USER_ID = "{arcade_user_id}"
TOOL_NAME = "Google.ListEmails"
TOOL_NAME = "Gmail.ListEmails"

# Get specific tool details
tool = client.tools.get(tool_name=TOOL_NAME, user_id=USER_ID)
Expand Down Expand Up @@ -150,7 +150,7 @@ if tool.requirements:
<Tabs.Tab>
```js
const userId = "{arcade_user_id}";
const toolName = "Google.ListEmails";
const toolName = "Gmail.ListEmails";

// Get specific tool details
const tool = await client.tools.get(toolName, {
Expand Down
2 changes: 1 addition & 1 deletion pages/home/crewai/custom-auth-flow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can now provide the tool manager callback to the `ArcadeToolManager` upon in
manager = ArcadeToolManager(executor=tool_manager_callback)

# Retrieve the provided tools and/or toolkits as CrewAI StructuredTools.
tools = manager.get_tools(tools=["Google.ListEmails"], toolkits=["Slack"])
tools = manager.get_tools(tools=["Gmail.ListEmails"], toolkits=["Slack"])
```

### Use tools in your CrewAI agent team
Expand Down
2 changes: 1 addition & 1 deletion pages/home/crewai/use-arcade-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ manager = ArcadeToolManager(default_user_id="{arcade_user_id}")
"""
Retrieves the provided tools and/or toolkits as CrewAI StructuredTools.
"""
tools = manager.get_tools(tools=["Google.ListEmails"], toolkits=["Slack"])
tools = manager.get_tools(tools=["Gmail.ListEmails"], toolkits=["Slack"])
```

### Use tools in your CrewAI agent team
Expand Down
4 changes: 2 additions & 2 deletions pages/home/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
USER_ID = "{arcade_user_id}"

# get the list of tools
tools = client.tools.list(toolkit="Google")
tools = client.tools.list(toolkit="Gmail")

# collect the scopes
scopes = set()
Expand Down Expand Up @@ -82,7 +82,7 @@ const client = new Arcade();
const user_id = "{arcade_user_id}";

// get the list of tools
const googleToolkit = await client.tools.list({toolkit: "google"})
const googleToolkit = await client.tools.list({toolkit: "gmail"})

// collect scopes
const scopes = new Set(googleToolkit.items.flatMap(i => i.requirements?.authorization?.oauth2?.scopes ?? []));
Expand Down
2 changes: 1 addition & 1 deletion pages/home/google-adk/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def main():
artifact_service = InMemoryArtifactService()
client = AsyncArcade()

google_tools = await get_arcade_tools(client, tools=["Google.ListEmails"])
google_tools = await get_arcade_tools(client, tools=["Gmail.ListEmails"])

# authorize the tools
for tool in google_tools:
Expand Down
18 changes: 9 additions & 9 deletions pages/home/google-adk/use-arcade-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ from google_adk_arcade.tools import get_arcade_tools
# Initialize the Arcade client
client = AsyncArcade()

# Get all tools from the "Google" toolkit
tools = await get_arcade_tools(client, toolkits=["google"])
# Get all tools from the "Gmail" toolkit
tools = await get_arcade_tools(client, toolkits=["gmail"])

# You can request multiple toolkits at once
tools = await get_arcade_tools(client, toolkits=["google", "github", "linkedin"])
tools = await get_arcade_tools(client, toolkits=["gmail", "github", "linkedin"])

# You can request specific tools
tools = await get_arcade_tools(client, tools=["Google_ListEmails", "Slack_ListUsers", "Slack_SendDmToUser"])
tools = await get_arcade_tools(client, tools=["Gmail_ListEmails", "Slack_ListUsers", "Slack_SendDmToUser"])
```
### Authorize the tools

Expand Down Expand Up @@ -86,11 +86,11 @@ from google.genai import types
session_service = InMemorySessionService()
artifact_service = InMemoryArtifactService()

# Create an agent with Google tools
# Create an agent with Gmail tools
google_agent = Agent(
model="gemini-2.0-flash",
name="google_tool_agent",
instruction="I can use Google tools to manage an inbox!",
instruction="I can use Gmail tools to manage an inbox!",
description="An agent equipped with tools to read Gmail emails."
tools=tools,
)
Expand Down Expand Up @@ -153,7 +153,7 @@ async def main():
artifact_service = InMemoryArtifactService()
client = AsyncArcade()

google_tools = await get_arcade_tools(client, tools=["Google.ListEmails"])
google_tools = await get_arcade_tools(client, tools=["Gmail.ListEmails"])

# authorize the tools
for tool in google_tools:
Expand All @@ -168,9 +168,9 @@ async def main():
google_agent = Agent(
model="gemini-2.0-flash",
name="google_tool_agent",
instruction="I can use Google tools to manage an inbox!",
instruction="I can use Gmail tools to manage an inbox!",
description="An agent equipped with tools to read Gmail emails. "
"Make sure to call google_listemails to read and summarize"
"Make sure to call gmail_listemails to read and summarize"
" emails",
tools=google_tools,
)
Expand Down
12 changes: 6 additions & 6 deletions pages/home/langchain/use-arcade-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ from langchain_arcade import ArcadeToolManager

manager = ArcadeToolManager(api_key=arcade_api_key)

# Fetch the "ScrapeUrl" tool from the "Web" toolkit
tools = manager.get_tools(tools=["Web.ScrapeUrl"])
# Fetch the "ScrapeUrl" tool from the "Firecrawl" toolkit
tools = manager.get_tools(tools=["Firecrawl.ScrapeUrl"])
print(manager.tools)

# Get all tools from the "Google" toolkit
tools = manager.get_tools(toolkits=["Google"])
# Get all tools from the "Gmail" toolkit
tools = manager.get_tools(toolkits=["Gmail"])
print(manager.tools)
```
</Tabs.Tab>
Expand All @@ -86,8 +86,8 @@ import { tool } from "@langchain/core/tools";
// Initialize the Arcade client
const arcade = new Arcade();

// Get the Arcade tools, you can customize the toolkit (e.g. "github", "notion", "google", etc.)
const googleToolkit = await arcade.tools.list({ toolkit: "google", limit: 30 });
// Get the Arcade tools, you can customize the toolkit (e.g. "github", "notion", "gmail", etc.)
const googleToolkit = await arcade.tools.list({ toolkit: "gmail", limit: 30 });
const arcadeTools = toZod({
tools: googleToolkit.items,
client: arcade,
Expand Down
12 changes: 6 additions & 6 deletions pages/home/langchain/user-auth-interrupts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ arcade_api_key = os.environ["ARCADE_API_KEY"]

# Initialize the tool manager and fetch tools compatible with langgraph
tool_manager = ArcadeToolManager(api_key=arcade_api_key)
tools = tool_manager.get_tools(toolkits=["Google"])
tools = tool_manager.get_tools(toolkits=["Gmail"])
tool_node = ToolNode(tools)

# Create a language model instance and bind it with the tools
Expand All @@ -65,7 +65,7 @@ model_with_tools = model.bind_tools(tools)
Here are the main code elements:

- arcade_api_key is your Arcade key.
- tool_manager fetches your Arcade tools, for example the "Google" toolkit.
- tool_manager fetches your Arcade tools, for example the "Gmail" toolkit.
- tool_node encapsulates these tools for usage in LangGraph.
- model_with_tools binds your tools to the "gpt-4o" language model, enabling tool calls.

Expand All @@ -87,8 +87,8 @@ const arcade = new Arcade();
// Replace with your application's user ID (e.g. email address, UUID, etc.)
const USER_ID = "{arcade_user_id}";

// Initialize tools from Google toolkit
const googleToolkit = await arcade.tools.list({ toolkit: "google", limit: 30 });
// Initialize tools from Gmail toolkit
const googleToolkit = await arcade.tools.list({ toolkit: "gmail", limit: 30 });
const arcadeTools = toZod({
tools: googleToolkit.items,
client: arcade,
Expand Down Expand Up @@ -117,7 +117,7 @@ const modelWithTools = model.bindTools(tools);

Here are the main code elements:

- arcade.tools.list fetches your Arcade tools, for example the "Google" toolkit.
- arcade.tools.list fetches your Arcade tools, for example the "Gmail" toolkit.
- toZod converts Arcade tools to Zod schemas, which are required by LangGraph.
- ToolNode encapsulates these tools for usage in LangGraph.
- modelWithTools binds your tools to the "gpt-4o" language model, enabling tool calls.
Expand Down Expand Up @@ -355,7 +355,7 @@ for await (const chunk of stream) {
In this example:

- The user prompts the agent to check emails.
- The message triggers a potential need for the "Google" tools.
- The message triggers a potential need for the "Gmail" tools.
- If authorization is required, the code prints a URL and waits until you permit the tool call.

</Steps>
Expand Down
4 changes: 2 additions & 2 deletions pages/home/mastra/use-arcade-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ import {
// Initialize Arcade
const arcade = new Arcade();

// Get Google tools
const googleToolkit = await arcade.tools.list({ toolkit: "google", limit: 30 });
// Get Gmail tools
const googleToolkit = await arcade.tools.list({ toolkit: "gmail", limit: 30 });
export const googleTools = toZodToolSet({
tools: googleToolkit.items,
client: arcade,
Expand Down
Loading