惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

M
MIT News - Artificial intelligence
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
The Cloudflare Blog
IT之家
IT之家
雷峰网
雷峰网
小众软件
小众软件
博客园 - 叶小钗
博客园 - 聂微东
爱范儿
爱范儿
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
博客园 - 【当耐特】
V
V2EX
博客园_首页
T
Tailwind CSS Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
AMTP: HTTP for the Agentic Web — A New Markdown-First Pro...
sumeet saraf · 2026-05-27 · via DEV Community

sumeet saraf

The web was built for humans. But AI agents are struggling with it.

AMTP agent markdown transfer protocol

Traditional approaches — DOM parsing, headless browsers, or forcing LLMs to read raw HTML — are brittle, expensive, and token-heavy.

Today, I'm open-sourcing AMTP (Agent Markdown Transfer Protocol) — a new protocol designed as HTTP for the Agentic Web.

The Problem

AI agents today face several major challenges when interacting with websites:

  • Extremely high token usage when processing full HTML pages
  • Brittle scraping that breaks with any UI change
  • No native action support — agents must simulate clicks and forms
  • Poor session handling for authenticated actions
  • Lack of real-time updates

We need a better way.

Introducing AMTP

AMTP allows websites to serve clean, semantic Markdown optimized for Large Language Models and autonomous agents, alongside their normal HTML and JSON responses.

It uses content negotiation (Accept: text/amtp) so one backend can serve all three consumers: browsers, APIs, and agents.

Key Features

  • ~90% fewer tokens compared to HTML
  • Native actions, forms, and navigation (hypermedia style)
  • Built-in session & authentication bridging (works with your existing Passport, JWT, etc.)
  • Streaming support for real-time updates
  • Security-first design with scopes and validation
  • Easy integration via Express/Fastify middleware

How It Works

Here's a quick example using the AMTP middleware:

import { amtp } from '@amtp/protocol';
import express from 'express';

const app = express();

app.use(amtp({
  // Define what agents can see and do
  routes: {
    '/dashboard': {
      title: "User Dashboard",
      content: "Welcome back, {{user.name}}",
      actions: [
        {
          name: "view_orders",
          label: "View My Orders",
          href: "/orders",
          method: "GET"
        }
      ]
    }
  }
}));

Enter fullscreen mode Exit fullscreen mode

From the agent side, the response is clean Markdown with embedded action metadata — perfect for LLMs to understand and act upon.

Real-World Use Cases

  • Agent-native SaaS platforms (Let users say “cancel my subscription” to their AI assistant)
  • E-commerce agents that can reliably browse and purchase
  • Personal automation agents that work with your existing logged-in sessions
  • Multi-agent workflows across different websites
  • Efficient crawling and indexing

Comparison

Feature Raw HTML JSON API AMTP
Token Efficiency Poor Good Excellent
Action Support None Manual Native
Session/Auth Bridging Hard Medium Built-in
LLM Readability Poor Medium Excellent
Streaming Difficult Possible Native

Getting Started

npm install @amtp/protocol

Enter fullscreen mode Exit fullscreen mode

Visit the repository for:

  • Full protocol specification
  • Grammar and examples
  • Client SDK
  • Reference implementations

GitHub: https://github.com/sumeetingenuity/amtp

The Vision

AMTP is an early but functional step toward a truly agent-ready web — where any website can become natively compatible with AI agents without sacrificing control or security.

I’d love your feedback, contributions, and real-world use cases.

What’s the biggest pain point you face when building agents that interact with websites?