Skip to main content

Course

Google: Manage Agent Memory and State

Intermediate1 hr 30 min

Build stateful AI agents that maintain context and remember user preferences using session state, memory management, and personalization.

R1 hr 30 min16 Exercises800 XP130Statement of accomplishment

Create Your Free Account

Continue with Google
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Training a Team?

Try for Business

Course Description

You've built basic LLM agents that respond to queries—now let's make them stateful. Use session state to build agents that maintain context, remember user preferences, and provide personalized experiences. Transform agents from stateless responders to intelligent assistants.

Prerequisites

There are no prerequisites for this course

Curriculum

Course outline

1

Session State Fundamentals

Session state is a dictionary where your agent stores data it needs to remember and access programmatically. Unlike conversation history (which only the LLM can read), session state gives you code-level access to exact values.
Start Chapter
2

Dynamic Instructions with State

In Part 1, you learned that session state is a dictionary you can access programmatically. Now you'll learn to inject state values into agent instructions using {var} templating, enabling dynamic agent behavior.
Start Chapter
3

State Namespaces and Persistence

You've learned to use state for programmatic control and data passing. Now you'll master state namespaces—controlling how long state values persist and who can access them.
Start Chapter
4

Reading List

Reading List
Start Chapter
R

Google: Manage Agent Memory and State

Course
Complete

Earn Statement of Accomplishment

Enroll Now

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.