PTENES
TRAINING 4 · PHASE 3

WebMCP Agent Developer

Build browser agents that discover, select, and execute WebMCP tools with policies, context, and recovery.

Human requestobservable input Page Agentexplicit contract Tool + evidenceverifiable result
4

Agent Developer Chapters

4

Available modules

24

Published topics

1

Lab

SHARED PROGRESS

Your journey continues across repositories

The same identifier as Formation 1 records read items, questions, and notes. On GitHub Pages, the origin is shared; JSON preserves the portable fallback.

0 of 240%

Agent Developer training map

The top navigates by chapter. Within each chapter, modules follow the chapter.module numbering.

CHAPTER 2

Reasoning and policies

Hybrid selection, routing, memory, and action policies.

Next
  1. 2.1Hybrid routing
  2. 2.2Working memory
  3. 2.3Policy engine
  4. 2.4Verifiable plans

CHAPTER 3

Model adapters

Providers, schemas, streaming, and portability.

Next
  1. 3.1Provider adapter
  2. 3.2Portable tool calling
  3. 3.3Execution streaming
  4. 3.4Fallback between models

CHAPTER 4

Agent Developer deliverable

Evals, conversational UX, documentation, and applied project.

Next
  1. 4.1Task dataset
  2. 4.2Agent UX
  3. 4.3Operational handoff
  4. 4.4Agent Developer capstone project

Chapter 1 · available modules

CROSS-CUTTING LAB

Console Page Agent

Paste a catalog in JSON and inspect its contract, schema, risk, and evidence before offering it to the model. The console is local and does not execute real effects.

Detailed content

1.13h

🔎 Tool discovery

Read dynamic catalogs, filter capabilities, and turn WebMCP descriptors into useful context for the model.

0 of 60%
What it is:

Discovery starts with intent, constraints, and current state, not with blindly enumerating every tool.

Why learn:

A normalized goal reduces noise even before capabilities are presented to the model.

Key concepts:

intent · constraints · context · success criterion

What it is:

Name, description, inputSchema, and annotations form the interface the agent can reason about.

Why learn:

Treating the descriptor as data lets you validate, index, compare, and record decisions.

Key concepts:

name · description · inputSchema · annotations

What it is:

Deterministic rules eliminate tools incompatible with the route, authentication, risk, or entity.

Why learn:

The filter reduces tokens and prevents choices we already know are invalid.

Key concepts:

current route · session · risk · precondition

What it is:

The agent needs short descriptions, complete schemas, and consistent examples, without exposing internal implementation details.

Why learn:

A stable representation improves selection and lets you compare models or prompts.

Key concepts:

serialization · context limit · example · redaction

What it is:

Navigation, login, and selection can change the available tools during the same conversation.

Why learn:

The agent must invalidate snapshots and rediscover capabilities when the document signals a change.

Key concepts:

toolchange · snapshot · invalidation · rediscovery

What it is:

Coverage, precision, and the correct tool in the top k show whether the pipeline retrieves good candidates.

Why learn:

Without discovery evals, a poor final answer may be attributed to the wrong component.

Key concepts:

recall · precision · top-k · dataset

View Full
1.23h

▶️ Tool execution

Validate arguments, apply policies, and execute tools with timeouts, cancellation, and structured responses.

0 of 60%
What it is:

The call produced by the model is an untrusted proposal until it passes validation and policy checks.

Why learn:

The boundary prevents probabilistic text from turning directly into an effect.

Key concepts:

tool call · untrusted input · policy gate · execution

What it is:

Even when the provider applies schemas, the runtime validates types, limits, enums, and extra fields.

Why learn:

Defense in depth contains provider discrepancies and calls generated by external code.

Key concepts:

JSON Schema · coercion prohibited · limits · stable error

What it is:

Risk, authentication, scope, and the need for confirmation are decided outside the model.

Why learn:

The LLM can recommend; the application remains responsible for authorization.

Key concepts:

authorization · risk · confirmation · scope

What it is:

Every execution receives an AbortSignal, deadline, and limits suited to the experience.

Why learn:

An abandoned conversation shouldn’t keep the network, UI, or backend working indefinitely.

Key concepts:

AbortSignal · deadline · resource budget · cleanup

What it is:

The runtime converts heterogeneous returns into envelopes with status, data, evidence, and next action.

Why learn:

A common format simplifies the loop without hiding the original error.

Key concepts:

envelope · recoverable error · evidence · next action

What it is:

Each execution links the turn, catalog, proposal, policy decision, duration, and sanitized result.

Why learn:

The trace makes it possible to debug selection, execution, and effects without recording secrets.

Key concepts:

traceId · catalog version · latency · redaction

View Full
1.33h

🛂 Cross-origin and permissions

Model origin, identity, consent, and boundaries between the page, agent, backend, and external services.

0 of 60%
What it is:

The page, agent, user, and backend have different identities and authorities.

Why learn:

Confusing these identities creates excessive delegation and authorization bugs.

Key concepts:

principal · delegation · session · resource

What it is:

Origin combines scheme, host, and port and defines a central boundary of the Web.

Why learn:

A tool registered by a document doesn’t grant unrestricted access to other origins.

Key concepts:

same-origin · scheme · host · port

What it is:

Embedded frames have their own document, origin, and lifecycle.

Why learn:

The agent needs to know which context provides the tool and where its effect will be visible.

Key concepts:

top frame · iframe · sandbox · context id

What it is:

CORS controls reading by browser scripts; the backend still validates identity and permission.

Why learn:

A response allowed by CORS may still be forbidden for that user and operation.

Key concepts:

CORS · credentials · backend auth · CSRF

What it is:

Sensitive actions require clear confirmation that shows the target, effect, and reversibility.

Why learn:

Generic or advance consent doesn’t cover a specific mutation.

Key concepts:

just in time · effect · target · reversibility

What it is:

The suite covers tool spoofing, navigation during execution, a removed frame, and an unexpected origin response.

Why learn:

Boundaries only truly exist when adversarial paths are exercised.

Key concepts:

spoofing · navigation race · frame removal · origin check

View Full
1.43h

💬 Conversational loop

Build the observe, decide, execute, and respond cycle without losing state, control, or transparency.

0 of 60%
What it is:

Each turn brings together the message, page snapshot, catalog, previous executions, and remaining budget.

Why learn:

An explicit state prevents prompts from being assembled through accidental concatenation.

Key concepts:

turn state · page snapshot · history · budget

What it is:

The loop alternates structured observation, model decision, and controlled execution until it reaches a terminal state.

Why learn:

Separating phases makes testing easier and prevents unbounded recursion.

Key concepts:

observe · decide · act · terminal

What it is:

A task may require search, details, and action, with results informing later decisions.

Why learn:

The runtime must preserve dependencies without letting the model invent an intermediate ID.

Key concepts:

dependency · result binding · sequence · parallel safety

What it is:

Ambiguity, high risk, or a material change of plan creates a confirmation checkpoint.

Why learn:

The pause preserves human agency without breaking the continuity of the turn.

Key concepts:

human in the loop · ambiguity · risk · resume token

What it is:

The response distinguishes what was observed, what was executed, and what still depends on the user.

Why learn:

Transparency reduces false claims of success and builds trust.

Key concepts:

grounding · executed effects · pending action · citation

What it is:

The test measures completion, correct tool, steps, safety, recovery, and response quality.

Why learn:

Evaluating only the final text hides unnecessary or dangerous calls.

Key concepts:

task success · tool accuracy · step count · safety

View Full

AGENT DEVELOPER CONTINUITY

Next: reasoning and policies

The training continues in chapters 2, 3, and 4 with routing, model adapters, evals, and delivery of a complete agent.

View Chapter 2 modules