Skip to content

docs: add AI agent memory tutorial#7

Open
owainlewis wants to merge 3 commits into
mainfrom
codex/ai-agent-memory-tutorial
Open

docs: add AI agent memory tutorial#7
owainlewis wants to merge 3 commits into
mainfrom
codex/ai-agent-memory-tutorial

Conversation

@owainlewis

@owainlewis owainlewis commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a new public tutorial at tutorials/ai-agent-memory.
  • Writes a recording-ready LESSON.md that explains agent memory as saved context loaded at the right time.
  • Adds a small shared OpenAI agent abstraction in code/agent.py:
agent = Agent(memory=StaticFileMemory())
reply = agent.run("How should I run Python commands here?")
  • Adds a Python memory ladder using the same Agent shape:
    • 01_no_memory.py for current conversation only.
    • 02_static_memory.py for AGENTS.md and MEMORY.md startup memory.
    • 03_session_search.py for SQLite-backed session search.
    • 04_mem0_memory.py for external managed memory with Mem0 Cloud.
  • Adds a code README, .env.example, reset helper, and focused unit tests.

Why

This brings back the AI agent memory tutorial as a clean youtube-tutorials lesson instead of a loose archived draft.

The goal is to give developers a simple mental model and runnable examples they can work through on camera:

load useful context -> call the model -> save what matters

The Agent class keeps the demo easy to explain: the agent owns the OpenAI call and short-term conversation history, while memory implementations own startup(), search(), and save().

The lesson keeps the focus on practical memory choices: static files, current conversation history, session search, app state, and managed memory. It avoids starting with vector databases or framework terminology before the core loop is clear.

Test plan

  • python3 -m unittest discover -s tests
  • python3 -m compileall .
  • Fake-model smoke test for 02_static_memory.py
  • Fake-model smoke test for 03_session_search.py
  • git diff --cached --check
  • git diff --check -- tutorials/ai-agent-memory
  • just check blocked by unrelated untracked tutorials/herdr-agent-workflow/presentation.html in the local working tree.

Risks

  • The Mem0 demo depends on the current Mem0 Cloud Python SDK shape and should be reviewed before recording.
  • The examples are intentionally small teaching samples, not a production memory architecture.
  • The lesson is long enough to support a full video, so it may need editorial tightening before recording.

Related issue

None.

@owainlewis owainlewis marked this pull request as ready for review July 10, 2026 21:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6e693152b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -1,11 +1,11 @@
# Give Your AI Agents a Database (Airtable MCP)
# AI Agent Memory Explained Simply

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore the Airtable MCP tutorial files

This README was renamed from tutorials/mcp-airtable/README.md, and the same commit deletes the remaining tutorials/mcp-airtable lesson/resource files; I checked the target tree and it has no tutorials/mcp-airtable entries at all. Since this change is framed as adding the AI agent memory tutorial, existing Airtable MCP tutorial links and content disappear unintentionally; please add the new tutorial as a copy/scaffold instead of moving the old tutorial out of the repo.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant