LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Graphs
    • Functional API
    • Pregel
    • Checkpointing
    • Storage
    • Caching
    • Types
    • Runtime
    • Config
    • Errors
    • Constants
    • Channels
    • Agents
    LangGraph Checkpoint
    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

    OverviewGraphsFunctional APIPregelCheckpointingStorageCachingTypesRuntimeConfigErrorsConstantsChannelsAgents
    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    PythonlanggraphgraphstateStateGraphset_conditional_entry_point
    Methodā—Since v0.5

    set_conditional_entry_point

    Copy
    set_conditional_entry_point(
      self,
      path: Callable[..., Hashable | Sequence[Hashable]] | Callable[.
    View source on GitHub
    .
    .
    ,
    Awaitable
    [
    Hashable
    |
    Sequence
    [
    Hashable
    ]
    ]
    ]
    |
    Runnable
    [
    Any
    ,
    Hashable
    |
    Sequence
    [
    Hashable
    ]
    ]
    ,
    path_map
    :
    dict
    [
    Hashable
    ,
    str
    ]
    |
    list
    [
    str
    ]
    |
    None
    =
    None
    )
    ->
    Self

    Parameters

    NameTypeDescription
    path*Callable[..., Hashable | Sequence[Hashable]] | Callable[..., Awaitable[Hashable | Sequence[Hashable]]] | Runnable[Any, Hashable | Sequence[Hashable]]
    path_mapdict[Hashable, str] | list[str] | None
    Default:None

    Sets a conditional entry point in the graph.

    The callable that determines the next node or nodes.

    If not specifying path_map it should return one or more nodes.

    If it returns END, the graph will stop execution.

    Optional mapping of paths to node names.

    If omitted the paths returned by path should be node names.