AI SummaryAgents merge language models with tools to build systems capable of reasoning about tasks, deciding which tools to suit the situation, and iteratively working toward solutions. The function provides a production-ready implementation. Agents follow a loop pattern: input flows to the model, which dec
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to set up the "LangChain Agents" agent in my project. Please run this command in my terminal: # Add AGENTS.md to your project root curl --retry 3 --retry-delay 2 --retry-all-errors -o AGENTS.md "https://raw.githubusercontent.com/BAEM1N/langchain-langgraph-deepagents-notebooks/main/docs/langchain/03-agents.md" Then explain what the agent does and how to invoke it.
Description
LangChain · LangGraph · Deep Agents Notebooks
Overview
Agents merge language models with tools to build systems capable of reasoning about tasks, deciding which tools to suit the situation, and iteratively working toward solutions. The create_agent function provides a production-ready implementation.
Tools
Tools enable agent actions. Unlike simple binding, agents facilitate multiple sequential calls, parallel execution, dynamic selection, retry logic, and state persistence. Static Tools: Defined at creation using the @tool decorator: `python from langchain.tools import tool @tool def search(query: str) -> str: """Search for information.""" return f"Results for: {query}" agent = create_agent(model, tools=[search]) ` Dynamic Tools: Modified at runtime through two approaches -- filtering pre-registered tools or registering tools discovered at runtime (from MCP servers or external registries).
Core Architecture
Agents follow a loop pattern: input flows to the model, which decides on actions, calls appropriate tools, receives observations, and repeats until reaching a stop condition (final output or iteration limit).
Model Configuration
Static Models: Set once at creation and remain constant throughout execution. `python from langchain.agents import create_agent agent = create_agent("openai:gpt-5.4", tools=tools) ` For granular control, instantiate model objects directly: `python from langchain_openai import ChatOpenAI model = ChatOpenAI(model="gpt-5.4", temperature=0.1, max_tokens=1000) agent = create_agent(model, tools=tools) ` Dynamic Models: Selected at runtime based on state and context using the @wrap_model_call decorator for sophisticated routing and cost optimization.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster