-
-
3-step execution trace (Prepare, Reason, Evaluate) passing all 4 local guardrails (Guardrails: PASSED)
-
Pre-flight safety guardrail blocking a prompt injection before calling the LLM (Guardrails: REVIEW)
-
Plausibility guardrail flagging fictional claims as REVIEW while preserving the generated summary
Inspiration
As the web evolves toward an Open Agentic Web, websites need a standard, lightweight way to expose verifiable agent capabilities directly in the browser—without locking users into proprietary backends or exposing their API keys. I built AgentifyPage Agentic Hub to demonstrate how any standard web page can become a trustworthy, discoverable agent node using open web standards and client-side guardrails.
What it does
AgentifyPage Agentic Hub is a browser-native agentic web MVP that turns a static web application into an inspectable, policy-checked summarization and claim-verification agent:
- Public Discovery & Network Definitions: Exposes
/.well-known/agent-manifest.jsonand/networks/summarizer.network.jsonwith explicitinput_schemaandoutput_schemadefinitions. - 100% Client-Side Execution (
runtime.js): Serves a standalone ES module (/runtime.js) that loads the manifest, validates inputs dynamically, routes LLM requests directly from the browser, and evaluates outputs locally. - Privacy-First BYOK Routing: Supports Bring-Your-Own-Key across Google Gemini, Groq, and Mozilla Otari, storing keys strictly in browser
localStorageand sending requests directly to the selected provider—never to a backend server. - 4-Layer Local Guardrails & Execution Trace: Displays a transparent step-by-step trace (
prepare,reason,evaluate) and enforces:- Schema Validation (Zod): Enforces strict JSON output structure.
- Groundedness: Uses token-containment and substring verification to ensure extracted claims are faithful to the source text.
- Safety (Pre-flight & Post-output): Intercepts prompt-injection patterns before calling the LLM and checks outputs for instruction hijacking.
- Plausibility: Flags explicit fictional or implausible claims inside source inputs with a non-blocking
REVIEWwarning while keeping the summary visible.
How I built it
- Frontend & Static Architecture: Built with Next.js (App Router), React, TypeScript, and Tailwind CSS configured for static export (
output: "export") on Vercel. - Standalone Browser Runtime: Bundled
src/lib/runtime/into a self-contained browser ES module (public/runtime.js) using esbuild and Zod. - Multi-Provider LLM Adapter: Implemented client-side adapters for Google Gemini, Groq, and Mozilla Otari's OpenAI-compatible router endpoint.
Challenges I ran into
- Balancing Prompt-Injection Defense with Legitimate Summarization: Early output filters either missed subtle instruction overrides or over-blocked valid text. Splitting defense into a deterministic pre-flight input scan (
evaluateInput) plus post-generation output checks solved instruction hijacking cleanly while preserving normal summarization. - Distinguishing Groundedness from Fiction: Summarizing text that explicitly contains fictional statements (such as a "lunar hotel") is technically faithful to the source text, yet shouldn't be presented as verified real-world fact. Separating
groundednessfrom a non-blockingplausibilitycheck allowed the agent to warn users (REVIEW) without hiding the summary.
Accomplishments that I'm proud of
- Delivering a zero-backend, open-source (MIT) reference implementation that aligns with the Open Agentic Web specification (
/.well-known/agent-manifest.json+ standaloneruntime.js). - Building transparent, deterministic local guardrails and a live
Execution Tracethat make agent decisions auditable directly in the browser.
What I learned
- Designing browser-native agent runtimes requires strict separation between declarative capability schemas, provider routing, and deterministic local verification so users can trust client-side AI workflows.
What's next for AgentifyPage Agentic Hub
- Supporting multi-agent peer discovery and cross-origin agent delegation across multiple
.well-known/agent-manifest.jsonendpoints. - Adding a pluggable
<script>widget so any static website can embed an agentic endpoint with custom domain guardrails.
Built With
- esbuild
- google-gemini
- groq
- mozilla-otari
- next.js
- react
- tailwindcss
- typescript
- vercel
- zod