How AI agents are created: what they are, types, Claude agents, coding agents, and costs

What AI agents are and how they are built, whether they are LLMs or tools, types of agents, whether they work, building with Claude, coding agents and spending.

On the mic
On the mic

Key takeaways

  • An AI agent is a system that uses a model to decide steps, call tools and act towards a goal in a loop.
  • Agents are built from a model, tools, instructions, memory and a control loop with limits and checks.
  • Agents use LLMs but are not the same thing; the LLM is the reasoning engine inside a larger system.
  • Agents work well on narrow, verifiable tasks with good tools and human oversight; they still fail on long, vague ones.
  • Agents spend money through model tokens and tool or payment actions, so set budgets, permissions and approvals.

AI agents are created by giving a language model a goal, a set of tools it can call, instructions and memory, and wrapping it in a loop where it decides the next step, acts, observes the result and continues until the task is done or a limit is reached. They differ from chatbots because they take actions. I build AI systems with tool use and multi-provider fallback, so this page explains agents in detail, how they are built, LLMs and tools, types, whether they work, Claude agents, coding agents and costs.

What are AI agents, explained in detail?

An AI agent is software that perceives its situation, decides what to do and takes actions to achieve a goal, with some autonomy. Modern AI agents use a language model to plan and choose actions such as searching, running code, calling APIs or editing files.

Also asked as: what is ai agents explain in detail

The core loop: receive a goal, think about the next step, call a tool, read the result, update the plan, and repeat. Memory holds conversation history, notes or retrieved knowledge. Guardrails limit which tools it can use, how many steps it takes and which actions need human approval. Examples include research agents that search and summarise, coding agents that fix bugs and run tests, and support agents that look up orders and draft replies.

How are AI agents created?

Choose a capable model, define tools as functions with clear names, descriptions and input schemas, write instructions describing the goal and rules, add memory or retrieval if needed, and run a loop that executes tool calls and feeds results back to the model.

Also asked as: how ai agents are created

Practical steps:

  • Start with one narrow task and a clear definition of done.
  • Give the agent only the tools it needs, with permissions scoped tightly.
  • Log every step for debugging.
  • Set limits on steps, time and cost.
  • Require human approval for irreversible actions.
  • Build an evaluation set of real tasks and measure success rate.

Anthropic's guidance recommends starting with simple workflows and adding autonomy only where it measurably helps.

Are AI agents LLMs?

No. Agents use large language models as their reasoning engine, but an agent is the whole system: the model plus tools, instructions, memory, a control loop and guardrails. The same LLM can power a simple chatbot or a complex agent.

Think of the LLM as the brain and the agent as the brain plus hands and a job description. The LLM decides what to do; the surrounding code executes actions, enforces limits and checks results. That is why two agents using the same model can perform very differently: tool design, prompts, error handling and evaluation make most of the difference.

Are AI agents tools?

Agents use tools and can themselves be offered as tools to other agents or applications. Tools are specific capabilities, such as a search API, a calculator or a database query, that the agent decides when and how to call.

Standards such as the Model Context Protocol let agents connect to many tools and data sources through a common interface, so one agent can use files, calendars, code repositories and business systems. In multi-agent systems, an orchestrating agent may call specialised sub-agents as if they were tools. From a user's perspective, an agent is a tool that can carry out multi-step work, but it needs supervision unlike a deterministic tool.

How many types of agents are there in AI?

Classic AI textbooks, notably Russell and Norvig's, describe five types: simple reflex agents, model-based reflex agents, goal-based agents, utility-based agents and learning agents, in increasing sophistication.

Also asked as: how many types of agents in ai

Simple reflex agents react to current input with rules; model-based agents track the state of the world; goal-based agents plan towards goals; utility-based agents choose actions that maximise a measure of success; learning agents improve from experience. Modern LLM agents are often described differently: single-agent tool users, multi-agent systems with roles, and workflow agents following predefined paths with model decisions at certain steps.

Do AI agents actually work?

Yes, for well-scoped tasks with clear success criteria, good tools and human oversight, such as coding tasks with tests, research summaries with sources, and routine data processing. They still struggle with long, ambiguous tasks, unreliable tools and situations needing judgement.

Coding agents show real progress on benchmarks built from real software issues, and teams use them daily. Failures include getting stuck in loops, misreading tool output, overconfident wrong actions and errors compounding across many steps. The practical approach is to deploy agents where mistakes are cheap and checkable, measure success rates, and keep humans in the loop for consequential decisions.

How do Claude AI agents work?

Claude agents use Claude's tool-use ability: developers describe tools with names and schemas, Claude decides when to call them and with what inputs, the application runs the tool and returns results, and Claude continues until it finishes the task.

Anthropic provides building blocks: tool use in the API, the Claude Agent SDK, which packages the agent loop used by Claude Code, support for the Model Context Protocol to connect external tools, and computer use for operating interfaces. Claude Code is itself an agent that reads codebases, edits files and runs commands with permission checks. Good agent design still matters more than the model alone.

Can I build AI agents with Claude?

Yes. You can build agents with the Claude API's tool use, write your own loop in Python or TypeScript, use the Claude Agent SDK for a ready-made loop with tools and permissions, or use frameworks such as LangGraph with Claude models.

A first project: an agent with two tools, search_docs over your documents and create_ticket in a task tracker, that answers questions and files tickets when it cannot resolve them, with approval before creating each ticket. Log every tool call, cap the number of steps, and test on twenty real requests. Keep API keys in environment variables and scope tool permissions narrowly.

Which AI agents are best for coding?

Popular coding agents include Claude Code, GitHub Copilot's agent features, Cursor's agent mode, OpenAI's Codex, Aider and others. The best one depends on your editor, models, codebase size and how much autonomy you want.

Choose by testing on your own repository: give each agent the same three tasks, such as fixing a bug, adding a feature with tests and refactoring a module, and compare correctness, the quality of diffs and how much supervision they needed. Agents perform best with good tests, clear project instructions and small, well-defined tasks. Review every change before merging, especially security-sensitive code.

How do AI agents spend your money?

Agents spend money in two ways: model usage, where every step consumes tokens billed by providers, and actions, such as calling paid APIs, launching cloud resources or making purchases if given payment access. Long loops and large contexts multiply costs.

Controls to put in place:

  • Set hard budgets on tokens, steps and time per task.
  • Use cheaper models for simple steps and stronger ones only where needed.
  • Never give agents unrestricted payment credentials.
  • Require human approval for purchases, transfers and resource creation.
  • Monitor spending with alerts and logs.

Emerging agent payment systems add spending limits and authorisation, but treat any agent with financial access as a security risk.

Sources

  1. Anthropic, Building effective agentsanthropic.com
  2. Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models (2022)arxiv.org
  3. Russell & Norvig, Artificial Intelligence: A Modern Approachaima.cs.berkeley.edu
  4. Model Context Protocolmodelcontextprotocol.io
  5. SWE-bench, coding agent benchmarkswebench.com
Pranjul Rathour
Pranjul Rathour
GenAI Engineer · India

GenAI engineer and AI product builder with 2+ years shipping production-grade AI systems: RAG pipelines, fine-tuned LLMs, hybrid retrieval and multi-modal apps across vision, speech and OCR, architected end to end from ingestion to deployment. Leads engineering for SCULT INDIA's 14-member team, founded the 500+ member TechVerse Enclave community and has mentored 200+ students. Three hackathon first prizes: Changethon 2025 (IIT Roorkee), Product Genesis at Vividhotsava 2025 (CSJMU) and BYTEBATTLE (MeetKats).

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way. Email pranjulrathour41@gmail.com.

Keep reading

More on Shipping AI apps

All Shipping AI apps guides →
Campus talks · hackathon judging · mentoring

Want this as a live session at your college?

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way.

Pranjul Rathour, GenAI engineer in India