Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.5.6 instead.
Reason given by maintainers: broken

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 build tools and libraries. On macOS with Homebrew:

brew install boost cmake googletest libnghttp2 ninja \
  nlohmann-json openssl@3 pkg-config uvw

You need a C++20 compiler, CMake ≥ 3.28, and Ninja. CMake fetches the pinned Abseil (and libdatachannel, for WebRTC) automatically. On Linux the package names vary; scripts/bootstrap_wheel_deps.sh builds the static dependencies reproducibly (see BUILDING.md).

2. Configure, build, and install to a prefix:

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

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

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):

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.3-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.3-cp314-cp314-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

a11_kit-0.1.3-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.3-cp313-cp313-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

a11_kit-0.1.3-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.3-cp312-cp312-macosx_14_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

a11_kit-0.1.3-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.3-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.3-cp314-cp314-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp314-cp314-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 3339d0a0b28300b4de118ff7fdf373e6a1f23439bd695be60abfb71b0263d3fa
MD5 3ccbf7592c30ba3e52de0dfdc91cbfc8
BLAKE2b-256 9fe5d585dc19d114e9fcb978681a29cce7edd59390b9cf047ae563ac60f23862

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d9962c39004eb485f812c793afaf17b936bd99eb518d6e7588ea8824e1ff85cd
MD5 a9bbf4d78b29d7c33a19a696edad1408
BLAKE2b-256 013eb9aa01fca4cddf02f8116b9fe2823feabd57337957715407df9ac47592d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp313-cp313-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 1fef091871a2bdf17c7da52878ae0ad6aced635eae0a0a0a76f33128b50996f7
MD5 12a8dd99a1ee9eafb4b574059e6a7a0e
BLAKE2b-256 ee8f6ca81a65f096269f2efd2caa10023721ad85e400a32e2b3119b9ab00def8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 39d834b92d96252f6ff6176a8f44615097e54492f5a7795f93bb0c3adde92b6f
MD5 a44e6e5b52d3f256058f7813c08f46c4
BLAKE2b-256 aadb5ed3551829fc7686ced2b1ee110fc98acb2053d7370c86cff4fd5e099796

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp312-cp312-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 683c1159abdbb7b1f0150a0d8cfd1f4e02d0bce62c4f9c20408834987a296690
MD5 e769c73a6c40d6650d3e3e03dedf4168
BLAKE2b-256 e9040d2607c3b3174b2d4128ea6075a06e6ecbd880f55c3ec70539563fa06cb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d8f095db736359deb1e56322d86a8ca9120879b50004c0e78e3b53e6c4cde451
MD5 1994b00c28db83075108c5fd38404435
BLAKE2b-256 d19d8dd99e9cd8a59c30896742bd190f476aedffb0400fe2fb143e4eb628c602

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp311-cp311-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 bb7d6709e95df232aa38bfd439e813c4eba6522d68bb299ecbe3c2de2de22696
MD5 a53ddd6100f5a4e1db92e0ad2dfa5239
BLAKE2b-256 d1ea28a78ba2cbb50fe9628be981d71f7cccde5970bcb86fdc3a0a780a3faec4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a11_kit-0.1.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5408261fe1de44e11a1f5fc43cf7c07d8681cff01b5fee7219162c5eb85e93a1
MD5 7f0f4ffb3c9230760d29ccc506225cb3
BLAKE2b-256 89eaa1a0b210a6c7c896c494275f7045abd13c53bf034e10719f22d8bcb99d52

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

0.1.5

16 files

0.1.4

16 files

This release

0.1.3 This release

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