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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

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

    LLMSingleActionAgent

    Base class for single action agents.

    Copy
    LLMSingleActionAgent()

    Bases

    BaseSingleActionAgent

    Attributes

    attribute
    llm_chain: LLMChain

    LLMChain to use for agent.

    attribute
    output_parser: AgentOutputParser

    Output parser to use for agent.

    attribute
    stop: list[str]

    List of strings to stop on.

    attribute
    input_keys: list[str]

    Return the input keys.

    Methods

    method
    dict

    Return dictionary representation of agent.

    method
    plan

    Given input, decided what to do.

    method
    aplan

    Async given input, decided what to do.

    method
    tool_run_logging_kwargs

    Return logging kwargs for tool run.

    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.

    Mfrom_llm_and_tools
    —

    Construct an agent from an LLM and tools.

    Msave
    —

    Save the agent.

    View source on GitHub