Commit graph

206 commits

Author SHA1 Message Date
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
4c95b7bebb
arcade-ai Version 1.0.0 (#224) 2025-01-23 19:28:35 -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
Eric Gustin
6fb45c8797
Use AuthorizationResponse and ToolDefinition (#221) 2025-01-23 18:32:00 -08:00
Eric Gustin
66e54d7cde
Slack Tools (#162)
implements additional tools for Slack related to retrieving
conversations metadata, list of members, history of messages, as well as
sending messages to private/public channels and DMs / multi-person DMs.

---------

Co-authored-by: Eric Gustin <eric@arcade-ai.com>
Co-authored-by: Renato Byrro <rmbyrro@gmail.com>
2025-01-23 18:15:52 -08:00
Sterling Dreyer
130858a958
Ignore Toolkits (#219) 2025-01-23 15:37:15 -08:00
Sam Partee
09a0784cd5
Improve Docker Build and Deployment for Arcade Worker (#205)
This PR enhances the Docker build and deployment process for the Arcade
Worker by:

- **Modularizing Docker Builds:**
- Introduces a new `INSTALL_TOOLKITS` build argument in the `Dockerfile`
to conditionally include toolkits. this enables the creation of a
`arcadeai/worker-base` which can be used to build custom containers in a
multi-stage build. an example of this is included in the example dir.
- Adds `docker-base` Makefile target to build a lightweight base image
without toolkits.

- **Publishing to GitHub Container Registry (GHCR):**
- Adds Makefile targets `publish-ghcr` and `gh-login` for pushing images
to GHCR.
  - Supports publishing both base and full images with toolkits to GHCR.

- **Docker Compose:**
  - Add Docker compose file and setup
  - Renames the `actor` service to `worker`
- Adds an `nginx` service in `docker-compose.yml` to proxy requests to
the Arcade Engine.
  - Introduces an `nginx.conf` file for the Nginx service.

- **Streamlining Toolkit Installation:**
- Moves toolkit installation from the `start.sh` script to the Docker
build process.
- Creates a `toolkits.txt` file to manage toolkit dependencies which can
be edited easily when we want to add a new toolkit. Developers can also
use this approach as shown in the example.

- **Improving Configuration Files:**
- Updates `docker.engine.yaml` and `env.example` to align with the new
setup.


TODO:
- CI/CD needs to be adjusted so that images are pushed to ghcr on
release.
- AWS resources need to be renamed actor -> worker @EricGustin 

This can go in after the above two items are resolved.

---------

Co-authored-by: Wils Dawson <wils@arcade-ai.com>
Co-authored-by: Eric Gustin <34000337+EricGustin@users.noreply.github.com>
Co-authored-by: sdreyer <sterling@arcade-ai.com>
Co-authored-by: Sterling Dreyer <sdreyer21@gmail.com>
Co-authored-by: Nate Barbettini <nathanaelb@gmail.com>
2025-01-23 12:57:24 -08:00
Sam Partee
6d8e943c96
Update langchain integration to 0.2.0 (#213)
**PR Description**

This update bumps the integration’s version to `0.2.0` and brings
several important changes to how `langchain-arcade` interfaces with
Arcade tools:

1. **Updated Tool Definition Imports**  
• Replaces `arcadepy.types.shared.ToolDefinition` with
`arcadepy.types.ToolGetResponse as ToolDefinition`.
• The parameter extraction is now done via `tool_def.input.parameters`
instead of the previous `tool_def.inputs.parameters`.

2. **Authorization Flow Adjustments**  
• Uses `auth_response.url` instead of `auth_response.authorization_url`.
• The `authorize` and `is_authorized` methods now rely on the Arcade
client’s updated arguments (`client.auth.status(id=authorization_id)`).

3. **Tool Execution Parameter Renaming**  
• The `execute` method now expects `input=kwargs` instead of
`inputs=kwargs`, aligning with Arcade’s new API spec.

4. **Tool Retrieval Enhancements**  
• `_retrieve_tool_definitions` is revised to better handle pagination
and tool listing (including when no tools/toolkits are explicitly
provided).

5. **Version & Dependency Updates**  
   • Increases `langchain-arcade` to `0.2.0`.  
   • Switches `arcadepy` dependency to `~1.0.0rc1`.  
• Updates example requirements to consume
`langchain-arcade[langgraph]>=0.2.0`.

These changes may affect existing code that relies on older parameter
names (`inputs.parameters` → `input.parameters`) and the renamed execute
argument. Please ensure any integrations or custom usage of Arcade tools
is updated accordingly.
2025-01-22 13:01:15 -08:00
Sterling Dreyer
adaa0da649
Cleanup release action (#217) 2025-01-21 16:18:11 -08:00
Sterling Dreyer
b1ebd2afab
Fix pending test check (#216) 2025-01-21 15:57:24 -08:00
Eric Gustin
1bd8eac6ed
Add Ability to Disable Tools (#215)
# PR Description
This PR introduces a new environment variable `ARCADE_DISABLED_TOOLS`.
Tools that are added to this env var are not added to the worker's
`ToolCatalog`. In effect, they are disabled for the worker.

## How to use the `ARCADE_DISABLED_TOOLS` environment variable
* Each tool is separated by a comma.
* For each tool, specify the toolkit name in camel case and the tool
name in camel case.
* Do not include versions. (This is a simple implementation. We can add
disabling specific versions in the future if needed)
* Separate the toolkit name and the tool name with your environment's
tool name separator. By default, the tool name separator is `.`, but you
can override this with the `ARCADE_TOOL_NAME_SEPARATOR` environment
variable.

Correct: `export
ARCADE_DISABLED_TOOLS="Math.Add,Spotify.GetAvailableDevices,Math.Sqrt"`
Incorrect: `export
ARCADE_DISABLED_TOOLS="Math.Add@0.1.0,Spotify.get_available_devices,Sqrt`
2025-01-21 15:56:40 -08:00
Sterling Dreyer
899c84929b
Multiarch builds (#214)
Changes CICD to build the worker image on separate runners and push to
both GHCR and ECR
2025-01-21 15:49:24 -08:00
Sterling Dreyer
21ddeb1c93
Fix dev container builds (#212) 2025-01-20 11:32:23 -08:00
Eric Gustin
7a7f37e5fc
Add arcade --version (#211)
# PR Description
Implements a version callback for the arcade CLI.

### Usage
`arcade --version` OR `arcade -v`

### Example Output
`Arcade (version 0.1.5)`
2025-01-17 15:48:36 -08:00
Renato Byrro
830f6f9f90
Remove Spotify examples using deprecated tools (#199)
Refactor toolkit implementation examples following the removal of two
Spotify tools in
[PR#196](https://github.com/ArcadeAI/arcade-ai/pull/196), due to Spotify
API deprecation announcement.
2025-01-17 15:23:48 -08:00
Eric Gustin
6035cde920
Update auth provider_id (#173)
# PR Description
Well known providers (Google, X, Dropbox, etc.) can optionally have an
`id` in addition to their hardcoded `provider_id`. For non well known
providers, they must provide an `id`, and the `provider_id` is hardcoded
as `None`.

```python
OAuth2() # INVALID
OAuth2(provider_id="abc") # INVALID
OAuth2(id="abc") # VALID
OAuth2(provider_id="abc", id="def") # INVALID
```
```python
Google() # VALID
Google(provider_id="abc") # INVALID
Google(id="abc") # VALID
Google(provider_id="abc", id="def") # INVALID
```

---------

Co-authored-by: Wils Dawson <wils@arcade-ai.com>
2025-01-17 11:38:06 -08:00
Eric Gustin
cdd90b4844
Remove toml (#210)
# PR Description
`arcade.toml` was deprecated in favor of `credentials.yaml` in PR #116 .
This PR completely removes any references to handling the deprecation &
any references to `arcade.toml`
2025-01-17 09:56:43 -08:00
Eric Gustin
3f9da98560
Updates for arcadepy1.0.0rc Compatibility (#209)
# PR Description
arcadepy version 1.0.0rc renamed `AuthorizationResponse` to
`AuthAuthorizationResponse`
2025-01-17 09:26:11 -08:00
Eric Gustin
e9d630f5dc
Check for unauthorized toolkit changes (#200)
# PR Description
Add checks for unauthorized actions performed on toolkits. A PR cannot
be merged if it contains an unauthorized toolkit action.

An unauthorized toolkit action is defined as:
1. The author of the PR is not an OWNER or a MEMBER of the ArcadeAI
organization
2. AND one of the following applies:
- A toolkit's version is altered (i.e., the version in
`toolkits/*/pyproject.toml`
    - A toolkit is deleted
- A toolkit's PyPI package name is renamed (i.e., the name in
`toolkits/*/pyproject.toml`
2025-01-16 17:28:20 -08:00
Eric Gustin
48c9870eac
Removed unused param (#207)
# PR Description
For the `Google.GetThread` tool, we had a parameter named
`metadata_headers`. This parameter only makes a difference if the format
is "metadata", but the tool will never have the format "metadata". So,
the input parameter is useless. This parameter should have never been
added to the tool and we should remove it before public beta.
2025-01-16 09:41:26 -08:00
Eric Gustin
e314ac5ed5
Remove deprecated eval imports (#206)
# PR Description
Continuation of PR #196
2025-01-15 17:40:25 -08:00
Renato Byrro
62327c30a7
Pytests for Spotify tools (#204) 2025-01-14 12:45:32 -08:00
Eric Gustin
5022d339a2
Update arcade new template to pass linting (#201) 2025-01-14 08:32:38 -08:00
Eric Gustin
8795871d51
Check if toolkit version changed before attempting publish (#198)
# PR Description
Changes to a toolkit without changes to the toolkit's version fail the
'Publish Toolkit' workflow with `HTTP Error 400: File already exists
('arcade_zoom-0.1.7.tar.gz', with blake2_256 hash
'02183cda607f06616e7edb17e3d22bc11d1d83b074b3e44066b78ec72602fb37'). See
https://pypi.org/help/#file-name-reuse for more information.`, for
example.

This PR adds the `--skip-existing` flag to `poetry publish` to avoid
attempting to publish an existing version. Skips slack notification if
publish is skipped.


The `grep`'d string comes from
https://github.com/python-poetry/poetry/blob/main/src/poetry/publishing/uploader.py#L246-L249
2025-01-13 10:00:24 -08:00
Eric Gustin
4098cb8464
Fix 'Check Toolkits' Workflow (#197)
# PR Description
The 'Check Toolkits' workflow was failing if no toolkits were changed.
This PR gracefully exits the workflow for this case.
2025-01-09 10:11:20 -08:00
Eric Gustin
22f2422aff
Add progress bar to Evals CLI (#185)
Adds a progress bar to the arcade evals CLI command. Displays progress
on the number of `@tool_eval` functions that have completed.
2025-01-08 22:40:45 -08:00
Renato Byrro
c5e29693e7
Remove tools relying on deprecated Spotify endpoints (#196)
Spotify deprecated several endpoints in Nov, 2024. Two of them were
being used in Tracks tools. We're removing those from the Toolkit.

Spotify announcement:
https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
Archive: https://archive.is/LMBe5
2025-01-08 16:40:36 -03:00
Renato Byrro
cd837a363d
Separate tools & helper funcs in separate files (#192)
Separates utility and helper functions, as well as constant values (e.g.
base URLs), in dedicated files, apart from tools files.
2025-01-08 16:39:25 -03:00
Renato Byrro
cd1fb648bd
Return media attachments metadata when retrieving X tweets (#191)
Modifies X tweet tools to return metadata about media attachments
(photo, GIF or video) when retrieving a tweet by ID, username or
keywords.

The tool will always return media attachments by default. Since it's
only metadata, it shouldn't add significant network overhead to existing
implementations of the tool.

My guess is more often than not people will want this info included.
When not needed, it doesn't hurt to include by default. It'd be annoying
to have to ask the LLM to include it every time they need.
2025-01-08 16:36:43 -03:00
Eric Gustin
b2bdfe2459
Least Privileged Scope for Update Calendar (#195) 2025-01-08 10:03:04 -08:00
Eric Gustin
d5067af023
Bump toolkit versions (#194) 2025-01-07 13:32:36 -08:00
Eric Gustin
feb83c95ca
Pin poetry to 1.8.5 (#193)
# PR Description
Poetry released v2 with many breaking changes a couple days ago. The
`install-poetry` action that our workflows use default to that v2
version, so many of our workflows are failing. This PR forces that
action to use poetry version 1.8.5 and also uses 1.8.5 for toolkits

A ticket to migrate to 2.0.0 has been filed for future work
2025-01-07 13:21:55 -08:00
Nate Barbettini
fd5b429322
Rename inputs -> input to match Engine (#190)
Tool definitions in the Engine were missing `input` because the field
was renamed.

---------

Co-authored-by: Eric Gustin <eric@arcade-ai.com>
2025-01-03 17:42:58 -08:00
Eric Gustin
890ee96ef4
Rename actor to worker (#174)
# PR Description
This PR renames `actor` to `worker` 

**Does not include deployment related things in
`.github/workflows/release-containers.yml`**
2025-01-03 14:28:04 -08:00
Sterling Dreyer
2cc9aba0f4
Fix For New Schemas (#187)
This is a start but may be incomplete

---------

Co-authored-by: Nate Barbettini <nate@arcade-ai.com>
2025-01-03 13:47:23 -08:00
Nate Barbettini
179837f7fb
CLI quality of life improvements (#189)
Small QOL improvements: graceful messages in error situations
2025-01-03 13:47:11 -08:00
Eric Gustin
f7f5888b21
Stricter jinja version (#186)
# PR Description
Jinja2 versions 3.1.5 or higher resolves security vulnerabilities in
this repo.
2025-01-02 14:09:22 -08:00
Eric Gustin
0ad8dc6e5e
Link to Engine installation documentation (#184)
# PR Description:
If someone tries to run `arcade dev` without the Engine installed they
get the following:


![image](https://github.com/user-attachments/assets/bc4063bb-3fb1-471c-a9bc-77f73a660308)
2024-12-24 10:19:58 -08:00
Eric Gustin
ab889f9f1d
Lint all toolkits (#183)
# PR Description
* Adds/updates the following files to all toolkits:
    - `.pre-commit-config.yaml`
    - `.ruff.toml`
    - `LICENSE`
    - `Makefile`
    - `pyproject.toml`
* Lint all toolkits such that they pass `make check` and `make test` (a
total doozy). This includes adding some unit tests and evals.
* Github workflow for testing toolkits before merge into main (courtesy
of @sdreyer)
* Added a QOL improvement for tool developers for when they need to get
the context's auth token.
* Minor updates to `arcade new` template.
2024-12-20 09:49:45 -08:00
Sterling Dreyer
950a8600f8
Remove lock flag from check (#181) 2024-12-19 11:36:32 -08:00
Sterling Dreyer
1512d0699e
Testing for Math Toolkit (#180) 2024-12-19 11:28:03 -08:00
Sterling Dreyer
70faf7af5a
Test Version Override (#179)
Testing to make sure pypi versions don't override. This should fail
2024-12-19 11:13:18 -08:00
Sterling Dreyer
d46accee2f
Fix Dispatch Repo Name (#178) 2024-12-19 10:44:00 -08:00
Eric Gustin
7c228a59d5
Update Evals SDK (#175)
# PR Description
This PR renames `ExpectedToolCall` to `NamedExpectedToolCall` and then
creates a new dataclass called `ExpectedToolCall`. `ExpectedToolCall`
can be passed to the `EvalSuite.add_case` and `EvalSuite.extend_case`
methods.

1. Enhance `EvalSuite.add_case` and `EvalSuite.extend_case` by accepting
a list of `ExpectedToolCall` as their `expected_tool_calls` input
parameter. This helps create a scaffolding for developers. Previously,
the expected type was `list[tuple[Callable, dict[str, Any]]]`, which is
still valid for backward compatibility.
```python
# Before (still valid for backward compatibility)
expected_tool_calls=[
    (
        adjust_playback_position,
        {
            "absolute_position_ms": 10000,
        },
    )
]
        

# After
expected_tool_calls=[
    ExpectedToolCall(
        func=adjust_playback_position,
        args={"absolute_position_ms": 10000},
    )
]
```
2. Removed any references to arcade.core in toolkits directory.
3. Some linting for import organization.
2024-12-19 10:29:13 -08:00
Eric Gustin
a4b58d9749
Fix /show for Cloud Engine (#177)
# PR Description
### The following bug was observed: 
* When connected to the cloud engine for `arcade chat`, and the user
types `/show`, then the local environment tools are displayed. Instead,
the cloud engine's tools should be displayed.

### Why was this bug happening?:
* When a user entered the `/show` command, the CLI Command `show` was
being called directly. Since the function was a CLI command, the `local`
parameter was not being processed and resolved to its intended value
because the Typer CLI interface was being bypassed. So, the conditional
`if local:` would always evaluate to `True`.

### How this was fixed:
* I created a wrapper function for the `show` CLI Command. Now, when the
user types `/show`, then the wrapper function is called instead of the
`show` CLI command. This ensures that all input parameters are resolved
to their intended values.
2024-12-19 10:13:58 -08:00
Sterling Dreyer
f8c8d47a01
Release Toolkits Individually (#176) 2024-12-18 16:34:06 -08:00
Eric Gustin
b12ceec4b5
arcade evals Default to localhost (#172)
# PR Description
* `arcade evals` now run evaluations against Arcade Engine at
`http://localhost:9099` by default.
* Added optional flag `--cloud` to run evaluations against Arcade's
Cloud Engine at `https://api.arcade-ai.com`. Overrides `-h` flag.
* Always print the Engine that the evaluations are using. Previously
this was reserved for `-d` flag.
2024-12-17 10:41:32 -08:00
Eric Gustin
d8c8b060af
Update arcade chat Help Menu (#170)
# PR Description
* Fixes available commands display bug
* Add `/history` command. Displays the conversation history.


```
Available Commands:
  /show         Show all available tools
  /history      Show the chat history
  /clear        Clear the chat history
  /exit         Exit the chat
  /?, /help     Help for a command

Surround in """ for multi-line messages
```
2024-12-16 18:32:03 -08:00
Eric Gustin
02eee63884
X Toolkit: Support tweets longer than 280 characters (#171)
# PR Description
* Update `search_recent_tweets_by_username`,
`search_recent_tweets_by_keywords`, and `lookup_tweet_by_id` to support
long tweets. Previously, only the first 280 characters of the tweet's
text were returned by the tool.
2024-12-13 09:04:50 -08:00
Eric Gustin
00d5babcd7
Add next_token to X Search tools (#169)
# PR Description
Adds an optional `next_token` input parameter to the
`X.SearchRecentTweetsByUsername` and `X.SearchRecentTweetsByKeywords`
tools.

This allows users to paginate through tweets. A `next_token` is provided
in the tools's response.

For example, to access the `next_token` when using the `tools.execute`,
you can do `next_token = response.output.value["meta"].get("next_token",
None)` and then pass it to the tool on your next call through the tools'
`next_token` input parameter.
2024-12-10 12:35:20 -08:00