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, 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

a11_kit-0.1.5-cp314-cp314-manylinux_2_28_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

a11_kit-0.1.5-cp314-cp314-manylinux_2_28_aarch64.whl (7.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

a11_kit-0.1.5-cp314-cp314-macosx_14_0_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.14macOS 14.0+ x86-64

a11_kit-0.1.5-cp314-cp314-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

a11_kit-0.1.5-cp313-cp313-manylinux_2_28_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

a11_kit-0.1.5-cp313-cp313-manylinux_2_28_aarch64.whl (7.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

a11_kit-0.1.5-cp313-cp313-macosx_14_0_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ x86-64

a11_kit-0.1.5-cp313-cp313-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

a11_kit-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

a11_kit-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl (7.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

a11_kit-0.1.5-cp312-cp312-macosx_14_0_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ x86-64

a11_kit-0.1.5-cp312-cp312-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

a11_kit-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

a11_kit-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl (7.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

a11_kit-0.1.5-cp311-cp311-macosx_14_0_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.11macOS 14.0+ x86-64

a11_kit-0.1.5-cp311-cp311-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dc968a42bd9490eab05b61dca98ff353d950ba028c09cd8d61dd075652900a7c
MD5 06b249d387444c3cf74bdfa27cc06545
BLAKE2b-256 d78b92c46f505cfe0cc0552aa49138437a730c3844d95bb4d1f477a44e057696

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2bd9c9de5870777c58a1360f5eebebd07e954810bdee8bddb5c82ebf0170c737
MD5 bc80525ab50b8a0af5c8601b72969c36
BLAKE2b-256 b8bd2034211a3d4256e15d9f18c3cf942172a0d7436b8c7ed6fc2985f9177e6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp314-cp314-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 ea1dbb7c0dd18feed5b6caf3e2179ff86e33d50381137e2e5dfe7729a154cd3f
MD5 0f0506aef20b8fe01a4094d6322f5cf7
BLAKE2b-256 de6b227fb528d3ce3b14ea55f501a1e2385f76b45fcfd87933630c18294b2bef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2902438732608f6fb47429fb9b214ed536a13b2fadbeca11f15097eb1f9f841e
MD5 939714eb92d8e0ac26bf38245a99fba7
BLAKE2b-256 75a9e6883829953e4e0ab678cab1be7d1a2de0dcff7f6d27c85cb31dc15bdb89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d688bfc380ce07d736984f89aa7127a9a3bff5fbddb8273070723c8c4161697c
MD5 3054938e2ddfc92ed21dd134b5c37f41
BLAKE2b-256 0e051a140814e668191d0b678ce170c3e676998e8ac50109d6e851ae8cd7c34b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7f911661e1b3b0386b397c659deb75cc172d60713c618d640753100a65298b2c
MD5 d5a650ee3ac9bf408bf6347026d03111
BLAKE2b-256 7a44ddc6df18b5a6fd4d2cbd4af31a29fa84639b64ba7f8e543e9ae14392f8bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp313-cp313-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 d8ed560f6a64ca31f09e3be1a0233bf9be38870890f1ed2ed9c60795a9bc8deb
MD5 c0a5d855d241904ec8e9afd288158868
BLAKE2b-256 76f95d66ac0eb5753ff3e01cdf5168ba7f640172eacc2295c6a20a79a635a8f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f38571b1f4a6af7dfb440c69abc85c76c83124ea5709b8c4a5f793e8282ff2f5
MD5 c102fb406c57d033ea1d3d2d4877bdd7
BLAKE2b-256 f04ff0a477dd3818855ac2ea84890fb12f0ba64abc3a5c76880e8e038aa28b98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 405cd7148a7579518328f0d9ddae26d6d8e76b857c9d4e01b869bdaaf330d2df
MD5 bf54e9045ec4fe9d7b68c4e95028a095
BLAKE2b-256 3e969c70d81356b743d92e07a4cba36d97cf513b2455d44b58f62ff165035203

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4d9c7d505ad6d2c27ed438f56c816868040f2fda4ffb35d2f34d9752195f5f21
MD5 20ea8c0323ab1cfd793dbb2653e7be8f
BLAKE2b-256 7ee6c23478717f4a06a3a755da2e350ec7be9ec75e72bc99d1e6b72e26c5f202

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp312-cp312-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 90b65db4a22020e465524bc0d047edeee29bc0285491f5346172eef4af5d7c56
MD5 68d2e90f8399bc33e5d6f14229f00355
BLAKE2b-256 51512297645aca73c0941b5f42e0508ef71bbb5891bbc2911e80fb4e9158cec6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 3541638896850b16bc4d0a385b878b046b5168b7fd1670362ae59393c64bac8e
MD5 39c454a5b5257ce49c5e77d38833ba91
BLAKE2b-256 8e646147eda78eb3abd74a79c4dcb0b4a1312ed1d90717f94f4784cdad6e26ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dd7a32d2caa98f601ee8f3667702f02b0d62d1845fba458d9a87cbc4008fc0f5
MD5 0b517e46c5230c996bad98729c3a4117
BLAKE2b-256 db4557426989ecfcfbcc45dd4eb80932b7074c42f7e243e4d740580030ae96e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 28886758369f0b34ddcc2dc967244bdbf5e2f3c452e37d365a70f454525252bb
MD5 7e27be161df368bcbaf38bedcde36b3e
BLAKE2b-256 fdd2e735d40af75995471175e5ed9b589b4f12a39b030cdf3fcb40c802a6aac3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp311-cp311-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 ffa9a3b5f17df18cfe68e4a1307987cecc02432b8ecf63716b790bacec861848
MD5 772285635a267c6e39a10449e69f7efc
BLAKE2b-256 4f690dc9c90618bfd1b9650f504447c6f2cd1cb25e453e31f643d3cc7124ea3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.5-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 db5f27049892974bcb5a946a23b13da1517e778f8a43cb06db16d5ef9bf11e8a
MD5 690d0162328dfd632532454c22b31fca
BLAKE2b-256 2adf825a4d9440bc2f73099d165153b3b3dcc68071778905f02b3dc942017395

See more details on using hashes here.

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

0.2.2

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

This release

0.1.5 This release

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