Skip to main content

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.

PyPI Python versions license

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.

a2al in ten seconds: create an AID in the Web UI, then call your own agent and someone else's by address from a terminal

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. No warm-up step.

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 — same daemon, other surfaces (a2al CLI · local REST · MCP · 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.

First-class Python methods for these are on the way; until then, reach them through the CLI, REST, or MCP surface of the same sidecar.

Agents collaborating over AIDs: a chat by address, a file sent by hash, and a shared room log

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 with block runs; run a2ald as a service when your app needs to be reachable around the clock.
  • a2al.org — project site, quick start, and docs
  • Machine-readable: llms.txt / llms-full.txt · MCP tools over http://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

MPL-2.0

Metadata

Release files for a2al 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for a2al 0.3.1
File Size Uploaded
a2al-0.3.1.tar.gz 7.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for a2al 0.3.1
File
a2al-0.3.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
a2al-0.3.1-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
a2al-0.3.1-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
a2al-0.3.1-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details
a2al-0.3.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 39.3 MB

Release files / a2al-0.3.1.tar.gz

Download URL a2al-0.3.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
39291f8311b5dffb5fdc8849a4a4fbb465ec03937a86f62839a0b357210e0c53
BLAKE2b-256 checksum
How to use checksums
9b389ce989266510f81539093872db852ad7c4f7d1157f8d5d5b60d4f9d3d978
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.1-py3-none-win_amd64.whl

Download URL a2al-0.3.1-py3-none-win_amd64.whl
Size 13.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
765a0895613dee9587cc39c3e84e2b03a24e36d16f1be78da49067faea4261ee
BLAKE2b-256 checksum
How to use checksums
e83d91a93e634f8b3d559855874ecc467c3c60810314908ababc6eb16635a908
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.1-py3-none-manylinux2014_x86_64.whl

Download URL a2al-0.3.1-py3-none-manylinux2014_x86_64.whl
Size 6.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3d158550c4732a1671dcabd9d26721c982c664e83279f35f7f4fda699e63c322
BLAKE2b-256 checksum
How to use checksums
a20cb6d49fbf52bb2f941f98561c80e9721a05514cd325c598fc8c6b1c5798ec
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.1-py3-none-manylinux2014_aarch64.whl

Download URL a2al-0.3.1-py3-none-manylinux2014_aarch64.whl
Size 5.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
3daee694947c12e51f38fd876661420cfbb67aa702a5cd77112620f87df15feb
BLAKE2b-256 checksum
How to use checksums
8ff21c0084c59f70faf49207a81de6012c5fc51a2b8b7d0536205c2d20a8056b
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.1-py3-none-macosx_11_0_x86_64.whl

Download URL a2al-0.3.1-py3-none-macosx_11_0_x86_64.whl
Size 7.0 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
b33678c2ecb9c249f7e9cfd760c20500ec6565120b4184ddb5124fe140525379
BLAKE2b-256 checksum
How to use checksums
12995445418fc7927dfd9a8ae8a03dff7d03dfa8ca44a88a35abd7918efa3e16
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.1-py3-none-macosx_11_0_arm64.whl

Download URL a2al-0.3.1-py3-none-macosx_11_0_arm64.whl
Size 7.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
de17973a9e41e2b3fa9dc213a47444f882b7d311aa09baf8aecfc4e6681dffef
BLAKE2b-256 checksum
How to use checksums
871f3dedd7c6adcf1051d7db7fd6ecbc8aad50cc66e7733fbf29991dafc1a75f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.3.4

6 release files

0.3.3

6 release files

0.3.2

6 release files

This release

0.3.1 This release

6 release files

0.3.0

6 release files

0.2.9

6 release files

0.2.8

6 release files

0.2.7

6 release files

0.2.6

6 release files

0.2.5

6 release files

0.2.4

6 release files

0.2.3

6 release files

0.2.2

6 release files

0.2.1

6 release files

0.2.0

6 release files

0.1.9

6 release files

0.1.8

6 release files

0.1.7

6 release files

0.1.6

6 release files

0.1.5

6 release files

0.1.2

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page