Do agents remember?

Building Agentic Workflows with LlamaIndex

Laurie Voss

VP Developer Relations, LlamaIndex

Stateless vs. Memory

Agents:

  • Stateless by default
  • Don't retain information between sessions
  • Run independently each time

agent_no_memory.gif

Building Agentic Workflows with LlamaIndex

Memory matters

$$

  • Human memory carries conversations forward

  • Agents need context to be helpful

memory.png

Building Agentic Workflows with LlamaIndex

Introducing context

$$

  • Example: remembering names

  • LlamaIndex uses a Context object

    • Stores information between runs

$$

Context: the agent's notepad or memory bank where it can store information to recall later.

context_memory.png

Building Agentic Workflows with LlamaIndex

From stateless to context-enabled

  • Stateless agent:

    • Forgets everything after response
  • Context-enabled agent:

    • Retains memory across chats
    • Needs to be enabled
  • Carrying information forward is key in workflows

blank_vs_context.png

Building Agentic Workflows with LlamaIndex

Let's practice!

Building Agentic Workflows with LlamaIndex

Preparing Video For Download...