Skip to content

calf-ai/calfkit-mesh

Repository files navigation

🐮 Calfkit Mesh

calfkit sdk PyPI License

Local Kafka infrastructure for event-driven and distributed AI agent development using Calfkit SDK.

Provides two-tier Kafka environments using KRaft:

Tier Use Case Startup Command
Tier 1 Daily development ~10 seconds make dev-up
Tier 2 Integration testing 3-5 minutes make k8s-up

Quick Start

Start up the broker (using Docker)

# Start Kafka for local development
make dev-up

# Kafka available at localhost:9092

# Stop
make dev-down

Kafka UI (optional)

# Start Kafka UI (connects to existing broker at localhost:9092)
make ui

# UI available at http://localhost:8080

# Stop
make ui-down

calfkit-mesh pip package

For a zero-dependency local broker, this repo also publishes the calfkit-mesh Python package. It bundles a static, memory-only build of the Tansu broker (Apache Kafka-compatible) inside platform wheels, so calfkit's ck dev can spawn a broker without Docker, JVM, or any network install:

pip install calfkit-mesh

This is the upstream of calfkit's opt-in [mesh] extra. The package exposes a single locator, calfkit_mesh.resolve_broker_bin(), which returns the path to a usable tansu executable using this resolution order:

  1. $CALF_TANSU_BIN — if set, it is used verbatim (and must point at an executable file, or resolution fails). Use this to point ck dev at your own tansu build.
  2. The wheel-bundled binary — materialized once to a stable cache path (~/.calfkit/bin/tansu-<version>) and made executable.
  3. tansu on your PATH.

Wheels are built for Linux (x86_64, aarch64; published under both manylinux and musllinux tags), macOS (arm64, x86_64), and Windows (x86_64).

License

Apache 2.0 - see LICENSE.

The Tansu binary bundled in calfkit-mesh wheels is also Apache 2.0; see NOTICE for attribution.