Metadata-Version: 2.4
Name: agentauth
Version: 0.2.0
Summary: Automated authentication for web agents
Author: Cole Hecht
License-File: LICENSE.txt
Requires-Python: >=3.11
Requires-Dist: browser-use>=0.1.36
Requires-Dist: browserbase>=1.1.0
Requires-Dist: imap-tools>=1.10.0
Requires-Dist: langchain>=0.1.0
Requires-Dist: onepassword-sdk>=0.1.7
Requires-Dist: pyotp>=2.9.0
Requires-Dist: python-dotenv>=1.0.1
Description-Content-Type: text/markdown

# AgentAuth

AgentAuth is a Python package that helps automate web authentication by simulating human-like login behavior. It supports various authentication methods including:
- Email magic links
- Email verification codes
- Time-based One-Time Passwords (TOTP)
- Standard username/password login

## Features

- 🤖 **Automated Authentication**: Handles complex login flows automatically
- 📧 **Email Integration**: Supports email-based verification (magic links and codes)
- 🔐 **Password Manager Integration**: Works with 1Password and local credential storage
- 🌐 **Browser Integration**: Compatible with remote CDP-based browsers

## Installation

```bash
pip install agentauth
```

## Quick Start

```python
from agentauth import AgentAuth, CredentialManager

# Initialize credential manager and load credentials
credential_manager = CredentialManager()
credential_manager.load_file("credentials.json")  # Load from local JSON file

aa = AgentAuth(
    credential_manager=credential_manager,

    # Connect an email inbox for authentication requiring email links or codes
    imap_server="imap.example.com",
    imap_username="agent@example.com",
    imap_password="agent_email_password"
)

# Authenticate to a website for a given username
cookies = await aa.auth(
    "https://example.com",
    "agent@example.com",
    cdp_url="wss://..."  # Optional: for using remote browser services
)

# Use cookies for authenticated agent actions
```

# To Do

- [x] Look at package managers
- [x] Add license
- [x] Add example: browser-use
- [x] Add example: playwright
- [x] Add example: browserbase (cdp)
- [x] Publish to pip
- [x] Add 1Password integration
- [x] Expose CredentialManager (ideal doesn't need an extra init method)
- [x] Hide verbose logging
- [ ] Add audit logging
- [ ] Add Bitwarden integration
- [ ] Use local LLM for email scanning
- [ ] Allow other LLMs

# Contributing

Contributions are welcome! Please feel free to submit a pull request.

# License

This project is licensed under the MIT License.
