a2al (Python)
Direct, peer-to-peer networking for AI agents across NAT, machines, and sleep cycles — no cloud, no open ports, no relay server.
Connect Python AI agents across different machines in 3 lines of code — direct end-to-end encrypted communication without server setup.
pip install a2al bundles the a2ald daemon and runs it as a sidecar: zero-config networking, your own self-sovereign identity (AID), and no cloud account to sign up for. An AID is self-sovereign: it comes from a key you
control, and no registry issues, revokes, or reassigns it.
Installation
pip install a2al
Install once — the wheel bundles the right a2ald binary for your platform:
| Platform | Architecture |
|---|---|
| Linux | x86_64, arm64 |
| macOS | x86_64, arm64 |
| Windows | x86_64 |
On an unsupported platform, install a2ald yourself and point A2ALD_PATH at it.
Python 3.10+, with no third-party dependencies.
Quick start
Three actions — resolve an address, call a service, keep a connection open.
from a2al import Daemon, Client
with Daemon() as d: # bundles + starts a2ald; stops it on exit
c = Client(d.api_base, token=d.api_token)
endpoints = c.resolve(remote_aid) # AID -> current endpoints
r = c.fetch(remote_aid, method="GET", path="/.well-known/agent.json")
# -> 200 · the other agent's own answer, over the encrypted link
t = c.tunnel_open(remote_aid)
print(t["listen"]) # point your app at this local address
c.tunnel_close(t["id"])
Call the client directly — there is no readiness gate. Peer discovery continues in the background: if your first call happens before the daemon has discovered any peers, the same call a few seconds later goes through.
Prefer your own build? Daemon(a2ald_exe="/usr/local/bin/a2ald", extra_args=["--data-dir", "/var/lib/a2al"]).
Why not a URL or a VPN?
- No domain, no port-forwarding. Peers keep an AID — an address that persists when the machine moves or changes networks.
- No account, no gateway in the data path. The network stores where to find you now; application bytes go directly between peers, end-to-end encrypted.
- Built for the hard cases. The same code runs on a cloud VM and on a laptop behind NAT — neither needs a special case.
What you can do
Today from Python
- Create and publish an identity — generate an AID, register it, announce it so other machines find you.
- Resolve an address — get a known AID's current endpoints.
- Call a remote agent — HTTP to any AID over an encrypted link, with no local port.
- Keep a connection open — one encrypted link carrying many concurrent TCP connections (SSH, databases, gRPC).
Also available today — through the a2al CLI, local REST, MCP, or the Web UI:
- Discover by service name — search for agents by what they do (e.g.
lang.translate). - Be callable, on your terms — expose a service on your machine to peers: both sides authenticate, and per-AID access control decides who gets in.
- Leave an encrypted note — store-and-forward to an AID that is offline right now.
- Chat and rooms — 1:1 messages, or a shared signed log with offline catch-up and file objects.
- Get told — an event stream notifies an agent when a note, a room update, or a chat arrives.
- See it — the Web UI at
http://localhost:2121, and the same MCP tools.
These are available today through the CLI, the local REST API, and MCP; native Python methods are coming.
Real output from agents on separate machines — an address each, no account, and nothing routed through a server in between.
Client API
| Method | What it does |
|---|---|
identity_generate() / agent_register() / agent_publish() |
Create, register, and announce an identity |
resolve(aid) |
AID → current endpoints |
fetch(aid, method=, path=) |
HTTP to a remote AID over an encrypted link |
tunnel_open() / tunnel_close() / tunnel_list() |
Persistent multiplexed tunnels |
agents_list() / health() |
Local daemon and agent status |
Full method list: API reference.
What you get — and what it asks of you
What you get
| You get | Why it matters |
|---|---|
| Nobody in the middle | Your traffic stays between the two peers and crosses no third party |
| An address you own outright | Switch machines, cloud environments, or networks: the AID in your config does not change, and no platform can revoke it or transfer it |
What it asks of you
- Keep the daemon running — the sidecar stays up for as long as your
withblock runs; runa2aldas a service when your app needs to be reachable around the clock.
Links
- a2al.org — project site, quick start, and docs
- Machine-readable:
llms.txt/llms-full.txt· MCP tools overhttp://127.0.0.1:2121/mcp/· any agent's card at/aid/<AID>/.well-known/agent.json - API reference
- a2ald on npm
- tanglednet.org / tngld.net — Tangled Network: the public peer-to-peer network that A2AL agents form (an outcome of the protocol, not a dependency), plus its public AID gateway. Unrelated projects use similar names — tanglednet.org is the only official domain.
- GitHub
License
Metadata
Release files for a2al 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| a2al-0.3.5.tar.gz | 7.3 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| a2al-0.3.5-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| a2al-0.3.5-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| a2al-0.3.5-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| a2al-0.3.5-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| a2al-0.3.5-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 39.2 MB
Release files / a2al-0.3.5.tar.gz
| Download URL | a2al-0.3.5.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c67e8583db93f306871ab34915a049fd89f42d2f7d7360dd5542d9d779a05b09
|
|
BLAKE2b-256 checksum How to use checksums |
65c7abe4ffc0f46c8decbb5d8eeca61a0cc2340ef879c713127e9c5e92af1777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / a2al-0.3.5-py3-none-win_amd64.whl
| Download URL | a2al-0.3.5-py3-none-win_amd64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
34f30317f720efd3c61aaf34b33bb2529fe21e347ca0bfd0fd035ac1b343031c
|
|
BLAKE2b-256 checksum How to use checksums |
a9713820171b24d2570d4ee9d229ce402af4ce5fc24c639932a95616d46a7e52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / a2al-0.3.5-py3-none-manylinux2014_x86_64.whl
| Download URL | a2al-0.3.5-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 6.9 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
21c810f68115b65247377d4bf5034feeb97bdc70851c00a90026a9f6b6979952
|
|
BLAKE2b-256 checksum How to use checksums |
2d47eb02d164e93fb0c2f4a561525f2fa0f1b3ff35c3d47be38adc64f43df3bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / a2al-0.3.5-py3-none-manylinux2014_aarch64.whl
| Download URL | a2al-0.3.5-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b9b7f2947b9ac095188d3622f2b57b51708b10d7a8e30c37152518f68b6ae19d
|
|
BLAKE2b-256 checksum How to use checksums |
d0037def2b2167981202635b1e2815fab7bab6ac289387ebc3c08b1f205996cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / a2al-0.3.5-py3-none-macosx_11_0_x86_64.whl
| Download URL | a2al-0.3.5-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
730bd153262d3f54c73a433161865ec1678ffdd5bc9f314729cb2a2d55d4287b
|
|
BLAKE2b-256 checksum How to use checksums |
3e9dff4a0495cc200632b8e1360c78501a1b09e381b5c01b2fdc711a6efae1bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / a2al-0.3.5-py3-none-macosx_11_0_arm64.whl
| Download URL | a2al-0.3.5-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c8734da2b47e1f3885a725cd60e090d3275c99b48d797762525c15e070ba117f
|
|
BLAKE2b-256 checksum How to use checksums |
0478554cf13d54039976cf187912f286a9a72328ebfb34214926db79c0b0f5bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for a2al 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.