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.4.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.4.1.tar.gz (255.1 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.4.1-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langgraph_events-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5fb259c35edc88d2cc43f44eba41b6bcbd6b0120a1aad05a7bb323e8ec9ee9a4
MD5 4729b2183c20009d46f3e3e7df2773f4
BLAKE2b-256 683bb8f14e600891be3fc5b2a4aa810f7043d754e9d6fdc66664df7f4fe2cae5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for langgraph_events-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa969da1bf0f7a0dd93dff24ef368da6c075755dad04cdcb79027f9ab3077488
MD5 4edcd70e5ac21859411480a335631376
BLAKE2b-256 3ffc0afb66a222a7c285df05d6bea572e95efb6d3ae20b55d94077dd08d4b2f5

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