Skip to main content

9.1.1 Agent Basics Roadmap: Goal, State, Action

An Agent is not a model name. It is a system pattern that uses a model, tools, state, memory, and feedback to keep working toward a goal.

See the Single-Agent Loop First

Agent basics position bridging diagram

Agent basics chapter learning order diagram

Single-Agent execution loop diagram

A normal chatbot answers once. A workflow follows fixed steps. An Agent can plan, act, observe, update state, and continue when the goal is not done.

Run a Tiny Agent State Loop

This script does not call a model yet. It shows the minimum state you need before an Agent can be debugged.

goal = "summarize RAG citation rules"
state = {"steps": [], "done": False}

for action in ["plan", "search_docs", "summarize"]:
state["steps"].append(action)

state["done"] = True

print("goal:", goal)
print("steps:", " -> ".join(state["steps"]))
print("done:", state["done"])

Expected output:

goal: summarize RAG citation rules
steps: plan -> search_docs -> summarize
done: True

If a demo cannot show goal, state, action, observation, and stop condition, call it an LLM app first, not an Agent.

Learn in This Order

StepReadPractice Output
1What is an AgentCompare chatbot, workflow, RAG app, and Agent
2Development historyUnderstand why LLMs revived Agent systems
3Capability levelsPlace answer, retrieve, tool use, plan, memory, collaboration on one ladder
4System architectureDraw goal, state, planner, tools, memory, observation, executor
5RL to Agent breakthroughsConnect action, reward, feedback, and planning

Pass Check

You pass this chapter when you can draw one single-Agent loop and explain why single-Agent stability comes before multi-Agent collaboration.

The exit mini project is a research assistant Agent trace: one goal, one plan, at least one tool decision, one observation, one stop condition, and one final answer.