LangChain agents
LangChain agents are autonomous workflows that let a large language model decide which tool—API, database, calculator, or Python function—to call next until a user goal is met. The agent receives the prompt, inspects available tools via a schema, plans a step, executes it, and feeds the result back into the LLM for the next decision, forming a reflection loop. Built-in types include Zero-Shot React for general tasks, Conversational React with chat memory, and MRKL for math-heavy queries. Developers register tools with a one-line decorator, set stop conditions, and rely on LangChain’s callback system for tracing, retries, and cost tracking. Guardrails enforce rate limits and filter unsafe actions, while vector memory lets agents recall prior context across sessions. By chaining reasoning with tool use, LangChain agents automate complex tasks such as data enrichment, code generation, or multi-step RAG pipelines—cutting manual glue code and speeding time-to-production.