Skip to main content

Automated authentication for web agents

Project description

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

pip install agentauth

Quick Start

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

  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentauth-0.2.1.tar.gz (109.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentauth-0.2.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file agentauth-0.2.1.tar.gz.

File metadata

  • Download URL: agentauth-0.2.1.tar.gz
  • Upload date:
  • Size: 109.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for agentauth-0.2.1.tar.gz
Algorithm Hash digest
SHA256 26f9e8eba0cb1f0f8f70918bbd8f6ffe4d679fb2e6212ba73e4466378769ce80
MD5 34a74317376c7536d3f213b4e4afd3ef
BLAKE2b-256 5b86cecc7b554989da83c21ba14a0e9b1e404cd56afd99fecbb49744aab1f199

See more details on using hashes here.

File details

Details for the file agentauth-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agentauth-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for agentauth-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fcef165c697baae91fec36793f61c8f6c8e700bccfa41c7f831191de47baba4b
MD5 2f4f96706de9813f24c109568289bf0d
BLAKE2b-256 28223eae6f3bc43cf8e821e292b7bd0bc5f03850b07210b3df630f0f5a6660b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page