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

Local-first credential broker and vault for AI Agents

Docs · Website · Discord · Issues


An open-source credential broker 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.

45 bundled providers out of the box: 14 OAuth2 and 31 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 local credential layer agents call at runtime.

  • No credential sprawl. One encrypted store. Every provider, every agent, one place.
  • No SaaS, no privacy trade-off. Credentials never leave your machine. Eliminates credential exfiltration risks as agents never see them.
  • 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:

uvx authsome login github

Then agents get valid credentials on demand:

uvx authsome get github --field access_token --show-secret
# → ghu_...

export $(uvx authsome export github)
# → sets GITHUB_ACCESS_TOKEN in current shell

uvx authsome run -- python my_agent.py
# runs behind a local 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 stored locally, encrypted at rest, and refreshed before expiry. No server. No account. No cloud.


Why Authsome

authsome Hardcoded env tokens DIY
Automatic token refresh build it
OAuth2 + API keys build it
Runtime headless use varies
Local, no SaaS dependency
Built-in providers, zero config
Multi-account per provider build it

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


Install

Requires Python 3.13+.

pip install authsome

Or run without installing:

uvx authsome@latest --help

Quick Start

uvx authsome login github                     # opens browser, completes PKCE flow
uvx authsome login github --flow device_code  # headless: Device Code, works over SSH and CI
uvx authsome login openai                     # secure API key entry via browser bridge
uvx authsome list                             # all connections + token status

Agent Integrations

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

Full list at authsome.ai/docs/integrations.

Docs

Full documentation lives at authsome.ai/docs.

To preview the docs site locally:

cd docs/site
npm i -g mint   # requires Node.js >= 20.17.0
mint dev

Community

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

Security

Authsome is a credential tool. If you find a vulnerability, please do not open a public GitHub issue.

See the responsible disclosure policy for how to report it privately.

Contributing

Contributions welcome. See CONTRIBUTING.md for development setup, testing, and the engineering principles we follow.

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.3.1.tar.gz (328.1 kB view details)

Uploaded Source

Built Distribution

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

authsome-0.3.1-py3-none-any.whl (134.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: authsome-0.3.1.tar.gz
  • Upload date:
  • Size: 328.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.3.1.tar.gz
Algorithm Hash digest
SHA256 8fffce78cef76d9885cdb1aa97011828738a62ed41e4ce6e569a8e166bf79a8a
MD5 6c3aad86b4d561381371942437168ee1
BLAKE2b-256 7e7fd8ba3affed1c9ec387af7e9609796714473447445b7d09c49ba65c432603

See more details on using hashes here.

File details

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

File metadata

  • Download URL: authsome-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 134.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ec4e0525c42051814d380652ec94b5b2c16c2a794e4e29e9445091b404f08a8
MD5 796e3815b0a4db6ac5abe501f6476b64
BLAKE2b-256 4f309f9000e59f8c41739e7418b6fdbf92cb7c5efa6629f9e701f3d2ad9ab261

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