Skip to main content
This page describes the planned Message type for aion-langgraph. The goal is to give LangGraph authors a stable, provider-neutral view of the current inbound message without making them inspect raw Slack, Telegram, or other provider payloads directly.

Properties

PropertyPurpose
idStable message identifier for the inbound turn
textPlain-text body when one exists
user.idIdentifier for the user who triggered the event
threadBound Thread object for the current conversation
rawOptional raw provider payload or raw A2A part access

Methods

MethodPurpose
reply(content, *, metadata=None)Convenience wrapper around message.thread.reply(...)
react(key)Express a normalized reaction against the current message

Example

async def node(state: State, runtime: Runtime[AionContext]) -> dict:
    message = runtime.context.message

    if message and message.text.lower().startswith("thanks"):
        await message.react("thumbsup")
        await message.reply("You're welcome.")
        return {}

    return {}

Relation to Other Event Kinds

Not every inbound turn is a plain message. Reaction, command, and card-action turns are better modeled as event kinds with specialized metadata. For those turns:
  • runtime.context.event should remain authoritative
  • runtime.context.message may still be populated when the provider exposes a meaningful message anchor
  • handler registration should happen through Event Handlers