MCP Server Framework and Tool Development library for building custom capabilities into agents.
Find a file
Eric Gustin 7f13eb5efb
Fix arcade chat Auth Polling (#96)
# PR Description
When a tool call required authorization, `arcade chat` would hit rate
limits extremely quickly when waiting to authorize with a given link.
This PR introduces using long polling when sending a GET request to
Arcade API `/auth/status`. The `/auth/status` endpoint supports the
`wait` query parameter, where if present, will not respond until either
auth status becomes `completed` or `timeout` is reached. If the
`timeout` is reached, `arcade chat` catches the 408 response and tries
again. For `arcade chat` we set the `wait` query param to 60 seconds.
2024-10-07 17:24:05 -07:00
.github Fix Package Builds (#82) 2024-10-02 10:51:18 -07:00
.vscode Fix Github.CountStargazers and add tests (#92) 2024-10-04 16:09:08 -07:00
arcade Fix arcade chat Auth Polling (#96) 2024-10-07 17:24:05 -07:00
docker Enable Otel On Actor (#93) 2024-10-05 13:40:02 -07:00
examples Fix small bugs in pyproject.tomls (#88) 2024-10-04 12:08:03 -07:00
schemas/preview SDK: Generic OAuth 2.0 connector (#81) 2024-10-03 16:40:02 -07:00
toolkits LinkedIn.CreateTextPost: Fix tool execution error (#94) 2024-10-07 09:08:30 -07:00
.editorconfig Fix ruff (#64) 2024-09-25 09:47:30 -07:00
.gitignore Fix ruff (#64) 2024-09-25 09:47:30 -07:00
.pre-commit-config.yaml Fix ruff (#64) 2024-09-25 09:47:30 -07:00
.prettierignore Fix ruff (#64) 2024-09-25 09:47:30 -07:00
.prettierrc.toml Fix ruff (#64) 2024-09-25 09:47:30 -07:00
.ruff.toml Toolkit lint cleanup (#72) 2024-10-01 10:41:38 -07:00
CONTRIBUTING.md MyPy Compliant (#5) 2024-07-16 17:01:38 -07:00
cspell.config.yaml SDK: Generic OAuth 2.0 connector (#81) 2024-10-03 16:40:02 -07:00
LICENSE Tool SDK, Schemas (#2) 2024-07-14 23:37:46 -07:00
Makefile Fix small bugs in pyproject.tomls (#88) 2024-10-04 12:08:03 -07:00
README.md Add initial X toolkit, remove Github toolkit, rename math toolkit (#52) 2024-09-23 13:42:22 -07:00

Release Build status codecov Commit activity License

Arcade AI

Arcade AI is the developer platform for building tools designed to be used with language models. With Arcade, developers can create, deploy, and easily integrate new tools with language models to enhance their capabilities.

arcade-ai

The arcade-ai package contains:

  • arcade CLI
  • arcade.sdk Tool SDK
  • arcade.actor serving tools with FastAPI, Flask, or Django

Installation

To install the Arcade AI package, execute the following command:

pip install arcade-ai

or install from source:

git clone https://github.com/arcadeai/arcade-ai.git
cd arcade-ai
pip install poetry
poetry install

First steps

Follow these steps if you've cloned the repo and installed the package from source:

cd examples/search
poetry install

arcade show arcade_search

This will show an output that looks like

┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┓ ┃ Name ┃ Description ┃ Toolkit ┃ Version ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━┩ │ SearchGoogle │ Search Google using SerpAPI and return organic search results. │ search │ 0.1.0 │ └──────────────┴────────────────────────────────────────────────────────────────┴───────────┴─────────┘

Predict the parameters with a model and run the tool with the predicted parameters. Arcade adds the execute choice to the tool, which allows you to run the tool with the predicted parameters in a single request.

> arcade run arcade_search "who is Sam Partee?" --choice "execute"
Running tool: SearchGoogle with params: {'query': 'Sam Partee'}

[{"position": 1, "title": "Sam Partee (@SamPartee) / X", "link": "https://twitter.com/sampartee", "redirect_link":
"https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://twitter.com/sampartee&ved=2ahUKEwjBwKiz3b6HAxV1VTABHXL8BZQQFnoECAYQAQ",
"displayed_link": "1.5K+ followers", "thumbnail":
.....
.. (truncated)

Arcade also adds the predict choice to the tool, which allows you to predict the parameters with a model.

> arcade run arcade_search "who is Sam Partee?" --choice "predict" # also the default
Running tool: SearchGoogle with params: {'query': 'Sam Partee'}

Sam Partee is a CTO, Co-founder of Arcade AI and former Machine Learning Engineer at companies like RedisInc and HPE_Cray. They have
expertise in AI/ML, vector search, Python, HPC, and are a sports fan.