{"name":"AgenticSchema: Empowering AI Agents with Structured Web Data","description":"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","url":"https://osrepos.com/repo/searchstefano-agenticschema","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/searchstefano-agenticschema","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/searchstefano-agenticschema.md","json":"https://osrepos.com/repo/searchstefano-agenticschema.json","topics":["ai","ai-agents","json-ld","schema-org","typescript","web development","model context protocol","semantic web"],"keywords":["ai","ai-agents","json-ld","schema-org","typescript","web development","model context protocol","semantic web"],"stars":null,"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.","content":"## Introduction\n\nAgenticSchema 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.\n\n## Why use it and its benefits\n\nThe 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:\n\n*   **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.\n*   **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.\n*   **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.\n*   **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.\n\n## Installation\n\nGetting AgenticSchema up and running is straightforward, whether you're working in a browser environment or with Node.js.\n\n### Browser Quick Start\n\nFor browser-based applications, you need two script tags: one for registration and one for local development transport.\n\nhtml\n<!-- ? registration: read this page's Schema.org markup, publish it as WebMCP tools -->\n<script src=\"https://cdn.jsdelivr.net/npm/@agenticschema/browser@latest\"></script>\n\n<!-- ? transport (development only): bridge those tools to a local MCP relay -->\n<script src=\"https://cdn.jsdelivr.net/npm/@mcp-b/webmcp-local-relay@4/dist/browser/embed.js\"></script>\n\n\nThen, run the local relay and point your MCP client at it:\n\n\n{\n  \"mcpServers\": {\n    \"webmcp-local-relay\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mcp-b/webmcp-local-relay@latest\"]\n    }\n  }\n}\n\n\nRemember, the relay embed (`embed.js`) is for development only and should not be shipped to production.\n\n### Node.js Quick Start\n\nFor server-side use, the Node.js adapter fetches pages itself and speaks full MCP, eliminating the need for a browser or separate transport.\n\nbash\nnpx @agenticschema/server https://en.wikipedia.org/wiki/Backpack\n\n\nYou can also wire it into an MCP client like Claude Desktop:\n\n\n{\n  \"mcpServers\": {\n    \"page\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@agenticschema/server\", \"https://en.wikipedia.org/wiki/Backpack\"]\n    }\n  }\n}\n\n\n## Examples\n\nAgenticSchema can extract powerful tools from pages that already publish structured data.\n\n### Open Food Facts\n\nConsider a product page on Open Food Facts. AgenticSchema can identify and expose a callable `search_web_site` tool:\n\n\nworld.openfoodfacts.org/product/3017620422003\n\n  read    get_web_site\n  read    get_organization\n  read    get_search_action\n  action  search_web_site(search_term_string)\n\n\nThis `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.\n\n### Wikipedia\n\nEven a standard Wikipedia page, without explicit action tools, can yield valuable read tools:\n\n\nen.wikipedia.org/wiki/Backpack\n  read    get_article\n  read    get_article_author\n  read    get_article_publisher\n  read    get_media\n\n\nThese 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.\n\n## Links\n\n*   **GitHub Repository**: <a href=\"https://github.com/searchstefano/agenticschema\" target=\"_blank\">https://github.com/searchstefano/agenticschema</a>\n*   **Live Playground**: <a href=\"https://searchstefano.github.io/agenticschema/\" target=\"_blank\">https://searchstefano.github.io/agenticschema/</a>","metrics":{"detailViews":1,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-08T12:35:27.000Z"}}