-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:autogen scheduler agent was added
- Loading branch information
Showing
7 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../js/examples/docs-example/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../python/examples/ |
2 changes: 2 additions & 0 deletions
2
python/examples/scheduler_agent/scheduler_agent_phidata/.env.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
OPENAI_API_KEY=KEY | ||
COMPOSIO_API_KEY=KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
python/examples/scheduler_agent/scheduler_agent_phidata/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Scheduling Agent Guide | ||
|
||
This guide provides detailed steps to create a Scheduler Agent that leverages Composio, PhiData and ChatGPT to schedule your events based on received emails. Ensure you have Python 3.8 or higher installed. | ||
|
||
## Steps to Run | ||
|
||
**Navigate to the Project Directory:** | ||
Change to the directory where the `setup.sh`, `main.py`, `requirements.txt`, and `README.md` files are located. For example: | ||
```sh | ||
cd path/to/project/directory | ||
``` | ||
|
||
### 1. Run the Setup File | ||
Make the setup.sh Script Executable (if necessary): | ||
On Linux or macOS, you might need to make the setup.sh script executable: | ||
```shell | ||
chmod +x setup.sh | ||
``` | ||
Execute the setup.sh script to set up the environment and install dependencies: | ||
```shell | ||
./setup.sh | ||
``` | ||
Now, fill in the `.env` file with your secrets. | ||
|
||
### 2. Run the Python Script | ||
```shell | ||
python cookbook/examples/scheduler_agent/main.py | ||
``` | ||
|
||
|
3 changes: 3 additions & 0 deletions
3
python/examples/scheduler_agent/scheduler_agent_phidata/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
composio-phidata | ||
python-dotenv | ||
phidata |
39 changes: 39 additions & 0 deletions
39
python/examples/scheduler_agent/scheduler_agent_phidata/setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Create a virtual environment | ||
echo "Creating virtual environment..." | ||
python3 -m venv ~/.venvs/scheduler_agent | ||
|
||
# Activate the virtual environment | ||
echo "Activating virtual environment..." | ||
source ~/.venvs/scheduler_agent/bin/activate | ||
|
||
# Install libraries from requirements.txt | ||
echo "Installing libraries from requirements.txt..." | ||
pip install -r requirements.txt | ||
|
||
# Login to your account | ||
echo "Login to your Composio acount" | ||
composio login | ||
|
||
# Add trello tool | ||
echo "Add google calendar and gmail tool. Finish the flow" | ||
composio add googlecalendar | ||
composio add gmail | ||
|
||
echo "Enable trigger" | ||
composio triggers enable gmail_new_gmail_message | ||
|
||
# Copy env backup to .env file | ||
if [ -f ".env.example" ]; then | ||
echo "Copying .env.example to .env..." | ||
cp .env.example .env | ||
else | ||
echo "No .env.example file found. Creating a new .env file..." | ||
touch .env | ||
fi | ||
|
||
# Prompt user to fill the .env file | ||
echo "Please fill in the .env file with the necessary environment variables." | ||
|
||
echo "Setup completed successfully!" |