otto8-ai / otto8

Open source AI Agent Platform
Apache License 2.0
20 stars 12 forks source link

Problem logging into my Gmail account #570

Open sheng-liang opened 2 weeks ago

sheng-liang commented 2 weeks ago

I added some Gmail tools in my agent. The agent prompted me to authenticate. The agent fails to authenticate because I have Google Advanced Protection and apparently that does not work with GPTScript.

The problem is somehow the agent now thinks I'm logged in. Of course nothing works and the agent gives a timeout error

thedadams commented 2 weeks ago

@njhale Can you take a look at this? Specifically, what happens when someone has "Google Advanced Protection" enabled, and why GPTScript thinks that the credential is valid.

drpebcak commented 2 weeks ago

https://support.google.com/accounts/answer/7539956#zippy=%2Ccan-i-still-use-sign-in-with-google

njhale commented 1 week ago

Just a few notes :

  1. The gateway token is never generated when oauth fails due to Advanced Protection being enabled
  2. Google doesn't redirect to Gateway when the failure occurs, so it's not clear that there's a way to know this happened (I'm going to test this more thoroughly on Monday to verify)
  3. The oauth2 tool polls indefinitely for the gateway token
  4. After 5 minutes, Otto8 cancels the run and a generic "timeout waiting for prompt response from user" message is bubbled up to the chat window
  5. This message isn't in the chat completion history, so the Agent has no knowledge that authentication timed out

When I tested this, the Agent didn't think I was logged in, but did try to call the tools again the next time I asked it to. This resulted in the auth flow triggering, and failing, again.

I'm going to try to get some design input on Monday, but my current plan is to make the timeout message less generic (since we know it's waiting on auth there) and inject it into the chat history if possible. That way the Agent will at least be minimally aware that an error took place and doesn't try to call the same tools again as if nothing happened.

cjellick commented 3 days ago

One thought: If the timeout is specific to oauth, i feel like it should be 60 or 90 seconds rather than 5 minutes. Either the user is going to log in or not.