Agent system for building autonomous LLM applications.
Provides core abstractions and implementations for agents.
Core Concepts
- Agent: Responsible for planning, deciding what action to execute next.
- AgentExecutor: Responsible for execution loop (plan -> act -> observe).
- Tool: Callable tools that agents can invoke.
Execution Flow
Input question
|
Agent.plan() -> AgentAction or AgentFinish
|
If Action: execute tool -> get observation
|
Add to intermediate_steps
|
Loop until AgentFinish returned