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

    Chat LangChain

    What can I help with?

    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-sdkprioritytypesPriorityContext
    Class●Since v0.4

    PriorityContext

    Copy
    PriorityContext(
      self,
      user: BaseUser,
      permissions: Sequence[str],
      thread_id: str

    Constructors

    Attributes

    View source on GitHub
    |
    None
    ,
    thread_metadata
    :
    dict
    [
    str
    ,
    typing
    .
    Any
    ]
    ,
    assistant_id
    :
    str
    ,
    graph_id
    :
    str
    ,
    assistant_metadata
    :
    dict
    [
    str
    ,
    typing
    .
    Any
    ]
    ,
    run_metadata
    :
    dict
    [
    str
    ,
    typing
    .
    Any
    ]
    ,
    cron_id
    :
    str
    |
    None
    )
    constructor
    __init__
    NameType
    userBaseUser
    permissionsSequence[str]
    thread_idstr | None
    thread_metadatadict[str, typing.Any]
    assistant_idstr
    graph_idstr
    assistant_metadatadict[str, typing.Any]
    run_metadatadict[str, typing.Any]
    cron_idstr | None
    attribute
    user: BaseUser

    The user from the deployment's auth, custom auth or LangSmith auth. Without auth, user.identity is empty.

    attribute
    permissions: Sequence[str]

    The user's permissions from the same auth. Without auth, it's empty.

    attribute
    thread_id: str | None

    The thread's ID, or None when the run creates its thread without being given an ID.

    attribute
    thread_metadata: dict[str, typing.Any]

    The thread's metadata.

    attribute
    assistant_id: str

    The ID of the assistant the run uses.

    attribute
    graph_id: str

    The ID of the graph the assistant runs.

    attribute
    assistant_metadata: dict[str, typing.Any]

    The assistant's metadata.

    attribute
    run_metadata: dict[str, typing.Any]

    The run's metadata.

    attribute
    cron_id: str | None

    The ID of the cron that started the run, or None when no cron started it.

    Context passed to the @priority.assign function at the first run on a thread with no settings.