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-supervisoragent_name
    Module●Since v0.0

    agent_name

    Attributes

    attribute
    NAME_PATTERN
    attribute
    CONTENT_PATTERN
    attribute
    AgentNameMode: Literal['inline']

    Functions

    function
    add_inline_agent_name

    Add name and content XML tags to the message content.

    Examples:

    >>> add_inline_agent_name(AIMessage(content="Hello", name="assistant"))
    AIMessage(content="<name>assistant</name><content>Hello</content>", name="assistant")
    
    >>> add_inline_agent_name(AIMessage(content=[{"type": "text", "text": "Hello"}], name="assistant"))
    AIMessage(content=[{"type": "text", "text": "<name>assistant</name><content>Hello</content>"}], name="assistant")
    
    function
    remove_inline_agent_name

    Remove explicit name and content XML tags from the AI message content.

    Examples:

    >>> remove_inline_agent_name(AIMessage(content="<name>assistant</name><content>Hello</content>", name="assistant"))
    AIMessage(content="Hello", name="assistant")
    
    >>> remove_inline_agent_name(AIMessage(content=[{"type": "text", "text": "<name>assistant</name><content>Hello</content>"}], name="assistant"))
    AIMessage(content=[{"type": "text", "text": "Hello"}], name="assistant")
    
    function
    with_agent_name

    Attach formatted agent names to the messages passed to and from a language model.

    This is useful for making a message history with multiple agents more coherent.

    View source on GitHub