Skip to main content
The Definitive Mental Model & Architecture Guide

What is an AI Agent?

A chatbot answers questions in a single turn. An AI agent does real-world work in an autonomous loop.

The Agent Equation
Model+Instructions+Memory+Tools=Autonomous Agent
Core PhilosophyPractical
An Agent is a Directory

Markdown for instructions & skills, files for memory, TypeScript/MCP for tools.

Tools are the Bottleneck

An agent without tools is an advisor. An agent with verified tools is an executor.

The Fundamental Difference

Chatbot vs. AI Agent: How They Actually Differ

Standard Chatbot (Single-Turn)

Prompt Ind → Tekst Ud

A user asks a question, the model responds with text generated from static training weights, and the interaction ends.

AI Agent Runtime (Multi-Step)

Mål Ind → Autonom Handlingsløkke

You give the agent a high-level goal. It plans steps, selects tools, queries live databases, parses results, and iterates until done.

The File-System Architecture

An Agent is a Directory

markdown
Agent Project Structure
💡 Click any file above to explore how modern agents maintain memory, instructions, and tools in plain files.
01. Instructions

The agent’s identity, operating constraints, and boundary conditions written in plain Markdown.

# Identity & Mission
You are an autonomous Danish Operations Agent for a Copenhagen logistics hub.

## Rules & Constraints
1. Always validate Danish CVR numbers via the Virk API before creating records.
2. Read MEMORY.md before beginning any multi-step action.
3. If an action involves a bank transfer or MitID signature, pause and request human approval.
4. Keep all invoice summaries denominated in DKK with correct 25% moms.
Web Standards & In-Browser Tools

From Fragile DOM Actuation to WebMCP

When an agent interacts with a web application lacking a backend API, developers have historically relied on browser actuation: streaming DOM snapshots, calculating coordinate clicks, and guessing form fields via heuristics. It is slow, token-intensive, and breaks with any UI redesign. WebMCP (a proposed W3C standard spearheaded by Chrome) inverts this model: the web page explicitly declares structured tools directly to the browser agent runtime.

Server & Desktopstdio / HTTP

Server MCP (Anthropic)

Connects AI agents (Claude Desktop, Cursor, local runtimes) to databases, local filesystems, and backend APIs via JSON-RPC.

Strength: Direct backend infrastructure access
W3C Standard
In-Browser Client

WebMCP (W3C / Chrome)

Web pages declare typed tools via HTML form attributes or JavaScript (window.modelContext) running directly in the active browser session.

Strength: Zero scraping; runs in user's authenticated session
Headless SimulationPlaywright

DOM Actuation

Headless browsers stream screenshots and simulate mouse clicks and keystrokes on rendered DOM nodes via heuristic CSS selectors.

Limitation: High latency; brittle against CSS changes
WebMCP Implementation Patterns
Chrome 149+ Origin Trial
1. Declarative HTML Form API
<!-- Annotér eksisterende formularer -->
<form action="/cvr/soeg" method="GET"
      toolname="cvr_search"
      tooldescription="Søg i CVR på firmanavn eller CVR-nr">
  <input name="q"
         toolparam="cvr_query"
         toolparamdescription="8-cifret CVR eller firmanavn"
         required />
  <button type="submit">Søg</button>
</form>

Zero JavaScript overhead. The browser automatically registers the form as a typed agent tool.

2. Imperative JavaScript API
// Registrér direkte i browserens runtime
if (window.modelContext) {
  window.modelContext.registerTool({
    name: 'dawa_lookup',
    description: 'Slå officiel dansk adresse op via DAWA',
    inputSchema: {
      type: 'object',
      properties: { adresse: { type: 'string' } },
      required: ['adresse']
    },
    execute: async ({ adresse }) => {
      const res = await fetch('/api/dawa?q=' + encodeURIComponent(adresse))
      return res.json()
    }
  })
}

Executes client-side logic with strict JSON Schema validation under browser Origin Isolation.

Why WebMCP Matters for MitID & Danish Portals

Headless automation bots cannot store or bypass MitID credentials. With WebMCP, the human logs in normally within their own browser. The agent then operates safely inside that active, origin-isolated session using the site's explicitly declared tools—pausing for explicit user confirmation before executing any irreversible transaction.

Common Questions

Frequently Asked Questions

What is an AI agent in simple terms?

An AI agent is a software program that pairs a reasoning model (an LLM like Claude, GPT, or Gemini) with persistent instructions, memory files, and external tools (APIs, databases, and MCP servers). Unlike a chatbot that only talks back and forth, an agent takes a goal, formulates a plan, runs external tools in the real world, inspects the results, updates its memory, and repeats the loop until the job is completed.

What is the difference between a chatbot, an LLM, and an AI agent?

An LLM is the statistical engine predicting words. A chatbot is a conversational interface wrapped around an LLM (Text In → Text Out). An AI agent is a full runtime architecture: the LLM is given tools to act on the external world, files to remember state across sessions, and an autonomous execution loop to complete multi-step tasks without human intervention at every single step.

Why is an agent described as "a directory with a loop"?

In modern software architecture, an agent project is structured as a directory: instructions.md sets the identity and rules, skills/ contains on-demand playbooks, MEMORY.md logs persistent state, and tools/ defines executable functions or MCP connections. The runtime simply runs a continuous loop over this directory.

How do AI agents persist memory across sessions?

LLM context windows are finite and reset between sessions. Modern agents solve this by reading and writing to plain text or markdown files (like MEMORY.md or session logs) stored in the local file system or database. The agent reads this file when starting a task and appends key state changes before shutting down.

What is the Model Context Protocol (MCP)?

The Model Context Protocol (MCP) is an open standard developed by Anthropic that allows AI agents and clients (like Claude Desktop, Cursor, or custom frameworks) to securely discover and execute external tools, databases, and APIs over a standardized JSON-RPC interface.

What is WebMCP and how does it differ from Server MCP?

Anthropic's Model Context Protocol (MCP) connects reasoning models to backend infrastructure (databases, local files, internal APIs) via JSON-RPC over stdio or HTTP. WebMCP is an emerging browser standard (incubated at W3C / Chrome Origin Trial) that lets client-side web pages register structured tools directly with in-browser AI agents using declarative HTML form attributes or imperative JavaScript (window.modelContext). Instead of scraping DOM elements and guessing mouse clicks, the agent invokes typed tools directly inside the active web page under browser origin isolation.

Can an AI agent automate MitID-protected systems in Denmark?

Direct unattended login via MitID is blocked by Danish national cybersecurity design. In production agent architectures, sensitive identity operations (such as signing contracts or approving bank payouts) use a Human-in-the-Loop (HITL) pattern: the agent prepares the payload, calls a verified API (like Penneo or MitID Erhverv IdM), and pauses its execution until a verified human approves the prompt on their MitID device.

Why does AgentAccess catalog Danish machine interfaces?

Foundation models are global, but APIs, laws, and public registries are local. AgentAccess provides a curated directory of verified Danish REST APIs, MCP servers, CLIs, and public data endpoints so developers can immediately give their agents the tools they need to operate in Denmark.

Build Your First Danish Agent

Connect Your AI Agent to Danish Systems

AgentAccess is the open index of machine interfaces, REST endpoints, and MCP servers across Danish government, banking, logistics, and business platforms.