-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add Auth-Agent (Authentication for Web Agents like Browser Use and Browserbase). #591
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
feat: Add Auth-Agent (Authentication for Web Agents like Browser Use and Browserbase). #591
Conversation
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Here is the repo of Auth-Agent: https://github.com/auth-agent/auth-agent. It is fully open source. Please let me know if you find any issues integrating or anything I could do for you guys. |
1d5ebc2 to
72d23fe
Compare
Integrate Auth Agent (https://auth-agent.com) to enable AI agents using tools like browser-use, BrowserBase, and other agent frameworks to autonomously manage Supermemory on behalf of users. ## 🤖 Value Proposition Enable AI agents (using browser-use, BrowserBase, etc.) to: - Automatically dump memories from web browsing sessions and workflows - Query and retrieve memories for users - Organize and tag memories intelligently - Sync memories across contexts and platforms - Act as intelligent memory management assistants Example: An agent using browser-use can automatically save interesting content to a user's Supermemory while browsing, without manual intervention. ## Implementation - **Scenario 1: Full Account Access** (starting point - see docs for alternatives) - Uses official `[email protected]` with built-in Auth Agent logo - Complete OAuth 2.1 flow with PKCE security - Token exchange and /userinfo endpoint integration - Middleware support for Auth Agent sessions ##⚠️ Customization Required This is a functional starting point. You should: 1. ✏️ Complete Better Auth integration (see TODO comments in callback) 2. 🔧 Choose your preferred scenario (1, 2, or 3) - Scenario 2: Separate agent profiles with user context - Scenario 3: Independent agent profiles (perfect for "agent workspace") 3. 📝 Add audit logging for agent actions 4. 🔐 Implement permission controls 5. 🎨 Customize UX and error handling See https://docs.auth-agent.com/guides/website-quickstart for all scenarios. ## Changes ### Added - OAuth callback handler: `apps/web/app/api/auth/auth-agent/callback/route.ts` - Auth Agent button: `packages/ui/button/auth-agent-button.tsx` - Documentation: `AUTH_AGENT_INTEGRATION.md` (comprehensive setup guide) - Environment config in `.env.example` ### Modified - Login page: Added "Sign in with Auth Agent" button - Middleware: Recognize Auth Agent session cookies - Auth context: Support Auth Agent sessions - Dependencies: Added `[email protected]` ## Setup Instructions See `AUTH_AGENT_INTEGRATION.md` for: - OAuth client registration - Environment variable configuration - Better Auth integration steps - Scenario comparison and customization options - Testing instructions with browser-use ## Notes I've tried my best to provide a solid foundation using Scenario 1 (Full Account Access) as the starting point. However, you may want to use Scenario 2 or 3 depending on your use case: - **Scenario 2**: Better audit trail, separate agent profiles - **Scenario 3**: Independent agent memory (great for "agent workspace" feature) Feel free to modify anything to fit Supermemory's architecture! The Auth Agent docs at https://docs.auth-agent.com have excellent guides for all scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
72d23fe to
31b2f17
Compare
|
@Dhravya Let me know if there are any issues or if you have any suggestions. |
|
@Dhravya Hey I noticed there is no comment yet. Is there anything I could do for you? Do you have any suggestions or preferences? |
|
You could also add auth to your mcp now. https://github.com/auth-agent/mcp-auth |
|
Thanks for contribution @hetpatel-11 . Right now, we are not planning on the another auth provider apart from |
Integrate Auth Agent (https://auth-agent.com) to enable AI agents using tools like browser-use, BrowserBase, and other agent frameworks to autonomously manage Supermemory on behalf of users.
Value Proposition
Enable AI agents (using browser-use, BrowserBase, etc.) to:
Implementation
[email protected]with built-in Auth Agent logoThis is a functional starting point. You should:
See https://docs.auth-agent.com/guides/website-quickstart for all scenarios.
Changes
Added
apps/web/app/api/auth/auth-agent/callback/route.tspackages/ui/button/auth-agent-button.tsxAUTH_AGENT_INTEGRATION.md(comprehensive setup guide).env.exampleModified
[email protected]Setup Instructions
See
AUTH_AGENT_INTEGRATION.mdfor:Notes
I've tried my best to provide a solid foundation using Scenario 1 (Full Account Access) as the starting point. However, you may want to use Scenario 2 or 3 depending on your use case:
Feel free to modify anything to fit Supermemory's architecture! The Auth Agent docs at https://docs.auth-agent.com have guides for all scenarios.