arcade-mcp/README.md
Eric Gustin 5b64404839
Update README.md (#124)
Update the README so that it has useful content and looks nice.
2024-10-24 18:43:16 -07:00

10 KiB

DocsIntegrationsCookbookPython ClientJavaScript Client

Arcade AI empowers any developer to seamlessly integrate large language models (LLMs) with real-world systems, enabling secure, user-authenticated interactions with data and services.

What is Arcade AI?

Arcade AI bridges the gap between powerful AI models and practical applications by making it easy for developers to build tools that perform real-world actions on behalf of users. With Arcade AI, unlock the true potential of AI in your applications. Check out our documentation.

Pst. hey, you, join our stargazers! It's free!

GitHub stars

How to use it?

We provide a hosted version of Arcade AI that you can use immediately.

Requirements

  1. A free Arcade AI account
  2. Python 3.10+ verify your Python version by running python --version or python3 --version in your terminal
  3. pip the Python package installer that is typically included with Python

Installation

pip install 'arcade-ai[fastapi]'
arcade login

Verify Installation

arcade chat

This launches a chat with the Arcade Cloud Engine (hosted at api.arcade-ai.com). All pre-built Arcade tools are available to use.

For example, try asking:

star the ArcadeAI/arcade-ai repo on Github

Arcade AI will ask you to authorize with GitHub, and then the AI assistant will star the ArcadeAI/arcade-ai repo on your behalf.

You'll see output similar to this:

Assistant (gpt-4o):
I starred the ArcadeAI/arcade-ai repo on Github for you!

You can use Ctrl-C to exit the chat at any time.

Features

Arcade AI integrates with a variety of services to provide a seamless experience for developers and users.

  1. Hosted Tools: Arcade AI offers a number of prebuilt toolkits that are ready to use out of the box. These toolkits can be used to interact with a variety of services.
  2. Custom Tools: Developers can build their own tools to integrate with Arcade AI.
  3. Auth Providers: Arcade AI integrates with a variety of auth providers to enable users to seamlessly and securely allow Arcade AI tools to access their data.

You can find all of Arcade AI's capabilities and how to use them in our documentation.

Arcade AI Hosted Tools



Arcade AI offers a number of prebuilt toolkits that can be used to interact with a variety of services.

Calling tools directly

from arcadepy import Arcade

client = Arcade()

USER_ID = "you@example.com"
TOOL_NAME = "Github.SetStarred"

# Perform User Authorization
auth_response = client.tools.authorize(
    tool_name=TOOL_NAME,
    user_id=USER_ID,
)
if auth_response.status != "completed":
    print(f"Click this link to authorize: {auth_response.auth_url}")
    input("After you have authorized, press Enter to continue...")

# Run the tool
inputs = {"owner": "ArcadeAI", "name": "Hello-World", "starred": True}
response = client.tools.run(
    tool_name=TOOL_NAME,
    inputs=inputs,
    user_id=USER_ID,
)
print(response)

Calling tools with the LLM API

import os
from openai import OpenAI

USER_ID = "you@example.com"
PROMPT = "Star the ArcadeAI/arcade-ai repository."
TOOL_NAME = "Github.SetStarred"
# Use "generate" to have the LLM generate a response after the tool executes. Use 'execute' to get the tool's output directly.
TOOL_CHOICE = "generate"

client = OpenAI(
    base_url="https://api.arcade-ai.com",
    api_key=os.environ.get("ARCADE_API_KEY"))

response = client.chat.completions.create(
    messages=[
        {"role": "user", "content": PROMPT},
    ],
    model="gpt-4o-mini",
    user=USER_ID,
    tools=[TOOL_NAME],
    tool_choice=TOOL_CHOICE,
)
print(response.choices[0].message.content)

Building Your Own Tools

Learn how to build your own tools by following our creating a custom toolkit guide.

Evaluating Tools

Arcade AI enables you to evaluate your custom tools to ensure they function correctly with the AI assistant, including defining evaluation cases and using different critics.

Learn how to evaluate your tools by following our evaluating tools guide.

Auth



Learn how to use Arcade AI to obtain user authorization for accessing third-party services in our authorizing agents with Arcade AI guide.

Learn how to use Arcade AI's auth providers to enable tools and agents to call other services on behalf of users in our tools with auth guide.

To see all available auth providers, refer to the auth providers documentation.

Models



Arcade AI supports a variety of model providers when using the Arcade AI LLM API.

To see all available models, refer to the models documentation.

Contributing

We love contributions! Please read our contributing guide before submitting a pull request. If you'd like to self-host, refer to the self-hosting documentation.

Contributors

contributors

↑ Back to Top ↑