LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-clischemasSerdeConfigallowed_msgpack_modules
    Attribute●Since v0.4

    allowed_msgpack_modules

    Copy
    allowed_msgpack_modules: list[list[str]] | bool | None
    View source on GitHub

    Optional. List of allowed python modules to de-serialize custom objects from msgpack.

    Known safe types (langgraph.checkpoint.serde.jsonplus.SAFE_MSGPACK_TYPES) are always allowed regardless of this setting. Use this to allowlist your custom Pydantic models, dataclasses, and other user-defined types.

    If True (default), unregistered types will log a warning but still be deserialized. If None, only known safe types will be deserialized; unregistered types will be blocked.

    Example - allowlist specific types (no warnings for these): {... "serde": { "allowed_msgpack_modules": [ ["my_agent.models", "MyState"], ] } }

    Example - strict mode (only safe types allowed): {... "serde": { "allowed_msgpack_modules": null } }