First End-to-End Agent Action
This page walks through a complete agent interaction — from user request to executed operation — powered by AXAG semantic contracts.
Scenario
A user asks their AI agent: "Find me blue running shoes under $80."
Step 1: Agent Discovers Available Tools
The agent queries the MCP Tool Registry and finds:
{
"name": "product_search",
"description": "Search the product catalog by text query with optional filters",
"input_schema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"category": { "type": "string" },
"price_min": { "type": "number" },
"price_max": { "type": "number" }
},
"required": ["query"]
},
"metadata": {
"action_type": "read",
"risk_level": "none",
"idempotent": true,
"confirmation_required": false,
"approval_required": false,
"source_intent": "product.search",
"source_entity": "product"
}
}
Step 2: Agent Plans the Invocation
The agent determines:
- Tool:
product_search - Parameters:
query = "blue running shoes",price_max = 80 - Safety: Read-only, no risk, no confirmation needed → proceed directly
Step 3: Agent Validates Parameters
- ✅
queryis present and is a string - ✅
price_maxis a number - ✅ No preconditions to check
- ✅ Safety allows direct execution
Step 4: Agent Executes
The agent invokes product_search with:
{
"query": "blue running shoes",
"price_max": 80
}
Step 5: Agent Returns Results
The operation returns matching products. The agent presents them to the user with relevant details.
How the Tool Reached the Agent
Nothing above was hand-written for the agent. The tool came from the annotation, by one of two routes:
- At build time,
@web-axag/compilerread the annotated search form and emitted the tool alongside the manifest. - In the page,
@web-axag/webmcpregistered it with the browser'sdocument.modelContextwhile the search form was on screen — and unregistered it when the person navigated away.
An agent running in the browser sees it there. An agent outside the browser — a desktop client — reaches the same tool through @web-axag/bridge.
When the agent called product_search, the runtime filled the form with those parameters and pressed Search, exactly as a person would. An app can pass its own handler instead, to call its API directly.
What Made This Possible
Without AXAG, the agent would need to:
- Parse the page DOM to find a search input
- Guess that the input labeled "Search" is for products
- Figure out how to apply price filters (dropdown? slider? text input?)
- Submit the form by simulating a button click
- Wait for dynamic content to load
- Scrape the results from rendered DOM elements
With AXAG, the agent:
- Reads structured tool definitions
- Constructs typed parameters
- Invokes a semantic operation
- Receives structured results
No scraping. No guessing. No brittle selectors.