Skip to main content

langgraph-events

Opinionated event-driven abstraction for LangGraph. State IS events.

[!CAUTION] Experimental (v0.23.1) - This is an early-stage personal project, not a supported product. The API will change without notice or migration path.

Quick Start

Group related commands and events into a Namespace; colocate the handler on the command.

from langgraph_events import Command, DomainEvent, EventGraph, Namespace


class Order(Namespace):
    class Place(Command):
        customer_id: str

        class Placed(DomainEvent):
            order_id: str

        def handle(self) -> Placed:
            return Order.Place.Placed(order_id=f"o-{self.customer_id}")


graph = EventGraph([Order.Place])
log = graph.invoke(Order.Place(customer_id="alice"))
print(log.latest(Order.Place.Placed))

@on(...) handlers add invariants, declared exceptions, and cross-namespace reactions. See Concepts and Control Flow.

Installation

pip install langgraph-events

# With AG-UI adapter support
pip install "langgraph-events[agui]"

# From source (development)
pip install git+https://github.com/cadance-io/langgraph-events.git

Documentation

Development

uv sync --group dev
uv run pytest tests/
uv run ruff check src/ tests/
uv run mypy src/

License

MIT - see LICENSE.

Metadata

Release files for langgraph-events 0.23.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 langgraph-events 0.23.1
File Size Uploaded
langgraph_events-0.23.1.tar.gz 496.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langgraph-events 0.23.1
File Interpreter ABI Platform
langgraph_events-0.23.1-py3-none-any.whl Python 3 none any Details

Total release size: 642.4 kB

Release files / langgraph_events-0.23.1.tar.gz

Download URL langgraph_events-0.23.1.tar.gz
Size 496.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3150303f27a8f40376b2af3a47963b6291190628506deb24b2bdfbe64fc381f7
BLAKE2b-256 checksum
How to use checksums
9e43d4f76a82c13bd67090533cfed4ccbce723d8f03fcb4002086429095ee945
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / langgraph_events-0.23.1-py3-none-any.whl

Download URL langgraph_events-0.23.1-py3-none-any.whl
Size 145.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
970b08a06fd81c97cfa287b51477b502d60df69d7f5988dd3cbe87d067d4bb54
BLAKE2b-256 checksum
How to use checksums
a4a084de62b1cb1460ac83e339346152ccc01c0eeda85561dcd8b4e9504ddc8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.33.0

2 release files

0.32.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.1

2 release files

0.25.0

2 release files

0.24.0

2 release files

This release

0.23.1 This release

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 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