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.2) - 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.2.tar.gz (263.2 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.2-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langgraph_events-0.4.2.tar.gz
  • Upload date:
  • Size: 263.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.2.tar.gz
Algorithm Hash digest
SHA256 8619f53ae9314054f1d302bacac4056ba1b8bc119348fab0646190e1a11dc8f2
MD5 a752311b703d4079ece3c9d8a4e422b9
BLAKE2b-256 fa3fdb7fde09436e9d606941dab109d10a04027ac2c04e0342d7294b34e120fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langgraph_events-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 373baf2066eb1cc9d3ba56a734bf3b23b6eb0d6082c3fb9635fc3dbcbd7dbd69
MD5 48a3676da219dee1e8b96c760afecde7
BLAKE2b-256 6d65a1fb1dd6dc22a0cd5b3f5d871c507384dc53d5821a543962f17a9c9cfe99

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