Markdown to agents, HTML to humans

R
Renaudil y a 2 jours
0

Description

Demo project for delivering markdown to agents and HTML to humans.

npx boilerapp markdown-to-agents-html-to-humans

Documentación

Delivering Markdown to Agents, HTML to Humans

This demo project shows how to serve different formats of the same documentation depending on the client. AI agents benefit from receiving lightweight Markdown instead of full HTML, while browsers still get standard HTML for human readers.

By serving Markdown directly, we cut down token usage for AI agents, making it more efficient for them to parse and process documentation.

Demo

Compare

 curl -H "Accept: text/markdown" https://markdown-to-agents.vercel.app/docs/getting-started

and

 curl -H "Accept: text/html" https://markdown-to-agents.vercel.app/docs/getting-started

How it works

The rewrite in next.config.ts directs traffic asking for text/markdown to a route that returns markdown.

const nextConfig: NextConfig = {
  rewrites: async () => {
    return {
      beforeFiles: [
        {
          source: "/docs/:slug\

Prix

Gratuit

FREE

Comentarios (0)

FAQ

Preguntas Frecuentes

¿Tienes una pregunta? Tenemos las respuestas. Si no encuentras lo que buscas, no dudes en contactarnos.

Boilerapp es una plataforma comunitaria dedicada a compartir boilerplates, starter kits y plantillas de proyectos para desarrolladores. Nuestro objetivo es simple: hacerte ahorrar tiempo en la configuración inicial (setup) para que puedas programar lo que realmente importa. Ya busques una base de código simple o un proyecto SaaS completo, lo encontrarás aquí.

¿Tienes otras preguntas?

Nuestro equipo está aquí para ayudarte. Contáctanos y te responderemos lo antes posible.

Markdown to agents, HTML to humans | BoilerApp