Agentic AI Notebook
Agent Foundations
Phase 4Module 5 of 15

Core Concepts

Shared vocabulary lets you evaluate any framework critically instead of following hype.

Core concepts are chess pieces — once you know how each moves, you can play on any board.

Visual Workflows

Start here — scroll inside each diagram frame to explore, then use + / to zoom up to 200% if needed.

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

Perception-Action Loop

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

The fundamental cycle every agent architecture implements.

Key Takeaways

  • 1.Perception-action: observe think act repeat.
  • 2.Planning: ReAct interleaved or plan-and-execute upfront.
  • 3.Memory: working episodic semantic tiers.
  • 4.Multi-agent: supervisor delegates to workers.
  • 5.HITL: human approval on high-stakes actions.

Real Example

Scenario

EU AI Act research brief: supervisor routes to a web-scraper worker, then a summarizer, then pauses at HITL before publishing to Notion.

What you would do

Perception-action: scraper observes URLs, supervisor decides the next worker. Plan-and-execute: upfront outline (search → summarize → cite → publish). HITL blocks the Notion write until legal reviews. Monitor: routing accuracy and unauthorized publish attempts.

Practice Task

For the EU AI Act brief, label each step as ReAct, plan-and-execute, supervisor routing, or HITL. Write one sentence on why HITL sits where it does.

Code Walkthrough

Highlighted lines show where Core Concepts happens in the code.

Core Concepts
1SYSTEM = "You are a ReAct agent. Reply with Thought, then Action, then wait for Observation."2
3messages = [4    {"role": "system", "content": SYSTEM},5    {"role": "user", "content": "Find 3 official EU AI Act sources and summarize obligations"},6]7
8# One ReAct iteration9thought_action = llm(messages)  # "Thought: search official sources\nAction: web_search({'q': 'EU AI Act official'})"10observation = web_search("EU AI Act site:europa.eu")11messages.append({"role": "assistant", "content": thought_action})12messages.append({"role": "user", "content": f"Observation: {observation}"})

Cheat Sheet

Quick recap

quick ref
  • ReAct = think + act each step
  • Plan-execute = plan upfront
  • Memory tiers serve different horizons
  • Supervisor = router to specialists
  • HITL for destructive actions

Common Mistakes

  • Skipping evaluation for Core Concepts before production
  • No logging or tracing around core concepts steps
  • Ignoring cost and latency implications