Agentic AI Notebook
Phase 18

Critic Agent

~3 min read

Concept & How It Works

  • Key points are in the visual diagram above.

Why Does It Exist?

Generation without critique leads to confident wrong answers. A critic loop catches errors before users see them and provides training signal for improvement.

Real-World Analogy

A critic is a code reviewer on a PR — they don't write the feature but block merge if tests fail or standards aren't met.
Loading diagram...

Visual Workflows

What is Critic Agent?

Loading diagram...

Example

Scenario

Writer agent drafts blog post → Critic flags unsupported statistic in paragraph 3 → Writer revises with sourced data.

Solution

In Multi-Agent Systems, apply Critic Agent to this scenario: Writer agent drafts blog post → Critic flags unsupported statistic in paragraph 3 → Writer revises with sourced data. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.

Practice Task

Do this before moving to the next module — reading alone is not enough.

Open the Code Walkthrough below and run it locally. Change one parameter related to Critic Agent (e.g. model, temperature, top_k, or tool name), observe the difference in output, and write 2–3 sentences explaining what changed.

Code Walkthrough

Highlighted lines show where Critic Agent happens in the code.

Critic Agent
1class Critique(BaseModel):  # define a data structure or component2    passed: bool3    issues: list[str]4
5critic = Agent(output_type=Critique, instructions="Score draft against rubric. Be strict on facts.")  # key line for Critic Agent6critique = critic.run_sync(f"Task: {task}\nDraft: {draft}").output  # key line for Critic Agent7if not critique.passed:8    draft = writer.run_sync(f"Fix: {critique.issues}").output

Commands to Remember

Commands to Remember

  • pip install langgraph langchain-openai # multi-agent orchestration
  • pip install crewai # role-based multi-agent crews

Common Mistakes

  • Treating Critic Agent as a black box without evaluation
  • Ignoring cost and latency in production
  • Skipping error handling for critic agent

Cheat Sheet

Quick recap — the most important points from this module.

Cheat Sheet

quick ref
  • Critic Agent
  • Rubric
  • Reflexion
  • Critique Loop