Commit graph

118 commits

Author SHA1 Message Date
Renato Byrro
c1e8fc795a
Dropbox Toolkit (#332)
Basic tools to list items in a folder, search for files / folders, and
download a file content.
2025-03-27 18:34:10 -03:00
Eric Gustin
887ded441e
Toolkit Release 03-25-25 (#329)
Minor version releases for Google and Search Toolkits.

Related PRs:

Google:
https://github.com/ArcadeAI/arcade-ai/pull/321

Search:
https://github.com/ArcadeAI/arcade-ai/pull/316
https://github.com/ArcadeAI/arcade-ai/pull/320
https://github.com/ArcadeAI/arcade-ai/pull/317
2025-03-25 12:01:55 -07:00
Eric Gustin
e7daa1edba
Fix Failing Slack Toolkit Build (#326)
`typing` was being installed and causing builds to fail. [See logs
here](https://github.com/ArcadeAI/arcade-ai/actions/runs/14041206262/job/39311571300)

This PR also removes the `typing-extensions` dependency
2025-03-24 13:45:04 -07:00
Eric Gustin
04bda3cc45
Google Sheets Tools (#321)
| Name | Description |

|--------------------------|---------------------------------------------------------------------------------------|
| Google.CreateSpreadsheet | Create a new spreadsheet with the provided
title and data in its first sheet |
| Google.GetSpreadsheet | Get the user entered and formatted data for
all sheets in the spreadsheet |
| Google.WriteToCell | Write a value to a single cell in a spreadsheet.
|


## Google.CreateSpreadsheet
This tool can create a new spreadsheet with data in its first sheet
This tool takes in the data as a JSON string. Here's an example input: 
```
// Good at large payloads, sparse payloads, and contiguous data payloads.
// For example data[1]["D"] represents the value of the cell in the first row in the D column
{
  // All data in row 1
  1: {
    "A": 42, 
    "B": 2, 
    "D":"=A1+B1"
  },
  // All data in row 54
  54: {
    "A": "my string",
    "QQ": "my far away string"
  }
}
```
The above data format performed better on evals than the other two that
I tested:
```
// Performed poorly at sparse data and also at larger amounts of data
[
  [42, 2, "", "=A1+B1"], 
  [], 
  [],
  ..., 
  ["A": "my string", "", "", ..., "my far away string"]
]
```
```
// Good at small payloads and sparse payloads, but very bad at payloads with contiguous data
{
  "A1": 42", "B1": 2, "D1": "=A1+B1", "A54": "my string", "QQ": "my far away string"
}
```

## Google.GetSpreadsheet
Gets the formatted values for all non empty cells in all sheets of the
spreadsheet. The data returned is in a similar format as the
`Google.CreateSpreadsheet` tool's `data` input parameter. The difference
is that `get_spreadsheet` will return the user entered value (=A1+B1)
and also the formatted value (23.4) for each cell.

## Google.WriteToCell
Writes to a single cell. At this point in time we do not support batch
updating a sheet.
2025-03-24 09:52:51 -07:00
Renato Byrro
c9ed5ce123
Google Shopping search tool (#317) 2025-03-21 21:09:54 -03:00
Renato Byrro
f6765bed67
Walmart shopping search tools (#320) 2025-03-21 21:02:45 -03:00
Sterling Dreyer
227f02d2fd
Add Notion and Youtube toolkits to worker (#322) 2025-03-21 15:33:21 -07:00
Renato Byrro
2338e823cf
YouTube Search tools (#316) 2025-03-21 19:26:52 -03:00
Eric Gustin
a3371d71ac
Fix Search.SearchJobs for Anthropic Models (#319)
Fixes this error:

```bash
openai.InternalServerError: Error code: 503 - {'name': 'all_models_unavailable', 'message': "failed to chat with models; Attempt 0: anthropic - anthropic (type = error, message = tools.75.custom.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_-]{1,64}$'); Attempt 1: anthropic - anthropic (type = error, message = tools.75.custom.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_-]{1,64}$'); Attempt 2: anthropic - anthropic (type = error, message = tools.75.custom.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_-]{1,64}$')"}
```
2025-03-19 20:53:46 -07:00
Eric Gustin
86696ea794
Bump math toolkit version (#318) 2025-03-19 18:05:46 -07:00
Renato Byrro
81b2624c1a
Fix Slack bug when sending msg to a private channel (#313) 2025-03-19 17:45:03 -07:00
Mateo Torres
ab735eb442
increased precision of decimal-based math tools to 100 digits (#315)
Some edge cases of a benchmark were failing due to low precision,
increased the precision to 100 digits.
2025-03-19 13:48:18 -03:00
Renato Byrro
1867443b84
Bump search toolkit version (#312) 2025-03-18 11:30:01 -07:00
Renato Byrro
a3f55378ca
Add Google News, Jobs, and Maps Tools (#311)
Documentation PR: https://github.com/ArcadeAI/docs/pull/190
2025-03-18 15:23:36 -03:00
Eric Gustin
a92f86d783
Bump notion version (#310)
when testing earlier, 0.1.0 was used for a failed pypi upload. I'm
assuming this is why `This filename has already been used, use a
different version` is occuring
2025-03-17 21:28:10 -07:00
Eric Gustin
7edaa0a996
Update Notion Toolkit (#309)
1. The Arcade Worker doesn't like it when the package name is different
than the directory name. This PR renames the directory from
`arcade_notion` to `arcade_notion_toolkit`
2. `Notion` is not a well-known provider name in `arcade-ai==1.0.5`,
I've updated the dep to represent this.
2025-03-17 21:15:00 -07:00
Eric Gustin
a787b6dbe3
Explicitly define notion directory name (#307) 2025-03-17 17:02:45 -07:00
Eric Gustin
ca2ca50a1f
Rename notion toolkit PyPI package (#306) 2025-03-17 16:46:57 -07:00
Eric Gustin
53a12802f6
More updates to Publish Toolkit Workflow (#305) 2025-03-17 16:33:51 -07:00
Eric Gustin
29e895ca44
Change notion version (#304) 2025-03-17 16:13:28 -07:00
Eric Gustin
e048f277fd
Fix publish toolkit workflow (#302)
There was a bug where if the poetry publish failed, then the slack
message would say that it succeeded.

I am setting the notion toolkit version to 0.0.1. This is expected to
fail. I'm doing this to ensure the E2E issue is fixed.

The grep'd string comes from
https://github.com/python-poetry/poetry/blob/main/src/poetry/publishing/uploader.py#L246-L249
2025-03-17 15:40:32 -07:00
Eric Gustin
cd7eca306a
Release Arcade Math 1.0.0 (#300) 2025-03-17 12:58:17 -07:00
Eric Gustin
25c9f76ca8
Fix secrets for firecrawl tool (#299) 2025-03-16 15:38:04 -07:00
Eric Gustin
b7d5736995
Replace changed-files GH Action (#295) 2025-03-15 15:15:01 -07:00
Eric Gustin
7428397318
Notion Toolkit (#283) 2025-03-15 11:08:10 -08:00
Eric Gustin
99ff11d30e
Various Search Toolkits (#285)
1. Add the following tools:
* Google Finance
    - get_stock_summary
    - get_stock_historical_data
* Google Flights
    - search_roundtrip_flights
    - search_one_way_flights
* Google Hotels
    - search_hotels
    
2. Add some common helper functions for serpAPI tools.
2025-03-14 14:23:14 -07:00
Mateo Torres
f04087b389
Math tools expanded (#293)
Migrated all interfaces to get and return strings.

Added tests and evals for all functions (except the random generation)
Math functions are now organized into different math categories

---------

Co-authored-by: Nate Barbettini <nate@arcade-ai.com>
2025-03-14 09:47:04 -03:00
Eric Gustin
2fe907e5dd
Release Google Toolkit version 1.0.0 (#280)
Updates to the Google Toolkit:
https://github.com/ArcadeAI/arcade-ai/pull/264 (google patch)
https://github.com/ArcadeAI/arcade-ai/pull/188 (google minor)
https://github.com/ArcadeAI/arcade-ai/pull/272 (google major)
https://github.com/ArcadeAI/arcade-ai/pull/269 (google minor)
https://github.com/ArcadeAI/arcade-ai/pull/265 (google major)
2025-03-12 14:25:50 -07:00
Renato Byrro
ac0f5aa10c
Search Google Drive documents and retrieve contents (#265)
This tool will be useful in scenarios akin to RAG, where someone wants
to ask questions or request the production of a summary, for instance,
about a bunch of documents related to a particular topic. Currently, to
fulfill such requests, the LLM needs to first `list_documents`, then
`get_document_by_id` for each document.

We also implement a utility functions to return documents in Markdown
and HTML, since the Drive API JSON is verbose and would waste too many
tokens unnecessarily.

Limitations: the Markdown/HTML utilities do not handle table of contents
(which I think aren't really useful here), headers, footers, or
footnotes.

---
This PR deprecates `list_documents` and implements `search_documents`,
apart from `search_and_retrieve_documents`). This configuration makes it
easier for LLMs to understand when to call each tool.

Both tools had their interfaces refactored to remove Google API-specific
arguments that were confusing LLMs sometimes, such as "corpora" and
"support_all_drives". It now accepts arguments that better relate to
expected user requests.

---------

Co-authored-by: Eric Gustin <eric@arcade.dev>
2025-03-07 18:42:12 -03:00
Renato Byrro
2135101acd
Tool to retrieve file tree structure from Google 'My Drive' and 'Shared Drives' (#269) 2025-03-07 18:02:09 -03:00
Nate Barbettini
e9ee3bba40
fix: Use tool secrets in toolkits (#271)
~~Note: Don't merge until the correct secrets have been added to Arcade
Cloud.~~

Ready to merge, the feature is already on its way to prod.

---------

Co-authored-by: Eric Gustin <eric@arcade.dev>
2025-03-04 13:35:36 -08:00
Renato Byrro
75da4bf8b0
Make search_contacts interface more LLM-friendly (#272)
Break down `search_contacts` into `search_contacts_by_name` and
`search_contacts_by_email`. The search_contacts' `query` argument was
not clear enough for LLMs.
2025-02-28 16:47:03 -03:00
Alex Salazar
7b1110f2b7
Alex gmail improvements (#188)
Improved gmail toolkit. Added support for threading in draft replies,
multipart email parsing, and label management. Fixed the DateRange
parameter issue in list_emails_by_headers. Added logging and removed
print statements. Created custom exceptions for each specific google
toolkit.

-----
Summary of changes by @byrro:

- Fixed minor bug related to the `date_range` argument of
`list_emails_by_header`
- A few utility functions (`build_email_message`,
`build_reply_recipients`, `build_reply_body`) to centralize logic and
remove repeated code from email-sending tools
- New `reply_to_email` tool (apart from `write_draft_reply_email`,
implemented by Alex) to keep the toolkit consistent
- Evals and unit tests
- Handling of reply-to (only sender) and reply-to-all recipients
- Removed some unnecessary debug messages, which Alex had added to
replace print statements
- Removed HTML handling implemented by Alex in `write_draft_reply_email`
> I think we should either support HTML across all applicable tools or
not at all; I decided to remove it and leave this feature for a future
PR.

---------

Co-authored-by: Renato Byrro <rmbyrro@gmail.com>
2025-02-27 11:56:32 -03:00
Nate Barbettini
62173da343
Update scope on Google.ListDocuments (#264)
Updating the scope on this unreleased tool to be more granular.
2025-02-20 21:36:46 -08:00
Eric Gustin
eeb47dbec5
[Toolkit Release] Weekly Toolkit Release 02-20-25 (#261)
# Weekly Toolkit Release 02-20-25
Previous Toolkit Release: #248 

## Google Toolkit Minor Release
https://github.com/ArcadeAI/arcade-ai/pull/249
#259 

## Slack Toolkit Minor Release
#254 

## X Toolkit Patch Release
#256
2025-02-20 13:27:35 -08:00
Nate Barbettini
274e63c9e5
Polish up Google.SearchContacts and CreateContact (#259)
Adding the missing polish (evals, tests) for #249
2025-02-20 08:53:12 -08:00
Renato Byrro
8efa9a51df
Slack tools to retrieve messages & metadata from multi-person DM conversation (#254) 2025-02-19 16:51:45 -03:00
Nate Barbettini
becd86da0c
Google toolkit: Search and create contacts POC (#249)
This is an initial sketch of what Contacts (People) API tools could look
like. But I haven't yet thought like an MX Engineer @byrro 😉
2025-02-18 17:27:33 -08:00
Eric Gustin
7d45a99722
X Toolkit: Handle no tweets returned in search (#256)
## PR Description
Search ([see API docs
here](https://docs.x.com/x-api/posts/recent-search)) returns a 'data'
field that maps to a list of tweets returned. We've observed that the
'data' field is not present if no tweets match the search. This PR
handles that case safely.
2025-02-18 13:28:33 -08:00
Eric Gustin
49ff013e80
[Toolkit Release] Weekly Toolkit Release 02-13-25 (#248)
# Weekly Toolkit Release 02-13-25
Previous Toolkit Release: #236 

## Associated PRs
* Minor #241
2025-02-13 13:06:11 -08:00
Renato Byrro
a00bd4734e
Tool to retrieve Slack messages from a DM conversation with a given username (#241)
Currently, retrieving DMs with a given username requires several
actions: first get the current user's ID; list all users and find the ID
of the username; then scan all DM conversations and find the one with
the current user's ID and the username's ID, to finally retrieve the
messages using that conversation ID.

This tool abstracts all that in a single call.

PS: we'll implement a similar tool for multi-person DM conversations in
a subsequent PR.
2025-02-10 09:01:04 -03:00
Eric Gustin
be2539602f
Evals New Features (#208)
# PR Description
This PR adds ~~four~~ three improvements to evals.

~~## 1. Add parameterized eval cases~~
~~Adds a new method named `add_parameterized_case`. Just like pytest’s
parameterized tests, eval cases can be parameterized with multiple user
messages. Adds a case to the `EvalSuite` for each user message. All
cases have the same expected tool call(s), params, additional_messages.
This reduces duplicate code and makes it easy to observe how a model
performs based on increasingly more difficult prompts.~~
```python
""" NO LONGER IN THIS PR
user_messages = [
    "Call the delete tweet by id tool with the tweet ID '148975632'.",
    "Delete the tweet with ID '148975632'.",
    "I don't want to have this tweet (148975632) on my account anymore.",
    "do the opposite of post for https://x.com/x/status/148975632",
]

suite.add_parameterized_case(
    name="Delete a tweet by ID",
    user_messages=user_messages,
    expected_tool_calls=[
        ExpectedToolCall(
            func=delete_tweet_by_id,
            args={"tweet_id": "148975632"},
        )
    ],
    critics=[
        BinaryCritic(
            critic_field="tweet_id",
            weight=1.0,
        ),
    ],
)
"""
```

~~PASSED Delete a tweet by ID (user_message 1 of 4) -- Score: 100.00%~~
~~PASSED Delete a tweet by ID (user_message 2 of 4) -- Score: 100.00%~~
~~PASSED Delete a tweet by ID (user_message 3 of 4) -- Score: 100.00%~~
~~FAILED Delete a tweet by ID (user_message 4 of 4) -- Score: 0.00%~~
~~Summary -- Total: 4 -- Passed: 3 -- Failed: 1~~

## 2. Parameters that are not explicitly criticized are assigned a
`NoneCritic`.
A NoneCritic has no effect on the evaluation results and does not
actually evaluate. Parameters that have a NoneCritic will be displayed
as ‘un-criticized’ in the evaluation summary (if `-d` flag is used).

![image](https://github.com/user-attachments/assets/300756ec-9b53-436a-9cf9-fc61d0b00c01)


## 3. Add a hardcoded `seed` parameter for evals.
The seed parameter aides in receiving (mostly) consistent outputs -
aiding in reproducibility for evaluations.

## 4. Disallow more than one critic for the same field.
Raises a `ValueError` if more than one critic is assigned to a field.

---------

Co-authored-by: Eric Gustin <eric@arcade-ai.com>
2025-02-05 15:22:08 -08:00
Renato Byrro
149c25d967
Fix missing scopes in tools that call other tools (#240) 2025-02-03 17:39:34 -08:00
Eric Gustin
aaf1dbd795
[Toolkit Release] Weekly Toolkit Release 01-29-25 (#236)
# Weekly Toolkit Release 01-29-25
Previous Toolkit Release: #222 
## Associated PRs
Slack Patch: #232 
GitHub Patch: #227
2025-01-29 09:51:16 -08:00
Eric Gustin
ce2fb0f6c1
Update Examples & Various Renames (#233)
# PR Description
* This PR updates code in `examples/` to be compatible with version
1.0.0
* This PR removes the Spotify examples since the Arcade hosted worker
doesn't currently cataloge the Spotify toolkit. We can reintroduce these
examples when it does.
* This PR performs various renames across the codebase for
`arcade-ai.com` --> `arcade.dev` and `Arcade AI` --> `Arcade`
2025-01-28 17:17:29 -08:00
Eric Gustin
3657fc79b6
Whitelist Toolkit Release Managers (#234)
# PR Description
The `github.event.pull_request.author_association` in the "Prevent
Unauthorized Version Updates" workflow was returning inconsistent
results by saying that MEMBERS were CONTRIBUTORS. This PR moves away
from `author_association` in favor of a whitelist text file containing
the GitHub usernames of authorized toolkit release managers.

A toolkit release manager has the following special permissions:
* Can change the version of an existing toolkit
* Can delete an existing toolkit 
* Can rename an existing toolkit
2025-01-27 14:35:45 -08:00
Renato Byrro
27d8aa7f43
Fix bug in slack tool pagination (#232)
The `get_conversation_metadata_by_name` tool retrieves conversation
metadata from another tool, `list_conversations_metadata`, but was
accessing the `next_cursor` using the Slack API response dict structure,
instead of the tool response structure. As a result, in that tool, the
tool would never actually paginate to the second page. This PR fixes it
and also adjust tests to capture the issue appropriately.
2025-01-27 12:23:00 -08:00
Renato Byrro
aa0cd02fe9
Make starred = True by default in Github tool (#227)
`starred` is a required argument of the
`arcade_github.activity.set_starred` tool, but when it is not provided
in the tool call, the engine is somehow passing it with a falsy value,
instead of raising an error. the falsy value makes the tool unstar a
repo by default, which is not the desired behavior.

we're setting the `starred` arg to True in the tool interface to prevent
that.
2025-01-24 13:50:30 -08:00
Eric Gustin
ca90b31262
Update README and LICENSE (#220)
Updates README to point to updated URLs

---------

Co-authored-by: Nate Barbettini <nate@arcade-ai.com>
2025-01-23 19:43:48 -08:00
Eric Gustin
d5d6942ed1
Weekly Toolkit Release (#222)
# Relevant PRs
Google: #207 
Spotify: #204 

Slack: #162

Also relaxes arcade-ai dependency for all toolkits
2025-01-23 18:46:05 -08:00