langchain.agents.initialize.initialize_agent¶
langchain.agents.initialize.initialize_agent(tools: Sequence[BaseTool], llm: BaseLanguageModel, agent: Optional[AgentType] = None, callback_manager: Optional[BaseCallbackManager] = None, agent_path: Optional[str] = None, agent_kwargs: Optional[dict] = None, *, tags: Optional[Sequence[str]] = None, **kwargs: Any) → AgentExecutor[source]¶
Load an agent executor given tools and LLM.
Parameters
tools – List of tools this agent has access to.
llm – Language model to use as the agent.
agent – Agent type to use. If None and agent_path is also None, will default to
AgentType.ZERO_SHOT_REACT_DESCRIPTION.
callback_manager – CallbackManager to use. Global callback manager is used if
not provided. Defaults to None.
agent_path – Path to serialized agent to use.
agent_kwargs – Additional key word arguments to pass to the underlying agent
tags – Tags to apply to the traced runs.
**kwargs – Additional key word arguments passed to the agent executor
Returns
An agent executor
Examples using initialize_agent¶
ChatGPT Plugins
Google Serper API
Human as a tool
OpenWeatherMap API
Search Tools
Zapier Natural Language Actions API
ArXiv API Tool
Metaphor Search
GraphQL tool
Gradio Tools
SceneXplain
Shell Tool
Zep Memory
Dynamodb Chat Message History
Argilla
Streamlit
WandB Tracing
Comet
Aim
Weights & Biases
MLflow
Google Serper
Flyte
ClearML
Log, Trace, and Monitor Langchain LLM Calls
Portkey
Jira
Document Comparison
Azure Cognitive Services Toolkit
Natural Language APIs
Gmail Toolkit
Github Toolkit
PlayWright Browser Toolkit
Office365 Toolkit
Amadeus Toolkit