# AgenticSchema: Empowering AI Agents with Structured Web Data

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/searchstefano-agenticschema
Generated for open source discovery and AI-assisted research.

AgenticSchema is an innovative open-source library that transforms existing Schema.org markup, including JSON-LD, Microdata, and RDFa, into callable tools for AI agents. This library operates entirely client-side, requiring no backend infrastructure, and significantly enhances an agent's ability to interact with web content. By leveraging structured data already present on millions of websites, AgenticSchema bridges the gap between web content and AI agent capabilities.

GitHub: https://github.com/searchstefano/agenticschema
OSRepos URL: https://osrepos.com/repo/searchstefano-agenticschema

## Summary

AgenticSchema is an innovative open-source library that transforms existing Schema.org markup, including JSON-LD, Microdata, and RDFa, into callable tools for AI agents. This library operates entirely client-side, requiring no backend infrastructure, and significantly enhances an agent's ability to interact with web content. By leveraging structured data already present on millions of websites, AgenticSchema bridges the gap between web content and AI agent capabilities.

## Topics

- ai
- ai-agents
- json-ld
- schema-org
- typescript
- web development
- model context protocol
- semantic web

## Repository Information

Last analyzed by OSRepos: Tue Sep 08 2026 13:35:27 GMT+0100 (Western European Summer Time)
Detail views: 1
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

AgenticSchema is an innovative open-source library that transforms existing Schema.org markup, including JSON-LD, Microdata, and RDFa, into callable tools for AI agents. Designed to be browser-first with zero backend requirements, it provides robust support for Model Context Protocol (MCP) and WebMCP, enabling AI agents to interact with web content more effectively and efficiently. This library closes the gap between the vast amount of structured data already published on the web and the capabilities of AI agents, which often resort to less efficient scraping methods.

## Why use it and its benefits

The web is rich with structured data, with over ten million domains already declaring how to search them in a machine-readable format, such as `SearchAction`. AgenticSchema leverages this existing infrastructure, allowing AI agents to directly call these actions without any new API development or backend deployment. This approach offers significant advantages:

*   **Efficiency**: By providing agents with structured tools, AgenticSchema drastically reduces the token cost associated with processing raw HTML or even extracted text. Measurements on 177 real pages show that AgenticSchema tool output can be 100 times smaller than raw HTML and nearly twice as efficient as extracted text for many verticals, leading to faster and more cost-effective agent operations.
*   **Accuracy**: Agents can achieve higher accuracy by interacting with explicitly defined tools rather than relying on heuristic parsing. This is particularly evident in complex data structures like recipes, where the library, despite sometimes generating more tokens, provides a complete and structured representation of ingredients and steps. Benchmarking shows a plausible improvement in agent answer quality when using AgenticSchema tools.
*   **Simplicity**: It requires no backend, making it easy to integrate into any website via a simple script tag. The library reads the page's existing markup and registers tools on `document.modelContext`, streamlining the process of making web content agent-ready.
*   **Security**: AgenticSchema includes built-in safeguards against prompt injection and data exfiltration. It ensures that page text does not enter tool names or descriptions, and actions are deliberately restricted to idempotent operations (like `SearchAction`) and same-origin destinations by default, preventing unintended side effects.

## Installation

Getting AgenticSchema up and running is straightforward, whether you're working in a browser environment or with Node.js.

### Browser Quick Start

For browser-based applications, you need two script tags: one for registration and one for local development transport.

html
<!-- ? registration: read this page's Schema.org markup, publish it as WebMCP tools -->
<script src="https://cdn.jsdelivr.net/npm/@agenticschema/browser@latest"></script>

<!-- ? transport (development only): bridge those tools to a local MCP relay -->
<script src="https://cdn.jsdelivr.net/npm/@mcp-b/webmcp-local-relay@4/dist/browser/embed.js"></script>


Then, run the local relay and point your MCP client at it:


{
  "mcpServers": {
    "webmcp-local-relay": {
      "command": "npx",
      "args": ["-y", "@mcp-b/webmcp-local-relay@latest"]
    }
  }
}


Remember, the relay embed (`embed.js`) is for development only and should not be shipped to production.

### Node.js Quick Start

For server-side use, the Node.js adapter fetches pages itself and speaks full MCP, eliminating the need for a browser or separate transport.

bash
npx @agenticschema/server https://en.wikipedia.org/wiki/Backpack


You can also wire it into an MCP client like Claude Desktop:


{
  "mcpServers": {
    "page": {
      "command": "npx",
      "args": ["-y", "@agenticschema/server", "https://en.wikipedia.org/wiki/Backpack"]
    }
  }
}


## Examples

AgenticSchema can extract powerful tools from pages that already publish structured data.

### Open Food Facts

Consider a product page on Open Food Facts. AgenticSchema can identify and expose a callable `search_web_site` tool:


world.openfoodfacts.org/product/3017620422003

  read    get_web_site
  read    get_organization
  read    get_search_action
  action  search_web_site(search_term_string)


This `search_web_site` tool allows an agent to query Open Food Facts directly, using the `SearchAction` and `query-input` parameters already declared on the page.

### Wikipedia

Even a standard Wikipedia page, without explicit action tools, can yield valuable read tools:


en.wikipedia.org/wiki/Backpack
  read    get_article
  read    get_article_author
  read    get_article_publisher
  read    get_media


These read tools provide structured access to the article's content, author, publisher, and associated media, making it easier for agents to understand and utilize the information.

## Links

*   **GitHub Repository**: <a href="https://github.com/searchstefano/agenticschema" target="_blank">https://github.com/searchstefano/agenticschema</a>
*   **Live Playground**: <a href="https://searchstefano.github.io/agenticschema/" target="_blank">https://searchstefano.github.io/agenticschema/</a>