How do AI agents work? Memory, tools and approvals explained

An AI agent is a language model in a loop: it plans, uses tools, checks the result and remembers. Here are the six parts of an agent and how they fit together.

By the KutrimBots teamPublished 7 min read

An AI agent works by running a language model in a loop. It reads the goal, decides the next step, uses a tool (search, email, a CRM, a browser), looks at the result, and repeats until the job is done or it needs you. Around that loop sit five more parts: instructions that define its job, memory that carries context between conversations, triggers that start it without you, approvals that stop it before risky actions, and hand-offs to other agents. Understanding these six parts tells you what an agent can do, and where it can go wrong.

The six parts of an AI agent

PartWhat it doesExample
The modelReads, reasons and writes; decides the next stepClaude, GPT, Gemini or an open model
InstructionsDefine the agent's role, rules and tone"You're our sales agent. Reply within an hour. Never quote discounts."
ToolsLet it act in the worldWeb search, email, CRM, calendar, browser, files
MemoryCarries facts and history between conversations"This client prefers morning calls; budget about ₹2 lakh"
TriggersStart work without you typingA schedule, a new lead, an overdue invoice
ApprovalsPause before risky actions"Send this email to a new contact? Allow / Deny"

Step 1: the model decides what to do next

The model is the reasoning engine. On its own, a language model only predicts text. What makes it an agent is that its text can be a decision: "call the CRM search tool with this name" instead of a sentence for you.

Most agents follow a pattern researchers named ReAct (reason and act): the model writes a short reasoning step, chooses an action, reads what came back, and reasons again. A single task can take 5 to 50 of these steps. Anthropic, which makes Claude, describes an agent as a model that directs its own process and tool use, as opposed to a workflow where a developer fixed the steps in advance.

Different models suit different jobs. Larger models plan better over many steps; smaller ones are faster and cheaper for simple replies. Many platforms, including KutrimBots, let you choose the provider or connect your own.

Step 2: instructions give it a job

Every agent starts each step by reading its instructions, sometimes called a system prompt. Good instructions include:

  • The role: who the agent is and who it works for.
  • The goal: what a finished job looks like.
  • Rules: what it must never do, and what needs approval.
  • Style: language, tone and length.

This is why "hiring" an agent for one role works better than one agent for everything: narrow instructions produce more reliable behaviour. In KutrimBots you write these in plain language when you create an agent, as shown in how to set up your first AI team.

Step 3: tools let it act

Tools are functions the agent can call: "search the web", "send an email", "move this lead to Qualified". Each tool has a name, a description and the inputs it needs, and the model picks one the way you'd pick an app on your phone.

  • Built-in tools come with the platform. KutrimBots agents have tools for CRM & Leads, Email Inbox, Bookings, Invoices, File Manager and the other plugins.
  • App connections reach outside software. KutrimBots connects to 500+ apps such as Gmail, Google Sheets, HubSpot and Slack through OAuth, so the agent never sees your app passwords.
  • MCP (Model Context Protocol) is an open standard Anthropic introduced in November 2024 for plugging tools into any agent. A service that offers an MCP server can be used by any agent that speaks MCP.
  • A browser lets an agent use websites that have no API, such as signing up for a site and reading the verification email.

The quality of an agent depends heavily on its tools. An agent without a calendar tool can only suggest a meeting time; with one, it can book it.

Step 4: memory carries context between conversations

A model's working memory is its context window: everything it can read in one go. That window is large but temporary; when a conversation ends, the model forgets. Agents add memory on top:

  • Conversation history: the recent messages in this chat.
  • Long-term memory: facts the agent saved earlier ("the client prefers morning calls"), found again by searching when relevant.
  • Records in tools: the CRM, inbox and files are memory too. A lead's timeline tells the next follow-up what already happened.
  • Shared team memory: facts every agent can use. In KutrimBots this is Super Brain: one agent learns your prices or a client's preference, and the others can find it.

Memory needs care. KutrimBots records who wrote each note, treats notes from other agents as information rather than instructions, and leaves out anything that looks like a password or an attempt to inject instructions.

Step 5: triggers start work without you

A chatbot waits for you to type. An agent can also start on its own:

  • Messages: you, a teammate or a website visitor writes to it.
  • Schedules (routines): "Every weekday at 9 AM, send me a brief of overdue follow-ups."
  • Events (automations): a new lead, a form answer, a booking, an overdue invoice or a new email in Gmail.
  • Reminders it set itself: "Follow up with this lead in two days."

This is what makes an agent "always-on". Read what an always-on AI agent is for what that looks like over a working day.

Step 6: approvals keep you in charge

Because an agent can act, it needs rules about which actions need a person. A practical rule set:

  1. Reading and research run on their own. Searching, reading email, checking the CRM.
  2. Anything that leaves the business waits for you. Sending, posting, paying, deleting.
  3. Secrets stay out of the agent's view. Passwords and keys sit in a vault and are filled in at the moment of use.
  4. Unanswered approvals expire instead of running later by surprise.

In KutrimBots, a pending action appears as a card in the chat and in "Needs you", with an optional phone notification. You choose Allow or Deny, and for some actions "Always" for that contact or tool.

How do AI agents work together?

When there are several agents, each has its own role, instructions, tools and memory, and they pass work between them. In KutrimBots this happens in channels, like a team chat: a research agent finds ten leads and @mentions the sales agent, which qualifies them and books calls. Splitting work this way keeps each agent's instructions short and makes it clear who owns what. Our comparison of always-on AI agents shows which products support several agents today.

A worked example

Example scenario: a coaching institute's sales agent gets a new enquiry through the website chat.

  1. Trigger: a visitor asks about weekend batches and fees.
  2. Instructions: the agent's role says to answer enquiries, capture leads and never promise discounts.
  3. Memory: Super Brain holds this term's fee list and batch timings, so the answer is accurate.
  4. Tools: the agent answers, then creates a lead in CRM & Leads with the course, budget and timeline, and sets a follow-up for tomorrow.
  5. Approval: the visitor shares an email address; the agent drafts a brochure email, which waits for approval because the contact is new.
  6. Next day: the follow-up reminder wakes the agent, which reads the lead's timeline and writes a follow-up that refers to the earlier chat.

Each step is logged, so you can see what happened and why.

Frequently asked questions

How do AI agents make decisions?

The language model reads its instructions, the goal, its memory and the latest tool result, then writes its next step: either an action to take or an answer. It repeats this loop until the task is done or it needs your approval.

Do AI agents learn over time?

They don't retrain their model, but they remember. Agents save facts, preferences and outcomes to memory and records, and use them next time, so they get more useful as they work for you.

How do AI agents share memory?

Through a shared memory store that every agent can search. In KutrimBots, Super Brain holds team knowledge, and each note records which agent wrote it.

Can an AI agent use any app?

Only apps it has tools for: built-in tools, app connections, MCP servers or a browser. KutrimBots agents can use 500+ apps once you connect them.

What stops an AI agent from doing something wrong?

Clear instructions, limited tools, approvals for risky actions, a vault for secrets and a log of every step. Mistakes still happen, so keep approvals on for anything that sends, posts, pays or deletes.

Sources

Keep reading

AI agents 6 min read

AI agents vs chatbots: what's the difference?

A chatbot answers questions; an AI agent completes tasks by using tools, remembering context and acting on its own. Here's the difference, with examples.