AgentStep Class — langchain Architecture
Architecture documentation for the AgentStep class in agents.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 49303d68_8203_8fe7_7ed7_cdd4d346ba09["AgentStep"] f3658565_d05c_7f49_b7f8_622b7ef34f33["Serializable"] 49303d68_8203_8fe7_7ed7_cdd4d346ba09 -->|extends| f3658565_d05c_7f49_b7f8_622b7ef34f33 81828515_0fcd_6cb4_96b8_62d4fca3e4ff["agents.py"] 49303d68_8203_8fe7_7ed7_cdd4d346ba09 -->|defined in| 81828515_0fcd_6cb4_96b8_62d4fca3e4ff a2344a29_310c_4291_2dbb_16e6df48d673["messages()"] 49303d68_8203_8fe7_7ed7_cdd4d346ba09 -->|method| a2344a29_310c_4291_2dbb_16e6df48d673
Relationship Graph
Source Code
libs/core/langchain_core/agents.py lines 131–143
class AgentStep(Serializable):
"""Result of running an `AgentAction`."""
action: AgentAction
"""The `AgentAction` that was executed."""
observation: Any
"""The result of the `AgentAction`."""
@property
def messages(self) -> Sequence[BaseMessage]:
"""Messages that correspond to this observation."""
return _convert_agent_observation_to_messages(self.action, self.observation)
Defined In
Extends
Source
Frequently Asked Questions
What is the AgentStep class?
AgentStep is a class in the langchain codebase, defined in libs/core/langchain_core/agents.py.
Where is AgentStep defined?
AgentStep is defined in libs/core/langchain_core/agents.py at line 131.
What does AgentStep extend?
AgentStep extends Serializable.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free