|
| 1 | +<h3 align="center"> |
| 2 | + <a name="readme-top"></a> |
| 3 | + <img |
| 4 | + src="https://docs.arcade.dev/images/logo/arcade-logo.png" |
| 5 | + > |
| 6 | +</h3> |
| 7 | +<div align="center"> |
| 8 | + <h3>Arcade Integration for OpenAI Agents</h3> |
| 9 | + <a href="https://github.com/your-organization/agents-arcade/blob/main/LICENSE"> |
| 10 | + <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"> |
| 11 | +</a> |
| 12 | + <a href="https://pypi.org/project/agents-arcade/"> |
| 13 | + <img src="https://img.shields.io/pypi/v/agents-arcade.svg" alt="PyPI"> |
| 14 | + </a> |
| 15 | +</div> |
| 16 | +
|
| 17 | +<p align="center"> |
| 18 | + <a href="https://docs.arcade.dev" target="_blank">Arcade Documentation</a> • |
| 19 | + <a href="https://docs.arcade.dev/toolkits" target="_blank">Toolkits</a> • |
| 20 | + <a href="https://github.com/ArcadeAI/arcade-py" target="_blank">Arcade Python Client</a> • |
| 21 | + <a href="https://platform.openai.com/docs/guides/agents" target="_blank">OpenAI Agents</a> |
| 22 | +</p> |
| 23 | + |
| 24 | +# agents-arcade |
| 25 | + |
| 26 | +`agents-arcade` provides an integration between [Arcade](https://docs.arcade.dev) and the [OpenAI Agents Library](https://github.com/openai/openai-python). This allows you to enhance your AI agents with Arcade's extensive toolkit ecosystem, including tools that reqwuire authorization like Google Mail, Linkedin, X, and more. |
| 27 | + |
| 28 | +## Installation |
| 29 | + |
| 30 | +```bash |
| 31 | +pip install agents-arcade |
| 32 | +``` |
| 33 | + |
| 34 | +## Basic Usage |
| 35 | + |
| 36 | +```python |
| 37 | +from agents import Agent, RunConfig, Runner |
| 38 | +from arcadepy import AsyncArcade |
| 39 | + |
| 40 | +from agents_arcade import get_arcade_tools |
| 41 | + |
| 42 | + |
| 43 | +async def main(): |
| 44 | + client = AsyncArcade() |
| 45 | + tools = await get_arcade_tools(client, ["google"]) |
| 46 | + |
| 47 | + google_agent = Agent( |
| 48 | + name="Google agent", |
| 49 | + instructions="You are a helpful assistant that can assist with Google API calls.", |
| 50 | + model="gpt-4o-mini", |
| 51 | + tools=tools, |
| 52 | + ) |
| 53 | + |
| 54 | + result = await Runner.run( |
| 55 | + starting_agent=google_agent, |
| 56 | + input="What are my latest emails?", |
| 57 | + context={"user_id": "user@example.com"}, |
| 58 | + ) |
| 59 | + print("Final output:\n\n", result.final_output) |
| 60 | + |
| 61 | + |
| 62 | +if __name__ == "__main__": |
| 63 | + import asyncio |
| 64 | + |
| 65 | + asyncio.run(main()) |
| 66 | +``` |
| 67 | + |
| 68 | +## Key Features |
| 69 | + |
| 70 | +- **Easy Integration**: Simple API (one function) to connect Arcade tools with OpenAI Agents |
| 71 | +- **Extensive Toolkit Support**: Access to all Arcade toolkits including Gmail, Google Drive, Search, and more |
| 72 | +- **Asynchronous Support**: Built with async/await for compatibility with OpenAI's Agent framework |
| 73 | +- **Authentication Handling**: Manages authorization for tools requiring user permissions like Google, LinkedIn, etc |
| 74 | + |
| 75 | +## Available Toolkits |
| 76 | + |
| 77 | +Arcade provides many toolkits including: |
| 78 | + |
| 79 | +- **Google**: Gmail, Google Drive, Google Calendar |
| 80 | +- **Search**: Google search, Bing search |
| 81 | +- **Web**: Crawling, scraping, etc |
| 82 | +- **Github**: Repository operations |
| 83 | +- **Slack**: Sending messages to Slack |
| 84 | +- **LinkedIn**: Posting to LinkedIn |
| 85 | +- **X**: Posting and reading tweets on X |
| 86 | +- And many more |
| 87 | + |
| 88 | +For a complete list, see the [Arcade Toolkits documentation](https://docs.arcade.dev/toolkits). |
| 89 | + |
| 90 | +## Authentication |
| 91 | + |
| 92 | +Many Arcade tools require user authentication. The authentication flow is managed by Arcade and can be triggered by providing a `user_id` in the context when running your agent. Refer to the Arcade documentation for more details on managing tool authentication. |
| 93 | + |
| 94 | +## License |
| 95 | + |
| 96 | +This project is licensed under the MIT License - see the LICENSE file for details. |
0 commit comments