Skip to main content

A portable local authentication library for AI agents and developer tools

Project description

Authsome

PyPI version Python 3.13+ License: MIT PyPI downloads Tests codecov Discord

Credential Gateway for AI Agents

Docs · Website · Discord · Issues


An open-source credential gateway that sits between your agents and the services they call. Instead of sharing credentials with every agent, log in once via OAuth2 or API keys. Authsome stores credentials securely and injects them via an HTTP proxy. You get one place to manage access, rotate keys, and see what every agent is doing.

Bundled providers out of the box — OAuth2 and API key. See the full list.


Demo

https://github.com/user-attachments/assets/27f9b229-baf4-4889-be9a-378a133654dc


Why Agents Need Authsome

Agents run beyond interactive sessions. They live in CI, over SSH, in cron jobs, in background workers, and in parallel pipelines. They need API access that survives without a human in the loop.

Hardcoded environment tokens leak or go stale, and building auth flow logic, token storage, refresh handling, and per-provider config into every project rebuilds the same plumbing every time.

Authsome is the credential broker agents call at runtime.

  • No credential sprawl. One encrypted store. Every provider, every agent, one place.
  • Agents never see credentials. Auth is handled outside the agent process — no exfiltration risk, no secrets in environment variables.
  • No browser required at runtime. Setup can use browser PKCE, device code, or a browser bridge for secure API key entry. After that, agents run headlessly.

How It Works

The CLI is the agent's interface: setup once, then inject fresh credentials whenever a tool runs.

Authsome Architecture

Authenticate once:

authsome login github
# This opens a browser on user's machine
# user completes login without sharing the creds with the agent.

Then agents get valid credentials on demand when they try to access external services. All they need to do is use authsome run -- before the command they want to run:

authsome run -- curl -s "https://api.github.com/user/repos?per_page=10"
# runs behind an auth proxy that injects headers at request time
# without exposing secrets in the child process environment.
# matched automatically via provider api_url (e.g. api.openai.com)

Credentials are encrypted at rest and refreshed before expiry.


Why Authsome

authsome Hardcoded env tokens DIY
Automatic token refresh build it
OAuth2 + API keys build it
Runtime headless use varies
Built-in providers, zero config
Multi-account per provider build it
Agents never see credentials build it

Authsome gives agents one command for a valid token, without scattering long-lived secrets across every project.


Install

Requires Python 3.13+.

uv tool install authsome

Self-hosting

Run a persistent daemon in Docker — no Python required on the host:

docker compose up -d
export AUTHSOME_BASE_URL=http://localhost:7998

See the self-hosting guide for volume backup, TLS termination, and environment variable reference.

Quick Start

Install and run first-time setup (identity, claim, and API key import from .env):

authsome onboard

For a remote daemon, pass --base-url once — it is saved in client config for later commands:

authsome onboard --base-url https://authsome.example.com

Add the authsome skill to your agent (claude, codex, cursor, hermes, etc.):

npx skills add agentrhq/authsome

And try a sample task that requires access to external services:

Star the repo agentrhq/authsome
Get my last 5 emails from gmail
Check my stripe balance

The agent will use authsome to login into external services and perform the task.

Agent Integrations

Authsome ships with adapters for the most common agent frameworks and CLIs:

Full list at authsome.ai/docs/integrations.

Community

  • Discord for questions, help, and showing what you're building.
  • GitHub Issues for bugs and feature requests.

Roadmap

See authsome.ai/docs/roadmap for what's shipped, what's next, and what's out of scope.

Contributing

Links

Star History

Star History Chart

License

MIT. See LICENSE.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

authsome-0.7.1.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

authsome-0.7.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file authsome-0.7.1.tar.gz.

File metadata

  • Download URL: authsome-0.7.1.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for authsome-0.7.1.tar.gz
Algorithm Hash digest
SHA256 9a18292e80fbdcb61771bdd84b83e8956528fb9f385a6fed76f1cf3b8cf1cfb2
MD5 8308f8ae9fef33cd80f1ae62a5ac045a
BLAKE2b-256 d422492a174417a20922732a58a20f93bba278a57380142e3a99481e3391e1d5

See more details on using hashes here.

File details

Details for the file authsome-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: authsome-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for authsome-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bce42dd9fe4b2cf93b86aa90aab25841627a032d73f9604d8f753a1f07b0b0de
MD5 224ef600bd93478a2448362400fb754a
BLAKE2b-256 be1bb70bdd0043a34b8769c646276c56a51568c0ccca810c5ab202014d445a64

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