How AI Agents Work: Tools, Memory, Reasoning & Actions Explained

AI & Agents
Slate
GUIDE · OCTOBER 2026
One go-to-market (GTM) task, traced turn by turn, showing what the model decides and what the software around it does.
Organisation
Slate
Written By
Theres Sudeep
PUBLISHED
October 27, 2026
Read
3
min

Key Takeaways

  • An AI agent is a language model running in a loop: it reads the task and every result so far, picks the next step, and software around it carries that step out.
  • The model never runs a tool itself. It asks for one by name. Your application or the vendor runs it and sends the result back into the conversation.
  • Memory lives in two places: the current conversation and the notes an agent keeps in files between sessions.
  • Approval is a setting in the software around the model. Anything you can't undo, like sending email or changing CRM records, should wait for a person.
Quick answer

AI agents work by running a language model in a loop. Each turn, the model reads the task and everything that's happened so far. Then it either answers or asks to use a tool.

One Task, Traced Through the Agent Loop

Say you ask an agent to find companies in your ideal customer profile (ICP) that posted a revenue operations (RevOps) job this month, then draft a first note to each. A few minutes later you get a list and a set of drafts.

In between, a language model made a run of small decisions. The software around it carried each one out. The Exchange has covered the definition, and how an agent differs from a chatbot, in detail in What Is an AI Agent?

In the words of Anthropic's engineering team, agents are "typically just LLMs using tools based on environmental feedback in a loop." LLM means large language model, the part that reads and writes text. Here's the RevOps task as that loop.

TurnWhat the model has readWhat it asks forWho runs it
1The task, its instructions, and the list of toolsOpen the saved ICP notesThe harness, against your storage
2The ICP notesSearch job boards for RevOps roles posted in the last 30 daysThe job board's application programming interface (API)
3The postingsLook up each company in the CRMYour CRM
4Which companies are already customers or open dealsSave a draft note for each company leftYour email tool
5Confirmation that the drafts existNothing more, so it answers with the listNo one, so the loop ends

Every row is the same move. The model reads everything so far and asks for a single step. Code outside the model does it and reports back.

AI Agent Reasoning: How the Model Picks the Next Step

On every turn, the model rereads the whole conversation, from the task down to the latest result. Then it writes the next step, either an answer or a request to use a tool.

That's why the plan in the trace bends as results come in. Once the CRM lookup shows some companies are already customers, the next request leaves them out.

The pattern has a research name. A 2022 paper from Princeton and Google, ReAct, had models alternate between a reasoning step and an action. Writing the reasoning out helped the model keep track of its plan, while each action pulled in facts it didn't have.

Because the model reasons only from what's in front of it, a rule you never wrote down gets guessed. You do get a readable trail in return: when an agent goes wrong, the transcript usually shows the turn where it happened.

AI Agent Tools: How an Agent Reaches Your Systems

Each tool has a name and a short description. It also has a schema, which lists the inputs it takes. The model sees those and the result that comes back, and none of the code behind them.

Claude's tool documentation says it directly: "The model never runs anything on its own." The model writes a request, and your code or the vendor's servers carry it out. Here's what the job search tool from turn two could look like.

json
{
  "name": "search_jobs",
  "description": "Search job boards for open roles. Use it for hiring signals. Contact details come from crm_lookup.",
  "input_schema": {
    "type": "object",
    "properties": {
      "title": {"type": "string", "description": "Job title to match, such as RevOps Manager"},
      "posted_within_days": {"type": "integer"}
    },
    "required": ["title"]
  }
}

When the model wants the tool, its response carries a request like this one. The harness then runs the search.

json
{"type": "tool_use", "name": "search_jobs", "input": {"title": "RevOps Manager", "posted_within_days": 30}}

The output goes back as a tool result on the next request. Claude's docs describe the loop the same way. Keep running tools while the model asks for them, and stop when it answers or hits a limit.

Where a tool runs decides who's responsible for it.

Where it runsWho writes itExamples
Your applicationYou write the schema and the codeCRM lookup, internal APIs
Your application, using a schema Anthropic publishesAnthropic writes the schema, and you run itMemory, bash, text editor
Anthropic's serversAnthropicWeb search, web fetch, code execution

You rarely write each tool by hand. The Model Context Protocol (MCP) packages a product's tools so any compatible agent can call them. The Exchange walks through a full setup for an ad account in Claude plus Google Ads MCP.

Tool descriptions do more work than they look like. When Anthropic's team built a coding agent for SWE-bench, a benchmark of software tasks, it spent more time on the tools than on the main prompt. Requiring absolute file paths stopped a whole class of mistakes.

People searching for AI agent tools often mean the platforms that host agents, such as Lindy or Gumloop. The Exchange compares them in detail, by layer and price, in Best AI Workflow Automation Tools.

Memory: What an Agent Keeps Between Steps and Sessions

Inside a run, memory is the conversation itself, since the model rereads every message and tool result each turn. That lasts until the context window fills up, the context window being the most text a model can read at once.

Between runs, memory has to live outside the model. With Claude's memory tool, Claude checks a memory folder before a task. As it works, it writes what it learns to files there and reads them back in later conversations.

That tool runs on your side, like the CRM lookup. Claude asks to view or edit a file, and your application does it in storage you control. So you decide where the ICP notes from turn one live and who can change them.

MemoryWhere it livesHow long it lastsIn the RevOps example
The conversationThe model's context windowOne runThe postings and CRM results from earlier turns
Saved notesFiles or a database the agent reads and writes through a toolUntil someone deletes themThe ICP rules opened on turn one
Saved proceduresSkill files the agent loads when a task matchesUntil someone edits themA house style for first-touch notes

Saved procedures are what Claude skills are: folders of instructions and scripts Claude loads when a task calls for them. The Exchange lists ones built for GTM work in its Claude skills directory.

Long runs outgrow the context window anyway. The memory tool docs pair it with compaction, a feature that summarizes older parts of the conversation. The active context stays small, and the notes that matter survive in files.

Actions: Where a Person Signs Off

Reading a job board changes nothing, while sending an email or updating a deal stage does. Both happen only through a tool the harness runs.

That puts approval in the harness. Anthropic's guidance has agents pause for human feedback at checkpoints or when they hit a blocker. It also recommends stopping conditions, such as a cap on the number of turns.

In the RevOps example, the last tool saves drafts. A person reads them and presses send, so a wrong guess about a company never reaches a buyer's inbox.

ActionWho does it
Searching and looking up recordsThe agent
Writing drafts and reportsThe agent, with a person reviewing
Sending email or posting from your accountsA person, after reading the draft
Changing CRM records or ad spendA person, or the agent behind an approval step

The Exchange covers an outbound version of this loop in detail, from sourcing a list to a written sequence, in AI-Powered BDR Engine: Apollo to Instantly.ai.

AI Agent Architecture, End to End

Put the parts together and the model sits in the middle of a loop it doesn't run.

AI agent architecture: a task enters the harness, the context window feeds the language model, tool requests pass an approval gate to a tool runner that calls tools and the memory store, and a person approves actions that can't be undone.

Every request the model makes goes through the harness. Reads run straight away, and their results go back into the context. Anything you can't undo waits at the gate for a person.

Where AI Agents Break

Most agent failures start in a single part of the loop. Look there first.

FailureWhat you seeWhere to look
A vague tool descriptionThe agent calls the wrong tool, or the right one with bad inputsThe tool's name, description, and examples
A rule no one wrote downThe agent guesses a filter you assumed it knewThe instructions and the memory notes
An early mistake carried forwardOne bad result shapes every turn after itThe transcript, at the first wrong turn
No stopping ruleRuns that keep looping and keep billingA turn cap in the harness
Instructions hidden in fetched textA web page or an email tells the agent to do something you never askedTreat fetched text as data, and hold actions for approval

Anthropic's guidance names the trade-off: more autonomy brings higher costs and errors that build on each other, so test in a sandbox first.

The Exchange has a full workflow for checking what an agent writes before it goes out: Claude Skill for fact-checking.

Sources

Frequently Asked Questions

Is ChatGPT an AI Agent?
What Are the Main Components of an AI Agent?
Do AI Agents Learn From Experience?
How Is an AI Agent Different From a Workflow?
How Many Steps Can an Agent Take?

The plays behind the reading.

We build inbound GTM engines for B2B software teams, and these are the frameworks we build from. Bring us a pipeline target and we'll map the route.