Skip to 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.

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.

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:

Terminal window
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.

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

Keep this page’s proof of learning as a small evidence card:

Agent Boundary
how this differs from chatbot or fixed workflow
Goal State Action
goal, current state, next action, observation
Architecture Parts
planner, tools, memory, guardrails, evaluator
Failure Check
over-autonomy, vague goal, missing state, or no trace
Next Action
build the smallest traceable single-agent loop

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.

Check reasoning and explanation
  1. A passing answer describes the agent loop: goal, plan, tool call, observation, memory or state update, and stop condition.
  2. The evidence should include a trace that another developer can inspect, not only the final answer.
  3. A good self-check names one safety or reliability control such as tool schemas, permission boundaries, retries, evaluation cases, or a human-review point.