Skip to content

feat: Run agents directly from URLs #5

@johnlindquist

Description

@johnlindquist

Summary

Allow running agent markdown files directly from URLs, converting web-hosted instructions into executable agents via into.md.

Proposed Usage

# Run an agent hosted on a gist
ma https://gist.github.com/user/abc123

# Run an agent from a documentation site
ma https://example.com/agents/code-reviewer.html

# Run from a raw markdown URL (no conversion needed)
ma https://raw.githubusercontent.com/user/repo/main/AGENT.md

How It Would Work

  1. Detect if the file argument is a URL (already partially implemented in src/remote.ts)
  2. If URL ends in .md or is a raw content URL, fetch directly
  3. Otherwise, pipe through into.md to extract markdown from HTML
  4. Parse frontmatter and execute as normal
  5. Clean up temp file after execution

Use Cases

  • Shared Agents: Team shares agent definitions via gists or wikis
  • Agent Marketplace: Community-published agents runnable by URL
  • Documentation-as-Agent: Tutorial pages that are also executable
  • No-Install Distribution: Share an agent without requiring git clone

Security Considerations

  • Warn user when running remote agents (already implemented: printRemoteWarning)
  • Consider --trust-remote flag for CI/automation
  • Sandbox by default? Show frontmatter before execution?

Implementation Notes

  • Extend src/remote.ts to use into.md for HTML pages
  • Detect content type from response headers
  • Cache remote agents locally with TTL?

Questions for Discussion

  • Should we require explicit --remote flag for safety?
  • How to handle authentication for private gists/repos?
  • Should converted HTML agents be cached?

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