a2al (Python)
A2AL is an open peer-to-peer protocol with a local daemon that gives every agent a permanent address — no account, no server in between.
Use A2AL from Python — give your app or agent a permanent address, find others, and talk to them directly.
pip install a2al bundles the a2ald daemon and runs it as a sidecar: one install, your own
address, 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 capability — search the network for agents by what they do.
- 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 capabilities as 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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| a2al-0.3.3.tar.gz | 7.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| a2al-0.3.3-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| a2al-0.3.3-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| a2al-0.3.3-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| a2al-0.3.3-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| a2al-0.3.3-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 38.4 MB
Release files / a2al-0.3.3.tar.gz
| Download URL | a2al-0.3.3.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb289530452c27d7318f4d1a97befe9409b280d3fa727aab274acf22491db88c
|
|
BLAKE2b-256 checksum How to use checksums |
46da08ec88501dfef54ad0372c399dfe3da988b88fd584ad4c9e203705255731
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / a2al-0.3.3-py3-none-win_amd64.whl
| Download URL | a2al-0.3.3-py3-none-win_amd64.whl |
|---|---|
| Size | 13.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
35e1f289e41990525d41f41ab10fda14a0f02d20466314d0b831d492297cceee
|
|
BLAKE2b-256 checksum How to use checksums |
1f7867dbc7421552b9bb323e4e0cf38de7fb773925c6106416bd111f774e48d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / a2al-0.3.3-py3-none-manylinux2014_x86_64.whl
| Download URL | a2al-0.3.3-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
e40b15f41eb0c898e4fc97636a777cd8faba581ace9315bee4e39c54eeb5b78f
|
|
BLAKE2b-256 checksum How to use checksums |
de4f45fbf305d557ff9170ab64d6886a7f699c2b9e58b7d1fdc0d5cfbffe805f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / a2al-0.3.3-py3-none-manylinux2014_aarch64.whl
| Download URL | a2al-0.3.3-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
78853585780bd04a328b3563a8f6d37f392a944abc085589d33c05aa71b6f86d
|
|
BLAKE2b-256 checksum How to use checksums |
8034a00d5e2e919ef5e1c7a720b62e7cc8d280d08d06676262be13b9504478dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / a2al-0.3.3-py3-none-macosx_11_0_x86_64.whl
| Download URL | a2al-0.3.3-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
bff0338b44ebf77a518b45eddc6f2c84d2276a393e0db32b6b23606d5b897018
|
|
BLAKE2b-256 checksum How to use checksums |
66520e1fab63004dc9f456403d2650ce93af88361c73f2608bd84bd6fb58f2b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / a2al-0.3.3-py3-none-macosx_11_0_arm64.whl
| Download URL | a2al-0.3.3-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f90cc60527852116393730104cde4131bc35722b50021d701bd4c5f8740b405d
|
|
BLAKE2b-256 checksum How to use checksums |
260a0b9d30e082923fabee1c91f15b32dae616e400930009a4c6f97aec322f24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|