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:

  • Standard username/password login
  • Time-based One-Time Passwords (TOTP)
  • Email magic links
  • Email verification codes

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

# Load credentials from a file and/or password manager
credential_manager = CredentialManager()
credential_manager.load_file("credentials.json")
credential_manager.load_1password("1password_service_account_token")

# Creat an instance of AgentAuth with access to credentials and an email inbox
aa = AgentAuth(
    credential_manager=credential_manager,

    # (Optional) 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

ℹ️ You can pass a custom LLM to the AgentAuth constructor. OpenAI's gpt-4o is the default and requires an OPENAI_API_KEY environment variable.

To Do

  • Add Bitwarden integration
  • Support local S/LLM for email scanning
  • Add automatic publishing

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.3.0.tar.gz (111.8 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.3.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentauth-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7895e4c328542a35bccba9fd452ca0e242b0fb306867967a13be00d4dffb39ac
MD5 644cdaca1df1bbe3e44b34db849bb235
BLAKE2b-256 a9602aada87dbb7c5f17ed28bb4994f80d45ef4e7605fd967930d66e7c4d02f8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for agentauth-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9fe57a24687e25855460cf6ec59173d5c6206ba21dfd0b1162a11dd81b6095e
MD5 688ba31fd4d5328ded8ea917bdba5696
BLAKE2b-256 1038aaee519f406457b29037fc3fd79dd5c3ef58e0cccc02c0a782db671a2ef7

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