Planning, Memory and Safety
Making agents dependable.
Agents are powerful, and also easy to get wrong. They can wander off course, forget earlier steps, or take actions you did not intend. In this lesson, you will learn how to make agents dependable, with planning, memory, and guardrails.

- Wandering off course
- Forgetting earlier steps
- Guardrails that keep agents safe
Planning
Good agents plan before acting. They break a big goal into smaller sub goals, and write the plan down. As they work, they tick off steps, and revise the plan, when something unexpected happens. Asking a model, first write a numbered plan, then follow it, step by step, makes its behaviour much easier to follow, and to debug.
Memory
Agents need memory, at two levels. Short term memory is the context window, holding the current task and recent results. Long term memory is stored outside, in a database, or files, so the agent can recall earlier work, and preferences, across sessions. Often, long term memory is simply the retrieval pattern from before, applied to the agent's own notes.
Guardrails for agents
Guardrails keep agents safe. Give the narrowest set of tools, and permissions, that the job needs. Set limits, on steps, time, and spending. Require human approval, before anything irreversible, like paying, deleting, or sending. Log every action, so you can review what happened. And test with harmless pretend data first, before using real accounts.
- Least privilegeonly the tools and access needed
- Hard limitssteps, time and money caps
- Human approvalbefore irreversible actions
- Full loggingreview every step taken
- Safe testingpretend data before real data
Summary
Good work. Dependable agents plan first, use short and long term memory, and live inside guardrails, least privilege, limits, approval, logging, and safe testing. Next, a standard way to connect agents to tools, and how several agents can work together.
Key takeaways- Plan, follow, revise
- Short-term and long-term memory
- Least privilege, limits, approval, logs