Inspiration
As websites begin publishing agent-manifest.json and .network.json files so AI agents can interact with them directly, a new security surface emerges: what happens when a site's agent network contains circular delegation loops, unresolved server-side includes, open peer policies, or hidden prompt-injection / key-exfiltration instructions?
We wanted a zero-trust, browser-first auditor—something like Lighthouse meets a cryptographic code-signer—for the Open Agentic Web, where anyone can inspect an agentic site before letting an autonomous agent touch it.
What it does
Touchstone is an Open Agentic Web Auditor and signed Passport issuer built around MVP Profile 0.2:
- Consent-Gated Browser Auditing (
/audit): Fetchesagent-manifest.jsonand.network.jsononly after explicit per-origin user approval, then inspects manifest structure, network topology, policy limits, and agent instructions. - Deterministic Graph & Security Engine (
@touchstone/core):- Builds the agent delegation graph and checks for missing
front_manentry points, duplicate agent names, and delegation cycles (for any DAG of $N$ nodes, verifying $\text{cycles} = 0$ and $\text{depth} \le N$). - Evaluates
peer_policyandmax_stepslimits. - Scans instructions against 18 heuristic threat signatures and canary-key leak probes.
- Builds the agent delegation graph and checks for missing
- Ed25519-Signed Passports (
/passport): Canonicalizes the audit report, pins the manifest with SHA-256, signs it with Ed25519, and provides a verifier (/api/verify-passport), embeddable badges, JSON export, and print-ready certificates. - Runtime Gauntlet (
/gauntlet): Runs 9 valid and hostile fixtures (good-two-agents,invalid-front-agent, cycles, key-hunter prompts, etc.) to verify runtimes fail closed. - Site-Trained Agentic Assistant (
Touchstone AI): An in-app RAG + MVP Profile 0.2 chatbot with tool-call traces, rule lookup (TS-MAN-001,TS-GRAPH-001, etc.), and one-click navigation/audit actions. - Open Kit & MCP Server (
/open-kit,/api/mcp): Exposes JSON Schemas, REST endpoints, and a JSON-RPC Model Context Protocol (MCP) server.
How we built it
- Monorepo:
pnpmworkspaces with@touchstone/core,@touchstone/gauntlet, and@touchstone/web(React 18, TypeScript, Vite 5). - Serverless Backend & Security: Vercel Node.js functions (
/api/audit,/api/verify-passport,/api/knowledge,/api/corpus,/api/mcp,/api/auth,/api/telemetry) with SSRF protection (blocking private/loopback IP ranges), in-memory rate limiting, strict Content Security Policy (CSP), and HSTS. - Performance & UX: Route-level
React.lazy()code splitting, dark/light themes, keyboard navigation, mobile-first layout, and zero-dependency deterministic scoring that works 100% keyless (with optional BYOK LLM synthesis in/settings). - Testing: Automated unit, property-based DAG, and hostile-fixture tests using Vitest (
10/10in@touchstone/coreand2/2gauntlet suites in@touchstone/gauntlet).
Challenges we ran into
- Strict CSP & Bundle Size: Keeping
script-src 'self'andfont-src 'self'strict meant bundling fonts locally and splitting secondary routes and the chatbot into on-demand Vite chunks so the initial entry bundle stayed small (~54 kB/~17.5 kBgzip). - SSRF & Cross-Origin Safety: Allowing users to audit arbitrary public URLs required strict URL/IP validation on
/api/auditalongside explicit per-origin consent prompts in the browser. - Deterministic vs. Heuristic Separation: Ensuring heuristic prompt-injection checks never silently override deterministic spec compliance without clear labeling and reproducible scoring.
What we learned
- Designing fail-closed agent runtimes requires validating graph topology and policy bounds before any LLM call ever happens.
- Cryptographic canonicalization and Ed25519 signing make audit results portable and verifiable across origins without requiring a centralized trust authority.
What's next for Touchstone
- Expanding the MVP Profile 0.2 threat corpus and adding community-contributed Gauntlet fixtures.
- Supporting automated CI/CD GitHub Actions checks so teams can gate deployments on a passing Touchstone Passport score.
Built With
- ai-agents
- css3
- cybersecurity
- ed25519
- html5
- json-schema
- mcp
- node.js
- pnpm
- react
- rest-api
- typescript
- vercel
- vite
- vitest
