UNDERSTANDING AI AGENTS

How does an AI agent work?

An AI agent works through a task step by step. The model proposes the next steps. The application carries out permitted actions and returns the results.

More chapters
An agent works in a loop: the needle shows which part is currently active. The dashed ring stands for the runtime.

What is an AI agent?

An AI agent is software that connects a model in a loop with tools and rules. It works on a task over several steps and bases the next step on the result of the last. The difference shows on the same task:

The boundaries are fluid: many chat products now use tools themselves, and automations can include individual model calls. Anthropic: Building effective agents

ONE TASK, START TO FINISH

Click through a real run.

Your taskFind a slot with Lea this week and send her the invitation.

  1. The task arrives

    The runtime places your task and the applicable rules in context. That is all the model can see so far.

  2. Memory supplies a note

    A stored note matches the task and is retrieved. Only now can the model take it into account.

  3. The model proposes a search

    It executes nothing. It formulates a tool call and returns it.

    Model’s proposalkalender.suchen(person: "Lea", zeitraum: "diese Woche")

  4. The runtime checks, the tool reads

    Reading is permitted for this task. The search runs and the result enters the context. The window fills up.

  5. The model chooses a slot

    Wednesday at 10 is free and fits the note. The model now proposes sending, which would change something.

    Model’s proposaleinladung.senden(an: "Lea", start: "Mi 10:00")

  6. The runtime reaches your limit

    Prepare

    Sending is not permitted at this level. The call is blocked and the agent presents the draft to you.

    Act with approval

    The runtime pauses and asks you. You confirm sending.

    Act independently within the task

    Lea and the time window are within the agreed frame. The call runs without asking.

    Pick another level below and see what changes at this point.

  7. The tool reports an error

    Wednesday at 10 has since been taken. The run has not failed, because the error message becomes the next input.

  8. The model adjusts the plan

    It reads the feedback and selects the next suitable slot. The window is now nearly full.

    Model’s proposaleinladung.senden(an: "Lea", start: "Do 9:30")

  9. The runtime condenses the context

    Older calendar details and the failed attempt are replaced by a short summary. The reference to the source stays.

  10. The call goes through

    Act with approval

    You confirm the changed slot. The tool creates it and returns an appointment ID, which shows it ran.

    Act independently within the task

    Thursday 9:30 is still within the frame. The tool creates the appointment and returns an ID, which shows it ran.

  11. The run ends

    Prepare

    The run ends with a draft for Wednesday at 10. You check it and book it yourself.

    Act with approval or Act independently on your behalf

    The model sums up: the appointment is on Thursday at 9:30, ID T-4711. The loop ends at the goal.

How much may the agent do alone?
Background and sources

The run is an illustrative example showing the principle. Function names and fill levels are schematic, and specific products may differ.

Four building blocks in one frame.

And where are the limits?Made-up statements, injected instructions and excessive permissions: part 5 shows how to protect yourself.

Agents and work environments

  • Desktop workspaces

    Apps can combine several ways of working. For example, the ChatGPT desktop app offers general Work tasks and the Codex section; dots is a persistent agent available within it.

  • General-purpose agents

    You describe a task in natural language. The agent handles it in its work environment, such as conducting research or preparing documents.

  • Coding agents

    They work with source code and development tools. They can investigate errors, change features, run tests, and explain existing projects.

  • Agent platforms

    Here you configure agents and processes yourself. You connect data sources and applications and define triggers and approvals.

  • Self-hosted agents

    You install and operate the assistant in your own environment. You manage model access, permissions, and operations. External model APIs may also be used.

What to check before use

  • Define the result

    Describe what should be available at the end and how you will know the task is complete.

  • Check access options

    Clarify which files, apps, or repositories the agent needs. Grant the required access.

  • Set approvals

    Choose which actions you want to review before execution, such as sending a message.

  • Estimate setup effort

    Check whether an existing agent can handle the task or whether you need to configure a custom process.

  • Set cost limits

    Runs with many model calls can cost more. Check how usage is billed and which limits you can set.

  • Share data sparingly

    Only share what the task needs, and start with test data. Whatever an agent can access can also reach a tool call.

For examples of how missing approvals and unclear access boundaries can affect agent behaviour, explore the documented behaviour patterns in Grenzfälle KI.

How to write a good task

Imagine a new colleague with no background gets the task. Would it be clear enough?

Too open

Make an appointment with Lea.

The agent has to guess: when, how long, in which calendar, and may it simply send the invitation?

Easy to check

Goal
Find a 30-minute slot with Lea this week and send her the invitation.
Context
It is about the project alignment. Lea prefers mornings.
Limits
Only use my work calendar. Show me the invitation before sending.
Done when
The invitation is sent and you give me the appointment ID.

Anthropic: Prompting best practices

TRY IT YOURSELF

Is an agent worth it at all?

Something simpler is often enough. What fits these tasks?

You want to shorten an email.

Chat A single answer is enough. An agent would only add effort.

Every new invoice should always go to the same folder.

Automation The path is always the same and can be described in advance.

You compare providers, and the next research step depends on the last finding.

Agent The steps are not known in advance, and the result can be checked against sources.

The same report is created from the same table every week.

Automation With unchanging steps, a fixed path is usually cheaper and more reliable.

Anthropic: Building effective agents

The key terms

Agent
Software that connects a model in a loop with tools and rules to work on a task over several steps.
Runtime
The software that controls the run: it assembles context, executes permitted calls and enforces rules and stop conditions.
Model
A trained neural network. It processes context and produces answers or proposals for the next step.
Weights
The numbers a neural network calculates with. Training adjusts them, which is how learned patterns emerge.
Inference
Applying a trained model to a current input.
Context
The working material of a model call: task, instructions, parts of the conversation, tool results and selected sources.
Context window
The limit on how many tokens a model call can process. The output needs room in it as well.
Token
A small processing unit, such as part of a word.
Retrieval
Fetching relevant information, for example by keyword or semantic search.
Compaction
Older parts of a conversation are replaced by a shorter version so the run can continue.
Memory
Storage for selected facts and experience that remain beyond a session.
Consolidation
Maintaining durable knowledge: merging, correcting and removing outdated entries.
Archive
The collection of earlier messages. A search index helps find relevant passages again.
Tool
An executable function the agent can call, such as a search or a calendar entry.
Approval
Confirmation by a person before a sensitive action runs.
Hallucination
A plausible-sounding but false statement by a model.
Prompt injection
Instructions in inputs or foreign content that unintentionally change a model’s behaviour.
MCP
The Model Context Protocol: a shared connection standard for AI applications, data sources and tools.

Going further

Three topics beyond the learning path: where features are available, how model access is bundled and what research on agent teams is exploring.

Europe, rollouts and regulation

Availability applies per feature, plan and country. EU, EEA, United Kingdom and Switzerland are considered separately.

A regulatory reason is shown only when a provider or authority explicitly documents the connection. A regional restriction alone does not establish that connection.

The AI Act regulates AI according to use cases and risks. The DMA addresses designated gatekeepers and their core platform services. A separate source is needed to establish whether either explains a missing agent feature.

‘Available’ applies to the scope and countries specified in the profile. ‘With requirements’ may mean your own model access, a particular plan or administrator approval. ‘Partly restricted’ indicates a specific regional exception. ‘Availability still unclear’ means the provider’s country information is insufficient; the profile explains what still needs to be confirmed. Self-hosting and EU data residency are assessed separately from access to external model services.

Model access and API gateways

An API gateway combines access to models from different providers. Your agent or application sends model requests to this shared interface. This can simplify switching models, billing and handling outages.

Agent or application API gateway Model providers

OpenRouter

OpenRouter provides a shared API for many models, routing between providers and fallbacks during outages. Existing OpenAI SDK integrations can be pointed at OpenRouter. An additional Agent SDK supports tool calls, multi-step loops and state management. This section focuses on model access.

OpenRouter: API and getting started · Models and pricing

Straitly

Straitly offers OpenAI-compatible model access with prepaid billing and advertises automatic provider failover. Its documented OpenCode integration shows use with an existing agent. The provider emphasizes lower model prices and individually negotiated rates.

To clarify: the homepage, documentation and terms describe different discount and cashback rules. The privacy policy generally states that request content is not stored, but also lists 30-day conversation state for the Responses API. Confirm pricing and retention for the specific access method.

Straitly: Provider overview · OpenCode integration · Terms of service · Privacy policy

How to compare access options

  • Compatibility: Does your agent support the gateway and required model features, such as tool calls and streaming?
  • Total cost: Consider model prices, credit purchase fees, limits and discount conditions together.
  • Data flow: Which providers receive content, what is retained, and which regions and fallbacks are configured?

Both services are classified here as infrastructure. This overview relies on provider documentation; it is not based on our own performance, cost or reliability tests.

Sources reviewed on

MASS: How agent teams learn from working together

MASS stands for Multi-Agent Self-Supervision. Sakana AI and UC Berkeley researchers investigate how a shared model can improve through the work of multiple agents.

  1. Improve team workflows

    One model performs execution, evaluation and optimization. It searches for better ways to divide and coordinate tasks.

  2. Select results

    The model evaluates completed workflows and selects suitable execution traces as training examples.

  3. Train the shared model

    Post-training transfers the selected experience into the model. The updated model starts the next cycle.

Context and access

MASS is a research implementation with published code. Real experiments require a Python environment, a model server and GPU resources; the full pipeline includes model training. It is particularly relevant to teams researching agent workflows or improving their own models.

What remains uncertain

The study reports improvements on research benchmarks. Results are limited to the tasks and evaluation methods studied. Shared blind spots can reinforce errors during self-evaluation. The repository also describes differences from the published study and experiments that are only partially included.

Sources reviewed on · Sakana: Research overview · Code and documented limitations

Explore agent orchestration tools

Frequently asked questions about AI agents

Which AI agent fits my task?

Start with the desired result: research, office work, automation, or code. Then compare features, available access options, setup, and limitations. The Task filter in the catalog help with initial selection. Test a candidate with a small task of your own.

What is the difference between ChatGPT, dots, and Codex?

The shared profile view distinguishes ChatGPT with Chat and Work, dots for ongoing tasks and Codex for software work. App, CLI, and app server are access points whose requirements are listed in each profile.

How current is the information?

Each profile states the date of the sources reviewed and links to provider sources for features and limitations. Terms and availability may change afterward. The editorial method explains how the information is assessed.

Have these agents been tested first-hand?

This catalog is based on publicly documented provider information. The practical examples show possible tasks and review steps. This version does not include our own product tests or measurable performance assessments.

Start with a small task

Choose a limited task with test data and a visible result. Check how long the entire process takes, including your follow-up work. Expand its use once the process works reliably.

Choose an example prompt

The profiles are based on provider documentation. This version does not include our own comparative tests or measurable performance assessments. Sources and method