Agent Reach

repository·main·Indexed 29 days ago

https://github.com/panniantong/agent-reach

A capability layer providing AI Agents with reliable internet access by managing the selection, installation, and routing of backends like CLIs, APIs, and MCP tools. It enables searching and reading content from over 10 platforms including Twitter/X, Reddit, YouTube, Bilibili, and Xiaohongshu.

Tokens
16.6K
Snippets
52
Records
89
Agent score
98%

What's inside agent-reach

  1. Overview of supported platform backends

    main

    Agent Reach routes tasks to various specialized backends. Below is a summary of the current tool selections for common scenarios:

    PlatformToolNote
    Web BrowsingJina ReaderFree, no API key required
    Twitter/Xtwitter-cliUses Cookie authentication
    YouTube/Bilibiliyt-dlpExtracts metadata and subtitles
    Web SearchExa (via mcporter)AI semantic search
    GitHubgh CLIOfficial tool, requires authentication
    RSSfeedparserStandard Python ecosystem tool
    Xiaohongshuxhs-cliSearch, read, and comments
    Douyindouyin-mcp-serverVideo analysis and downloads
    LinkedInlinkedin-mcp-serverBrowser automation via MCP
    Weibomcportere.g., weibo.get_trendings
    Podcasttranscribe.shFor Xiaoyuzhou podcasts
  2. Understand the Agent Reach Skill usage and constraints

    main

    Agent Reach is an internet capability router designed for AI Agents to research, search, and fetch content from 15 platforms.

    When to use:

    • When a user wants to research a topic, perform a deep dive, or search the web.
    • When a user mentions specific platforms: Twitter/X, Reddit, Facebook, Instagram, YouTube, GitHub, Bilibili, XiaoHongShu, Xiaoyuzhou Podcast, LinkedIn, V2EX, Xueqiu, or RSS.

    When NOT to use:

    • For writing reports, analysis, or translation (this skill is for fetching content only).
    • For write operations like posting, commenting, or liking.
    • If the user already has a dedicated skill installed for a specific platform (prefer the dedicated skill).

    Operational Rules:

    • Health-check first: For login-backed platforms (XiaoHongShu, Reddit, Bilibili, Twitter, Facebook, Instagram), always run agent-reach doctor --json to identify the active_backend before attempting commands.
    • Announce usage: Explicitly state which platform and backend you are using (e.g., "using agent-reach, platform X via backend Y").
    • Workspace hygiene: Never create files in the agent workspace. Use /tmp/ for temporary files and ~/.agent-reach/ for persistent data.
  3. Understand Agent Reach backend routing and platform support

    main

    Agent Reach acts as a capability layer that manages the selection, installation, and routing of backends (CLIs, APIs, and MCP tools) for various platforms. It does not wrap the tools; instead, it ensures the most reliable access path is available so your Agent can call the upstream tools directly.

    Each platform (channel) maintains an ordered list of primary and fallback backends. When a backend becomes blocked or deprecated (e.g., yt-dlp being blocked on Bilibili), Agent Reach automatically re-routes to the next available working backend in the list.

    Key Platform Routing Examples:

    • Twitter: twitter-cli $\rightarrow$ OpenCLI $\rightarrow$ bird
    • Bilibili: bili-cli $\rightarrow$ OpenCLI $\rightarrow$ search API (Note: yt-dlp is retired due to 412-blocking)
    • Reddit: OpenCLI $\rightarrow$ rdt-cli (Requires login)
    • XiaoHongShu: OpenCLI $\rightarrow$ xiaohongshu-mcp $\rightarrow$ xhs-cli
    • LinkedIn: linkedin-mcp $\rightarrow$ Jina Reader
    • Web Pages: Jina Reader
    • YouTube: yt-dlp
    • GitHub: gh CLI
    • Web Search: Exa via mcporter
  4. Use Agent Reach for internet research and platform access

    main

    Agent Reach is an internet capability router used when a user wants to research, search, or look up information online. It provides access to 15 platforms through multiple backends (CLIs, APIs, MCP tools).

    When to use

    • Research/Search tasks: e.g., "research this topic", "search for X", "what are people saying about X".
    • Platform-specific access: When a user mentions or shares a URL for Xiaohongshu (XHS), Twitter/X, Bilibili, Reddit, Facebook, Instagram, V2EX, LinkedIn, YouTube, GitHub, Xiaoyuzhou podcasts, Xueqiu, or RSS feeds.

    Constraints

    • Do NOT use for: Content processing (writing reports, data analysis, translation), write operations (posting, commenting, liking), or platforms that already have a dedicated specialized skill.
    • Workspace Rule: Do not create files in the agent workspace. Use /tmp/ for temporary output and ~/.agent-reach/ for persistent data.
  5. Review supported platforms and backends

    main

    Agent Reach provides access to various platforms using specialized backends. Key supported scenarios include:

    • Web Content: Uses Jina Reader for free web page reading without API keys.
    • Twitter/X: Uses twitter-cli (cookie-based) for searching, reading tweets, timelines, and profiles without API costs.
    • Reddit: Uses rdt-cli (cookie-based) for searching and reading full posts and comments.
    • Video & Subtitles: Uses yt-dlp for YouTube, Bilibili, and 1800+ other sites to extract metadata and subtitles.
    • Social Media:
      • XiaoHongShu (XHS): Uses xhs-cli for searching, reading notes, and comments.
      • Douyin: Uses douyin-mcp-server for parsing video info and downloading without watermarks.
      • Weibo: Accessible via mcporter commands.
    • Search: Uses Exa via mcporter for AI semantic search.
    • Other: gh CLI for GitHub, feedparser for RSS, and linkedin-scraper-mcp for LinkedIn automation.
  6. Install Agent Reach as a Skill (Claude Code / OpenClaw)

    main

    For agents that support Skills (like Claude Code or OpenClaw), you can add Agent Reach using npx:

    npx skills add Panniantong/Agent-Reach@agent-reach

    After installation, the agent will automatically detect if the agent-reach CLI is available and install it if necessary. If you previously installed via agent-reach install, the Skill is registered automatically.

  7. Security and Cookie Best Practices

    main

    Agent Reach prioritizes security through local credential storage and transparent architecture:

    • Local Storage: Cookies and tokens are stored locally in ~/.agent-reach/config.yaml with file permissions set to 600 (read/write only by the owner). They are never uploaded to a central server.
    • Safe Installation: The --safe flag allows you to see what needs to be installed without making automatic system changes.
    • Dry Run: The --dry-run flag allows you to preview all installation operations without making any changes.

    ⚠️ Account Safety Warning

    When using platforms that require Cookie-based login (such as Twitter, Xiaohongshu, Reddit, Facebook, or Instagram), there is a risk that the platform may detect non-browser API activity and ban the account.

    Recommendation: Always use a dedicated secondary account (burner account) for Agent Reach rather than your primary personal account to mitigate the risk of account suspension or credential exposure.

  8. Update Agent Reach

    main

    If Agent Reach is already installed, you can update it using a single command provided to your AI Agent.

    Update URL: https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/update.md

    Update Agent Reach: https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/update.md
  9. Install Agent Reach basics

    main

    Install the core Agent Reach infrastructure, which includes tools like gh CLI, Node.js, mcporter, Exa search, and yt-dlp configuration. This enables zero-config channels for Web (Jina Reader), YouTube, GitHub, RSS, Exa Search, V2EX, and basic Bilibili.

    pipx install https://github.com/Panniantong/agent-reach/archive/main.zip
    agent-reach install --env=auto

    Using a Virtual Environment (for Homebrew/PEP 668 environments)

    python3 -m venv ~/.agent-reach-venv
    source ~/.agent-reach-venv/bin/activate
    pip install https://github.com/Panniantong/agent-reach/archive/main.zip
    agent-reach install --env=auto

    Windows (PowerShell)

    If python3 points to the Microsoft Store, use the Python Launcher py -3:

    py -3 -m venv $env:USERPROFILE\.agent-reach-venv
    $env:USERPROFILE\.agent-reach-venv\Scripts\Activate.ps1
    python -m pip install https://github.com/Panniantong/agent-reach/archive/main.zip
    agent-reach install --env=auto
  10. Configure platform-specific access (Twitter, Reddit, etc.)

    main

    Many platforms require additional configuration to unlock full capabilities (like searching or reading private feeds):

    • Cookies: For platforms like Twitter/X, Xueqiu, or Reddit, you can tell your Agent "help me configure [platform] cookies". The Agent will guide you through exporting cookies from your browser. Local computers can auto-import these.
    • Proxies: If your network blocks certain platforms (e.g., Reddit or Twitter), you can provide a proxy address (e.g., from Webshare) to your Agent. The Agent will save it and export HTTP(S)_PROXY when calling the relevant tools.
    • API Keys: Some services, like Web Search via Exa, require a free API key to unlock semantic search capabilities.
  11. Install Agent Reach as a Skill

    main

    For agents that support the 'Skills' pattern (like Claude Code or OpenClaw), you can add Agent Reach as a skill using npx. Once the skill is added, the agent will automatically detect the agent-reach CLI and install it if necessary.

    npx skills add Panniantong/Agent-Reach@agent-reach
  12. Configure Exa Search via MCP

    main

    Exa is an AI semantic search engine that can be integrated via MCP. When configured, it provides free semantic web search, including Reddit (site:reddit.com) and Twitter (site:x.com) searches, without requiring an API key.

    If agent-reach install --env=auto fails to configure Exa automatically due to network issues, you can manually complete the setup by installing mcporter and registering the Exa MCP server.