langgraph-events
Opinionated event-driven abstraction for LangGraph. State IS events.
[!CAUTION] Experimental (v0.27.0) - 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
- Docs site (GitHub Pages): https://cadance-io.github.io/langgraph-events/
- Local docs index:
docs/index.md - Getting started:
docs/getting-started.md - Core concepts:
docs/concepts.md - Patterns:
docs/patterns.md - Reflection (agent-queryable event log):
docs/reflection.md - API reference:
docs/api.md - AG-UI adapter:
docs/agui.md - Checkpointer and graph evolution:
docs/checkpointer-evolution.md
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.27.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langgraph_events-0.27.0.tar.gz | 559.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langgraph_events-0.27.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 726.9 kB
Release files / langgraph_events-0.27.0.tar.gz
| Download URL | langgraph_events-0.27.0.tar.gz |
|---|---|
| Size | 559.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15d05e20e016e2d6f8f931a55634060232cf23ea7b7d072e2650727cc1df5faa
|
|
BLAKE2b-256 checksum How to use checksums |
044f4b015b269e4ba79c8c45745290c80c1625749b81e4e662511ce0ff1caf15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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.27.0-py3-none-any.whl
| Download URL | langgraph_events-0.27.0-py3-none-any.whl |
|---|---|
| Size | 167.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c66e0c8683094ae7381cb5f44990023ff503fec4345b8017106bf4da977716b
|
|
BLAKE2b-256 checksum How to use checksums |
008c953f75a4e6c258ef5209db044f1de75f5e2abafca27e53f080ae54fa1ad2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}
|