Skip to main content

A11

A concurrent action and streaming runtime for building AI agents.

A11 lets you write agents as ordinary async def code: values stream between producers and consumers, work is packaged as composable actions, and the same code runs in one process or across a network with a transport swap. The API is Python; the runtime underneath is a native C++20 implementation, so the streaming and concurrency stay fast and off the event loop's critical path.

📖 Documentation →

Install

pip install "a11-kit[llm]"

The [llm] extra pulls in the Anthropic and Google model SDKs. Drop it for the core runtime only.

See it in 30 seconds

Chat with a model right from the terminal (streaming its reply, and its thoughts with -v):

export GEMINI_API_KEY=...        # or ANTHROPIC_API_KEY
a11 chat -v

The ideas

A11 is small at its core — a few ideas compose into everything from a one-file helper to a fleet of networked agents. (The Principles page goes deeper.)

  • Everything is asynchronous. Every operation that can wait is a coroutine you await; the runtime schedules thousands cooperatively. Completion is an event (await action.done.wait()) and lifecycles are context managers that finalise — or abort with the right status — for you.
  • Everything is a stream. The unit of state is a node: a single ordered sequence of chunks with a writer end and a reader end. An agent rarely has its whole answer at once — it has the next token, frame, or tool call — so nodes make incremental production and consumption the natural shape, with backpressure built in.
  • Actions are wired streams. An action's typed input/output ports are nodes, so calling one is wiring streams together. A handler can emit output before it has finished reading input — exactly what streaming an LLM response through a pipeline looks like.
  • Two extension points: storage and transport. A ChunkStore is the log behind a node (swap the in-memory default for disk, a database, or fault injection); a WireStream moves bytes between peers (in-process, WebSocket, HTTP SSE, WebRTC). Everything above them is unchanged, so making an agent distributed is a transport swap, not a rewrite.
  • Sessions tie it together. A Session multiplexes wire streams, dispatches incoming action calls against a registry, and drains and closes the connection cleanly.

A taste

Produce into a node and read it back — backpressure and finalisation included:

import asyncio
import a11


async def main() -> None:
    async with a11.AsyncNode.create("tokens") as node:   # seals on exit
        for word in ["A11", "streams", "everything"]:
            await node.put(word)                          # await = backpressure

    async for token in node:
        print(token)


asyncio.run(main())

Stream a model's reply through that same node abstraction — interact_with_llm is just an action whose text_output port carries tokens as they arrive:

import a11
from a11.sdk.interact_with_llm import INTERACT_WITH_LLM_SCHEMA, interact_with_llm
from a11.sdk.llm import LlmHeaders

interact = (
    a11.Action(INTERACT_WITH_LLM_SCHEMA)
    .bind_handler(interact_with_llm)
    .set_header(LlmHeaders.PROVIDER.value, "gemini")
    .set_header(LlmHeaders.MODEL.value, "gemini-3.5-flash")
    .run()
)

# ...then, inside your async code, feed the conversation in and stream the reply:
async for chunk in interact["text_output"]:   # tokens as the model emits them
    print(chunk, end="", flush=True)

The guides build these up step by step — from a node, to a WebSocket echo session, to calling an action on a remote server, to a tool-using agent.

Learn more

  • Documentation — principles, guides, and the full Python API reference.
  • Guides — hands-on walkthroughs from a single stream to a networked, tool-using agent.
  • Examples — runnable programs under examples/.

Building the C++ runtime

A11's runtime is a standalone C++20 library you can build and link without Python. The steps below are self-contained; for the editable Python build, wheel matrix, testing workflow, and architecture, see BUILDING.md.

1. Install the tools, then build the C++ libraries. A11 links a pinned set of statically-built libraries (Boost, OpenSSL, libcurl, nghttp2, hiredis, nlohmann-json, uvw) rather than system copies; scripts/bootstrap_wheel_deps.sh builds them into a per-architecture prefix. From Homebrew you install only the tools (a C++20 compiler, CMake ≥ 3.28, Ninja; Linux tool package names vary):

brew install cmake googletest ninja pkg-config

export A11_DEPS_PREFIX="$HOME/.cache/a11-deps/$(uname -m)"
export CMAKE_PREFIX_PATH="$A11_DEPS_PREFIX"
export OPENSSL_ROOT_DIR="$A11_DEPS_PREFIX"
export PKG_CONFIG_PATH="$A11_DEPS_PREFIX/lib/pkgconfig"
export MACOSX_DEPLOYMENT_TARGET=14.4   # macOS only
scripts/bootstrap_wheel_deps.sh

CMake still fetches the pinned Abseil (and libdatachannel, for WebRTC) automatically. See BUILDING.md for the full rundown.

2. Configure, build, and install to a prefix (the exports above point CMake at the dependency prefix):

cmake -S . -B build -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DA11_BUILD_PYTHON=OFF \
  -DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
  -DCMAKE_INSTALL_PREFIX="$PWD/install"

cmake --build build -j
cmake --install build

On macOS, pass -DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 as shown — it must match the value the prefix was bootstrapped with. Setting it as a cache variable here (not only via the MACOSX_DEPLOYMENT_TARGET environment export, which CMake may not pick up) is what enables the Boost.Fiber futex spinlock; a lower target compiles Boost.Fiber without futex support and fails with "futex not supported on this platform". The flag is ignored on Linux.

3. Use it from your own CMake project. The install exports a CMake package named a11 with per-component targets (a11::service links the whole runtime). Point your consumer's CMAKE_PREFIX_PATH at both the install prefix and the dependency prefix from step 1, so the transitive static Boost/OpenSSL/… resolve:

find_package(a11 CONFIG REQUIRED)

add_executable(my_agent main.cc)
target_link_libraries(my_agent PRIVATE a11::service)
target_compile_features(my_agent PRIVATE cxx_std_20)
#include "a11/nodes/node_map.h"

int main() {
  auto node_map = a11::nodes::NodeMap::Create();
  return node_map.ok() ? 0 : 1;
}

Configure your project with -DCMAKE_PREFIX_PATH=/path/to/install so find_package locates it. The generated C++ API reference is published alongside the docs.

Download files

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

Source Distribution

a11_kit-0.2.2.tar.gz (723.7 kB view details)

Uploaded Source

Built Distributions

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

a11_kit-0.2.2-cp314-cp314-manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

a11_kit-0.2.2-cp314-cp314-manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

a11_kit-0.2.2-cp314-cp314-macosx_14_0_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.14macOS 14.0+ x86-64

a11_kit-0.2.2-cp314-cp314-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

a11_kit-0.2.2-cp313-cp313-manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

a11_kit-0.2.2-cp313-cp313-manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

a11_kit-0.2.2-cp313-cp313-macosx_14_0_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.13macOS 14.0+ x86-64

a11_kit-0.2.2-cp313-cp313-macosx_14_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

a11_kit-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

a11_kit-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

a11_kit-0.2.2-cp312-cp312-macosx_14_0_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.12macOS 14.0+ x86-64

a11_kit-0.2.2-cp312-cp312-macosx_14_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

a11_kit-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

a11_kit-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

a11_kit-0.2.2-cp311-cp311-macosx_14_0_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.11macOS 14.0+ x86-64

a11_kit-0.2.2-cp311-cp311-macosx_14_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

File details

Details for the file a11_kit-0.2.2.tar.gz.

File metadata

  • Download URL: a11_kit-0.2.2.tar.gz
  • Upload date:
  • Size: 723.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for a11_kit-0.2.2.tar.gz
Algorithm Hash digest
SHA256 62f9cc7fecde6d5f96128cb2b442202a35bf786de94921c42db5052383468fde
MD5 fd2835c60e03a1eb737b29b7ace2d5a0
BLAKE2b-256 11410fad9ddb384af7f319ffda74b9dbf75da17f31399f835541d5746a7d28e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2.tar.gz:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7c9a412c9d66a3d6329b7f1699288ea12e19aa237585238297482d18c9d309a3
MD5 1a70d6b2b0f0a83f1aa2b611265f6ab8
BLAKE2b-256 463dc9c34845f5b7d54024209498129f0ff99ad6f096de5f6f7d6b2f2734cb9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0c22b45712ae0d140ad1db750f39997f5593603fb5265a28c2c9bcb321e42c06
MD5 730e06f04be1e536e585b01b013cdff8
BLAKE2b-256 91f9a96638196ed567362215f03f4e071c4203cd79b5f947c0859e33705b4577

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp314-cp314-manylinux_2_28_aarch64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp314-cp314-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp314-cp314-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 d70e5d27473e059b6659506a032d625f7ffc746c06326b7abb5427c158797a2b
MD5 b4689f00b7fcfc28fe5d20011dd2d877
BLAKE2b-256 4d1310b1d9080f57714ecb39cd9760181a99348923cd49802fe563b90563a48c

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp314-cp314-macosx_14_0_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 74a0fde4f376cafe29a2fb038f64cbfd842c59ad5ac89f3854157ee578c2630e
MD5 cd2556d36e065bb2c7fad22235410fb3
BLAKE2b-256 d70a019052bec1f84abd04421191adfc98371dbbd8beadfa746f67347149148c

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp314-cp314-macosx_14_0_arm64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f46ec0f8b689eb9cab1776ff88b0755fe689d2be35db8bd2f99879423fd7fb90
MD5 dd4daad64a243c7dfcc661785ef63033
BLAKE2b-256 5713a9f0397ef39428c2527cfdd8f632ba2d82117012c4539dc5c579fcfce504

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0aad4cb8de495ee75784e7c1a2431b9ef510f2c7de6a76f1548d181744a54d61
MD5 cd28d9d30bb366db05513755ea50299b
BLAKE2b-256 59dfdd513b8c4d77bc368cece1079ef00ec67cd8508ae3f62c32205a9339f18d

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp313-cp313-manylinux_2_28_aarch64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp313-cp313-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp313-cp313-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 9feb487e09288d8aed4304d7639e9ac5d3094ff010dcda1d503eca6acc6f649c
MD5 773a154984c6c530c08cc61d81b14e7b
BLAKE2b-256 1cb4d36344e67ea017a73eb20eef3c086b813cf14bbf2e68163308e927c219be

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp313-cp313-macosx_14_0_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b27efc63f3f3d7d95180cbc55927f7f1c295dcffd052cf4779b0dfd95ae910e5
MD5 bdffa8edcdcae5dad50550fb44a3edfc
BLAKE2b-256 f646b888a7b17c5fbeb54bf681604244e0c1dc6c973ed8d38dc5b6049e680859

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80b770c5038794eb52b3d9475691ef2cc02fa37f58dc9ad52a2f2746b1f0f173
MD5 9b6b5936b908b584e063677df89dd607
BLAKE2b-256 a0a2d17df26d5027ada3f2efc6e064831f8f26c42afb9a4dd5e7955203d03a27

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 916a0689dec1ad559937f672db47decb58d5dcbd2a06ab243e95ad7e00c42ee2
MD5 174ed11ebfeba3ebe844b0613d557e6d
BLAKE2b-256 c789aca395de9eee54097a1d47189a9246f160be6a3fae7a9881fbb8daec873c

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp312-cp312-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp312-cp312-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 0a4c7b6da6a90a9717626855634e3c903d4c5a460c610287165b867e992a75c4
MD5 213ed3907197ae43780207b66094edca
BLAKE2b-256 db672a67cbe741b85e25f6cc2ac47d92726e0046b183b47f2b73ab19f9e9d107

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp312-cp312-macosx_14_0_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0bc00e3e38994518b0bfe6bb2918d718bfd1d57a608bf7eec46413d00e8b7b3e
MD5 decb7e5abbe7af42c93b674f743db8d1
BLAKE2b-256 7ea3a7ca7cc2ade60f29086612170cfef4d3ea2a9d058d0c8ccf807231f01397

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e08331e36036f5c39789f1d905ecefb02607ec28d2fc860819473f604eaa78e
MD5 a57d0689d6ea4608cc2b0695f380410c
BLAKE2b-256 56a2c1b1b68139a3b1dc99230874d81cbb91909085d6c39acc47de0b7987273b

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 28b9d5487f67657467d84fb1859bf0c2a275586a1d093e6e0c855287d928817e
MD5 a5f18c94243eef0ef45b1379e244c919
BLAKE2b-256 a8384a60cf91d84a12f7d738f889333e8db8a652c57ded9402f5b8d3a05bbf79

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp311-cp311-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp311-cp311-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 201514598dcc56175e0c8962afcba64a57782b87d74805c266a4775fcc8df8f4
MD5 2bc92f8a7fbd5689c66edb572742588c
BLAKE2b-256 3d2f0bfe9d68164bd056435551d210c6e363ef34de75c0dea36ac615905c019d

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp311-cp311-macosx_14_0_x86_64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a11_kit-0.2.2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for a11_kit-0.2.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4a8b1b3bfcbcbc7248863160b0ec3f5437763833a65392d686e11ac0568fdbeb
MD5 2a85aa9a68a8af5de916c501e3dcb005
BLAKE2b-256 4d9a87aedd1b99aa83e5f6daef6b8730632c56e89699f73b675bacacb07358de

See more details on using hashes here.

Provenance

The following attestation bundles were made for a11_kit-0.2.2-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: release.yml on hpnkv/a11

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.6

17 files

0.5.5

17 files

0.5.4

17 files

0.5.3

17 files

0.5.2

17 files

0.5.1

17 files

0.5.0

17 files

0.4.6

17 files

0.4.4

17 files

0.4.2

17 files

0.4.1

17 files

0.3.3

17 files

0.3.2

17 files

0.3.1

17 files

0.3.0

17 files

0.2.5

17 files

0.2.3

17 files

This release

0.2.2 This release

17 files

0.2.1

17 files

0.2.0

17 files

0.1.8

17 files

0.1.7

17 files

0.1.6

17 files

0.1.5

16 files

0.1.4

16 files

0.1.3

8 files

0.1.2

8 files

0.1.1

17 files

0.1.0

3 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