Home / Class/ AgentOutputParser Class — langchain Architecture

AgentOutputParser Class — langchain Architecture

Architecture documentation for the AgentOutputParser class in agent.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d9685a4b_26b0_bca9_f857_03bb2ffc9dd4["AgentOutputParser"]
  0ebc163d_9dba_a521_0e2e_0dd45f356b3e["agent.py"]
  d9685a4b_26b0_bca9_f857_03bb2ffc9dd4 -->|defined in| 0ebc163d_9dba_a521_0e2e_0dd45f356b3e
  7f20b33a_2c0c_9512_1e6e_da874c4dc01f["parse()"]
  d9685a4b_26b0_bca9_f857_03bb2ffc9dd4 -->|method| 7f20b33a_2c0c_9512_1e6e_da874c4dc01f

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/agent.py lines 361–366

class AgentOutputParser(BaseOutputParser[AgentAction | AgentFinish]):
    """Base class for parsing agent output into agent action/finish."""

    @abstractmethod
    def parse(self, text: str) -> AgentAction | AgentFinish:
        """Parse text into agent action/finish."""

Frequently Asked Questions

What is the AgentOutputParser class?
AgentOutputParser is a class in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent.py.
Where is AgentOutputParser defined?
AgentOutputParser is defined in libs/langchain/langchain_classic/agents/agent.py at line 361.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free