Back to guides
1
4 min

What Are AI Agents

Beyond Chat — Agents That Act

From Chatbots to Agents

A chatbot generates text. You type a question, it types an answer. The conversation ends, and nothing in the real world has changed.

An AI agent is fundamentally different. It acts. It reads files, runs commands, calls APIs, moves data, and makes decisions. When an agent finishes a task, the real world is different than it was before.

This distinction matters because actions have consequences. A chatbot that hallucinates produces wrong text. An agent that hallucinates might delete your files.

The Observe-Think-Act Loop

Every agent follows the same core pattern, regardless of framework:

PhaseWhat HappensExample
ObserveAgent perceives its environmentRead a directory listing, check an inbox, receive a notification
ThinkAgent reasons about what to do"These files need organizing by date. The safety rules allow writing to ~/organized/"
ActAgent takes an action via a toolMove files, create folders, log what it did
LoopAgent observes the result and decides next step"3 files moved. 1 file skipped (duplicate). Report back to user."

This loop continues until the task is complete or a safety boundary is hit.

Agent Components

A well-designed agent has four components:

  • Perception — How the agent sees the world (file watchers, API inputs, user messages)
  • Reasoning — The LLM that interprets observations and decides actions (model selection matters)
  • Action — Tools that let the agent interact with systems (file operations, API calls, shell commands)
  • Memory — State that persists across loop iterations (audit logs, conversation history, task context)
  • Your OpenClaw project maps directly to these components:

  • data/ files are what the agent perceives
  • The configured model handles reasoning
  • src/tools/ are the action layer
  • src/audit-log.ts provides memory and accountability
  • The Agent Spectrum

    Not all agents are equally autonomous. Think of a spectrum:

    LevelAutonomyExampleRisk
    ScriptNone — follows exact stepsCron job that backs up filesLow
    AssistedSuggests actions, human approves"I found 3 duplicates. Delete them?"Low
    SupervisedActs within rules, logs everythingOrganizes downloads, respects safety-rules.jsonMedium
    AutonomousMakes decisions independentlyManages your inbox, schedules meetingsHigh

    In this course, you'll build at the supervised level — powerful enough to automate real tasks, safe enough to trust with your files.

    Why Open Source Matters

    With a proprietary agent, you trust the vendor's safety decisions. With OpenClaw, you control:

  • The code — you can read and audit every line
  • The model — you choose local or cloud, balancing cost and privacy
  • The data — nothing leaves your machine unless you allow it
  • The rules — safety boundaries are in your config, not someone else's terms of service
  • Key Takeaways

  • Agents act in the real world — they don't just generate text. This makes safety critical.
  • Every agent follows the observe-think-act loop, regardless of framework.
  • Four components: perception, reasoning, action, memory. Your project maps to all four.
  • Build at the supervised level — autonomous enough to be useful, constrained enough to be safe.
  • Open source means you control the code, the model, the data, and the safety rules.
  • This is chapter 1 of Open Source AI Agents (OpenClaw).

    Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.

    View course details