Skip to content

Feature: automatic HTML to markdown conversion for agents #35

@davidstackio

Description

@davidstackio

Context

Agents use a lot of tokens when reading raw HTML instead of md.

Cloudflare recently introduced a paid feature to automatically convert html to md when the Accept: text/markdown header is present.

Feature Request

It'd be awesome if a similar conversion functionality was built into nuxt-llms natively, if the Accept: text/markdown header was present.

I see that nuxt-llms already has a /raw/**.md path, so maybe a simple redirect to that path when the header is present could work?

Even if this only works with nuxt-content for whatever reason, that'd still be a huge win.

Note: While related to llms.txt, this wouldn't necessarily rely on that file being present, or even read, by an AI agent. The agent would be requesting the normal URL, but instead of HTML returned, it would be md to reduce tokens.

References

https://blog.cloudflare.com/markdown-for-agents/

EDIT: After reareading the relevant nuxt-content docs, I'm wondering if this request actually belongs in the nuxt-content scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions