Inkhmer LogoInKhmerBuilding the digital future
  • About
  • Projects
  • Blog
  • Tools
  • Learn
  • Contact
KMខ្មែរENEnglish

InKhmer.com — a personal Khmer Digital Hub curated by our team. Tools, Cambodia resources, Khmer culture, and digital projects. Practical, approachable, and built for everyone.

Social

FacebookTelegram

Quick Links

  • About
  • Projects
  • Blog
  • Tools
  • Learn
  • Contact

Explore

  • What We Build
  • How We Build
  • Roadmap
  • Experiments
  • Sitemap

Subscribe to our newsletter

Get the latest updates about Cambodia, new tools, and exclusive content delivered to your inbox.

  • Terms of Service
  • Privacy Policy
  • Cookie Policy

© 2026 InKhmer. All rights reserved.

LearnBuilding AI Agents and Automations for CambodiaThe anatomy of an agent: goal, tools and the loop

The anatomy of an agent: goal, tools and the loop

An agent has three parts you must design clearly:

  • The goal: what it should do, written in plain sentences. A good goal is specific and bounded: "answer price and stock questions using only the product list" beats "help customers".
  • Tools: the functions it may call — look up the catalog, compute, send a message. Each tool has a name, description and parameters. The model decides which to call; you decide which to offer.
  • The loop: the model writes → calls a tool → gets a result → decides to continue or answer. The loop stops itself, or at a bound (e.g. a max step count).

Guardrails bound what the agent may not do: no sending money, no deleting data, no answering legal questions. They sit beside the goal and in code, not just in promises.

Play with the widget below: change which tools are offered and watch how the agent solves the same question differently.

What to remember:

  • Agent = goal + tools + loop
  • Tools are permissions — offer only what is needed
  • Guardrails live in code, not in promises

Sign in to start tracking from this lesson