Skip to main content

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

Project description

langgraph-events

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

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

Quick Start

from langgraph_events import Event, EventGraph, on


class MessageReceived(Event):
    text: str


class ReplyProduced(Event):
    text: str


@on(MessageReceived)
def reply(event: MessageReceived) -> ReplyProduced:
    return ReplyProduced(text=f"Echo: {event.text}")


graph = EventGraph([reply])
log = graph.invoke(MessageReceived(text="hello"))
print(log.latest(ReplyProduced))

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_events-0.2.1.tar.gz (227.0 kB view details)

Uploaded Source

Built Distribution

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

langgraph_events-0.2.1-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_events-0.2.1.tar.gz.

File metadata

  • Download URL: langgraph_events-0.2.1.tar.gz
  • Upload date:
  • Size: 227.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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}

File hashes

Hashes for langgraph_events-0.2.1.tar.gz
Algorithm Hash digest
SHA256 81705cbe39ec89c875bf112380bab55f3ec8b61dbf17d42a5f0b77d14562a40b
MD5 19a5bb649b8759c41ffd8c893230a290
BLAKE2b-256 f388b7014d37cc0dcdaa8c4f3a65af95ff7e95a3aff47da0e25e9d414101b610

See more details on using hashes here.

File details

Details for the file langgraph_events-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: langgraph_events-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 36.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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}

File hashes

Hashes for langgraph_events-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0508544f1d13d69f5080e4503e048abbb053aa25ef0c09aa85637424a95c1ad
MD5 9cb2e5fd7874be6b65863fd88a73754c
BLAKE2b-256 2f8c52ea50fd48e90a23ebe990b5312372b4bea8dae60ebbe6ed57d412e2336b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page