Notes video
Everything About AI Agents
Video from Maryam Sadeghi.
Takeaways
- AI agent elements: LLM, tools, goal, loop, memory.
- Types of memory
- Working memory: the current conversation, like RAM
- Procedural memory: how it should behave. Rules and instructions (skills)
- Semantic memory: stable facts we want the agent to always know
- Episodic memory: a timestamped history of past events and conversations
These memories are stored in a database.
The cost gets high. Distill: summarize and pull out a few important things, then store them in the database.
claude.md
Harness: the reins on the model.
All the fences we put around the model so it behaves the way we want.
Loop
Guardrail: stop
The observe–think–act loop
The loop’s exit condition
Loop engineering
How do we know the agent is working correctly?
LLMOps: evaluating language models
Step one: tracing
Step two: evaluation
Step three: diagnosis
Step four: correction
How you write a prompt for an agent should be different from a chatbot.
For an agent, it is like signing a contract with it.
The more precise and specific the instructions, the further the agent goes without trouble.
Structured prompt:
Goal: the outcome, not the action. What does done look like?
Constraints: everything it is not allowed to do. Your list is accumulated experience. Don’t install packages. Don’t touch anything outside the folder. Don’t publish.
Format: the exact shape of the output. Describable in one sentence.
A single HTML file plus a text file explaining the sections.
Failure: what should it do when it gets stuck? Without that, it burns tokens.
Not enough information? Stop and ask. Two errors? Report them.
Where do we start building an agent?
General-purpose agent: Claude Code, Codex
Workflow: n8n, Make
A personal assistant without coding: Base44
For programmers: LangChain, Pydantic AI
Agent architecture: LLM + tools + memory + goal + the observe–think–act loop
Memory: a simple text file. Write the rules down. The highest-leverage thing you can do today.
Contract template: goal, constraints, format, failure. From an expensive chatbot to something that delivers the work.