LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicagentsxmlbaseXMLAgent
    Class●Since v1.0Deprecated

    XMLAgent

    Copy
    XMLAgent()

    Bases

    BaseSingleActionAgent

    Attributes

    Methods

    Inherited fromBaseSingleActionAgent

    Attributes

    Areturn_values: list[str]
    —

    Return values of the agent.

    Methods

    Mget_allowed_tools
    —

    Get allowed tools.

    Mreturn_stopped_response
    —

    Return response when agent has been stopped due to max iterations.

    View source on GitHub
    Mfrom_llm_and_tools
    —

    Construct an agent from an LLM and tools.

    Mdict
    —

    Return dictionary representation of agent.

    Msave
    —

    Save the agent.

    Mtool_run_logging_kwargs
    —

    Return logging kwargs for tool run.

    Parameters

    NameTypeDescription
    tools*unknown
    llm_chain*unknown
    attribute
    tools: list[BaseTool]
    attribute
    llm_chain: LLMChain
    attribute
    input_keys: list[str]
    method
    get_default_prompt
    method
    get_default_output_parser
    method
    plan
    method
    aplan

    Agent that uses XML tags.

    list of tools the agent can choose from

    The LLMChain to call to predict the next action

    List of tools this agent has access to.

    Chain to use to predict action.

    Return the default prompt for the XML agent.

    Return an XMLAgentOutputParser.