-
Notifications
You must be signed in to change notification settings - Fork 441
WIP: Add scheduling assistant flagship project #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… and dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this started! This is already in good enough shape to merge IMO and then we can keep building on top.
A few questions in addition to the PR comments:
- So if I'm understanding correctly, the gmail creds are for the scheduling assistant's own google account, which is being polled for new emails.
- Is the calendar creds for the user's google account? (i.e. we are giving the scheduling assistant direct access to the user's calendar?)
CRED_FILE_PATH = "/Users/jerronlim/Desktop/projects/mcp-agent-jerron/flagship/scheduling-assistant/creds/client_creds.json" | ||
TOKEN_PATH = "/Users/jerronlim/Desktop/projects/mcp-agent-jerron/flagship/scheduling-assistant/creds/gmail_app_tokens.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we set this in env, or in the config.yaml itself? I believe we can add extras to any of the settings
@@ -0,0 +1,45 @@ | |||
SCHEDULING_AGENT_INSTRUCTIONS = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa this is a very precise prompt. Does it work reliably/have you found cases where it doesn't?
Not important for now, but one thing we can consider is break this down into a series of steps and kind of strictly define the workflow that at any given time the LLM is expected to do.
For e.g. to extract meeting details, we could have a single llm.generate_structured call that returns meeting details in a pydantic object, which can then be used for further processing.
But if this works one-shot, then that's pretty great!
@@ -0,0 +1,421 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! You should consider contributing this server to https://github.com/modelcontextprotocol/servers, it's a solid reference implementation
async def list_events(self) -> dict: | ||
try: | ||
events_result = await asyncio.to_thread( | ||
self.service.events().list, calendarId="primary" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this accept a filter to be able to filter the events to a specific time period? For example, the agent might want to look at the calendar over the next week, or a particular day, to see availability.
- **If there is a conflict**: | ||
- Identify and propose alternative slots based on availability and working hours. | ||
- **Reply to the sender and keep those in CC in CC (excluding yourself if already in CC).** | ||
- Upon confirmation, schedule the meeting and send invites. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would this "upon confirmation" part work, since the LLM would have to send the email first and end its turn. When it polls and finds a new email, it will concatenate the email thread into its context so it'll have memory of the state, but will it "resume" from this point onwards?
Scheduling assistant MVP built with mcp-agent. The assistant will poll gmail inbox every minute and process incoming emails.