Core Agent Concepts: Agent, Environment, Action, Observation, Goal, LLMs, Tools

~12 min read

The 7 foundational terms every agent conversation starts with — what an agent actually is, the world it operates in, and the basic loop of acting and observing.

Think of these 7 terms as the alphabet you need before you can read any sentence about agentic AI — every more advanced concept in this glossary builds on top of them.

An Agent is an autonomous AI entity that perceives, reasons, and acts toward a goal — the umbrella term for everything this curriculum covers. It doesn't operate in a vacuum: it exists within an Environment, the world or system the agent operates in and interacts with. A customer-support agent's environment might be a ticketing system and a knowledge base; a coding agent's environment might be a codebase and a terminal.

The agent's basic loop with its environment has two halves. An Action is a response or task the agent performs based on its reasoning or goals — sending an email, calling an API, writing a line of code. An Observation is the data or input the agent receives FROM its environment at any given moment — an API's response, a file's contents, a user's reply. Act, then observe the result, then act again: this is the core rhythm underneath every agent, no matter how sophisticated its reasoning gets.

What drives that loop forward is the Goal — the desired outcome the agent is designed to achieve. Without a goal, an agent has no way to judge whether an action was useful or a waste of a step.

Two more terms round out this foundational set. LLMs (Large Language Models) are what enable agents to reason and generate natural language in the first place — the 'brain' that decides what action makes sense given the current observation and goal. And Tools are APIs or utilities agents use to extend their functionality and interact with the world beyond just generating text — without tools, an LLM can only talk; tools are what let it actually DO things.

Put together: an Agent (built on an LLM) operates inside an Environment, pursuing a Goal by taking Actions (often via Tools) and processing the resulting Observations — this is the smallest complete mental model of 'what is an agent,' and every other term in this glossary elaborates on some piece of it.

💻 Code example

class Agent:
    """A minimal skeleton showing how the 7 core terms fit
    together: an Agent pursuing a Goal in an Environment via
    the Action -> Observation loop, using an LLM and Tools."""
    def __init__(self, llm, tools: dict, goal: str):
        self.llm = llm            # the reasoning engine
        self.tools = tools        # dict of name -> callable
        self.goal = goal          # the desired outcome

    def step(self, observation: str) -> str:
        """One turn of the Action <-> Observation loop."""
        # The LLM reasons over the current observation + goal
        # to decide the next Action
        decision = self.llm.decide_action(
            goal=self.goal, observation=observation, available_tools=list(self.tools)
        )
        if decision.tool_name in self.tools:
            # Taking an Action via a Tool
            result = self.tools[decision.tool_name](**decision.tool_args)
            return f"Observation: {result}"  # feeds back into the Environment loop
        return decision.final_answer

# The Environment here is implicit: whatever produces the
# observations fed into agent.step(observation)

💬 Deep Dive with AI

Key points

  • Agent: an autonomous AI entity that perceives, reasons, and acts toward a goal
  • Environment: the world or system the agent operates in and interacts with
  • Action / Observation: the two halves of the agent's core loop — acting on the environment, then reading back what changed
  • Goal: the desired outcome that gives the agent's actions a way to be judged as useful or not
  • LLMs and Tools: the reasoning engine and the means of acting on the world beyond just generating text