AI agents use language models to plan and execute multi-step tasks with external tools and memory.
2
Agents are useful when a task combines several capabilities or needs personalization over time.
3
The workshop builds a research agent with Fireworks FireFunction V1, LangChain, and MongoDB for finding papers, summarizing them, answering research questions, and storing chat history.
Summary
Apoorva Joshi starts with a practical definition of AI agents: systems that use a large language model to reason about a problem, create a plan, and execute it through tools. She compares simple prompting, retrieval augmented generation, and agents, then explains planning patterns such as Chain of Thought, Tree of Thoughts, ReAct, and reflection. The workshop builds an AI research agent that finds papers from arXiv, summarizes them, answers questions using a MongoDB knowledge base, and remembers short-term chat history. The implementation uses Fireworks FireFunction V1 as the model, LangChain for prompts and agent execution, Hugging Face models for embeddings, and MongoDB Atlas for vector search and stored messages. The practical work covers environment setup, LangChain document loaders, tool creation, tool-calling and ReAct agents, and RunnableWithMessageHistory. Joshi is clear that agents bring higher cost and latency, and that long-term memory remains difficult to design.
Agents combine reasoning, tools, and memory to handle multi-step work
Apoorva Joshi defines an AI agent as a system that uses a large language model to reason through a problem, create a plan, and execute that plan with tools. Simple prompting relies on the model's pretrained knowledge and works well for point-in-time general questions. Retrieval augmented generation adds information from a knowledge base, but does not by itself handle complex execution, self-refinement, or personalization. Agents can call external tools, use feedback from their results, repeat actions, and draw on past interactions. That makes them useful for work that requires several steps or responses that change over time.
Agents are a poor fit for questions that retrieval can answer directly
Joshi tests the definition with concrete examples. Asking who the first president of the United States was probably only requires the model's parametric knowledge. A company travel reimbursement policy is a better fit for retrieval augmented generation if the model can access the right policy documents, even when the answer depends on an employee's location. By contrast, analyzing how average daily calorie intake changed over a decade, estimating its effect on obesity rates, and making a graph involves data aggregation, visualization, and reasoning. A personalized learning assistant also needs agent behavior because it must adapt examples and explanations based on student responses over time.
Planning can run once or change after tool feedback
The workshop distinguishes planning without feedback from planning with feedback. In the first pattern, the model creates an execution plan from its initial understanding and follows it without changing the plan based on tool results. Chain of Thought and Tree of Thoughts are examples of this family. With feedback, the agent adjusts its next step after seeing tool outcomes or critiquing its own answer. ReAct produces a thought, selects an action, observes the result, and continues the loop until it reaches an answer. Reflection adds a critique step, possibly using another model or agent, and trades additional computation for a better chance of accuracy.
Tree of Thoughts searches across several reasoning paths
Tree of Thoughts extends step-by-step reasoning by having the model consider multiple possible reasoning paths. The model evaluates those choices, decides which direction to continue, and can look ahead or backtrack when needed. Joshi describes this as combining the language model's ability to generate and evaluate thoughts with search algorithms. ReAct follows a different pattern: the model produces a reasoning trace, names an action and its arguments, observes the tool's output, and selects the next action. These patterns give the model a way to use intermediate information instead of producing one answer from the initial prompt.
Long-term memory requires application-specific state decisions
Joshi separates agent memory into short-term and long-term forms. Short-term memory stores and retrieves information within one conversation. If that conversation becomes too long, the application may retrieve only the most recent messages or summarize the history, accepting some information loss. Long-term memory spans multiple conversations and can support personalization, but it is harder to build because developers must decide which states to track, how to represent them, and when to update them. Joshi argues that application-specific agents make this problem narrower because the system can focus on a limited set of useful states.
Tools expose external capabilities through descriptive function interfaces
Tools let agents interact with the outside world. They can be simple APIs, such as search or weather services, or more involved systems such as vector stores and specialized machine learning models. In practice, tools are commonly defined as functions. The language model identifies when a function should be called and returns a function signature that application code can execute. LangChain can handle the function-calling mechanics, but the tool still needs a descriptive name, a detailed description, and clear argument types so the model can choose it correctly.
The workshop research agent uses three tools and MongoDB storage
The hands-on project builds an AI research agent with three main capabilities: finding papers to read, summarizing research papers, and answering questions about research topics. Fireworks FireFunction V1 provides the open-source model used as the agent's brain. The workshop experiments with Chain of Thought and ReAct, then adds short-term memory stored in MongoDB. The agent uses arXiv data and a MongoDB knowledge base. Later setup covers Hugging Face datasets for archived paper embeddings, LangChain's arXiv loader for paper documents, and MongoDB Atlas as a vector store and chat-history store.
LangChain assembles the agent from prompts, tools, parsers, and a runtime
Joshi explains what LangChain's higher-level agent constructors do internally. A tool-calling agent combines a prompt template with an agent scratchpad, a language model configured with the available tools, and an output parser. A ReAct agent uses a ReAct prompt and parses the model's thought, action, action input, and observation sequence. The AgentExecutor runs this process: it calls the agent, executes the selected action, sends the result back, and repeats until the task is finished. For short-term memory, the agent is wrapped in RunnableWithMessageHistory, which persists chat messages in MongoDB under a session ID.
"The AgentExecutor is the runtime for the agent. This is what actually calls the agent, executes the action that the agent is choosing, passes the action outputs back to the agent and repeats any steps as the agent decides what to do next."24:53
Who should watch
You are building a tool-using LLM application and need a clear introduction to when an agent is justified instead of simple prompting or RAG.
You want a hands-on pattern for finding and summarizing research papers with LangChain and MongoDB Atlas.
You have basic to intermediate Python skills and want to understand tool-calling agents, ReAct loops, and short-term chat history.