Skip to content

feat: URL imports via into.md - @https://example.com syntax #3

@johnlindquist

Description

@johnlindquist

Summary

Extend the existing file import syntax (@./path.md) to support URL imports that automatically convert web pages to markdown using into.md.

Proposed Syntax

# In your agent file body:
@https://docs.example.com/api-reference

# Or with tilde-style for saved bookmarks:
@~/bookmarks/react-docs.url

How It Would Work

  1. Detect URLs in @ imports (pattern: @https?://...)
  2. Fetch the URL through into.md API to get clean markdown
  3. Inline the result just like local file imports
  4. Support recursive imports if the converted markdown contains more @ references

Use Cases

  • Documentation as Context: @https://react.dev/reference/react/useState to give the agent API docs
  • Research Tasks: Import blog posts, articles, or technical specs directly
  • Dynamic Agents: Agent files that always have fresh documentation context

Implementation Notes

  • Add URL pattern matching in src/imports.ts
  • Create into.md API client (likely just fetch to their endpoint)
  • Consider caching fetched URLs to avoid repeated API calls
  • Error handling for offline/unreachable URLs

Questions for Discussion

  • Should we cache converted pages? If so, for how long?
  • Rate limiting considerations for into.md API?
  • Should this be opt-in via a flag or enabled by default?

Related

This is part of exploring into.md integration opportunities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions