agent-reach-internet-access

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Reach — Internet Access for AI Agents

Agent Reach — 为AI Agent提供互联网访问能力

Skill by ara.so — AI Agent Skills collection.
Agent Reach is a scaffolding tool that gives AI agents the ability to read and search across Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu, and more — all without paid APIs. It orchestrates best-in-class upstream tools (yt-dlp, twitter-cli, rdt-cli, gh CLI, etc.) and provides a unified interface for AI agents.
ara.so开发的Skill — AI Agent技能集合。
Agent Reach是一款脚手架工具,能让AI Agent具备读取和搜索Twitter、Reddit、YouTube、GitHub、B站、小红书等平台内容的能力——全程无需付费API。它整合了各类顶尖上游工具(yt-dlp、twitter-cli、rdt-cli、gh CLI等),为AI Agent提供统一的操作接口。

Installation

安装

Agent Reach is installed via pip and automatically sets up dependencies:
bash
undefined
Agent Reach可通过pip安装,并自动配置依赖:
bash
undefined

Basic installation

基础安装

pip install agent-reach
pip install agent-reach

The tool will auto-detect and install:

工具将自动检测并安装:

- Node.js (for some MCP servers)

- Node.js(部分MCP服务器所需)

- gh CLI (for GitHub)

- gh CLI(用于GitHub)

- mcporter (for MCP integrations)

- mcporter(用于MCP集成)

- twitter-cli (for Twitter/X)

- twitter-cli(用于Twitter/X)

- rdt-cli (for Reddit)

- rdt-cli(用于Reddit)

- yt-dlp (for YouTube/Bilibili)

- yt-dlp(用于YouTube/B站)


After installation, run diagnostics to check what's working:

```bash
agent-reach doctor
This shows status for each channel: ✅ (works out of box), 🔧 (needs config), or ❌ (not available).

安装完成后,运行诊断命令检查功能可用性:

```bash
agent-reach doctor
该命令会显示各平台的状态:✅(开箱即用)、🔧(需配置)或❌(不可用)。

Core Capabilities

核心功能

1. Web Page Reading (Jina Reader)

1. 网页读取(Jina Reader)

Read any web page as clean markdown:
bash
undefined
将任意网页转换为简洁的markdown格式:
bash
undefined

Read a web page

读取网页

Get JSON format

获取JSON格式结果

curl https://r.jina.ai/https://example.com
-H "Accept: application/json"
curl https://r.jina.ai/https://example.com
-H "Accept: application/json"

With images

包含图片摘要

curl https://r.jina.ai/https://example.com
-H "X-With-Images-Summary: true"

**Python usage:**

```python
import requests

url = "https://example.com"
response = requests.get(f"https://r.jina.ai/{url}")
markdown_content = response.text
curl https://r.jina.ai/https://example.com
-H "X-With-Images-Summary: true"

**Python使用示例:**

```python
import requests

url = "https://example.com"
response = requests.get(f"https://r.jina.ai/{url}")
markdown_content = response.text

With options

带参数配置

headers = { "X-With-Links-Summary": "true", "X-With-Images-Summary": "true" } response = requests.get(f"https://r.jina.ai/{url}", headers=headers)
undefined
headers = { "X-With-Links-Summary": "true", "X-With-Images-Summary": "true" } response = requests.get(f"https://r.jina.ai/{url}", headers=headers)
undefined

2. YouTube & Video (yt-dlp)

2. YouTube与视频平台(yt-dlp)

Extract subtitles, metadata, and search videos:
bash
undefined
提取字幕、元数据并搜索视频:
bash
undefined

Get video metadata + subtitles

获取视频元数据+字幕

yt-dlp --dump-json --write-auto-subs --skip-download
"https://www.youtube.com/watch?v=VIDEO_ID"
yt-dlp --dump-json --write-auto-subs --skip-download
"https://www.youtube.com/watch?v=VIDEO_ID"

Search YouTube

搜索YouTube视频

yt-dlp "ytsearch5:AI agents tutorial" --dump-json
yt-dlp "ytsearch5:AI agents tutorial" --dump-json

Get specific subtitle language

获取指定语言字幕

yt-dlp --write-subs --sub-lang en --skip-download URL
yt-dlp --write-subs --sub-lang en --skip-download URL

Bilibili videos (works same way)

B站视频(用法相同)

yt-dlp --dump-json "https://www.bilibili.com/video/BV..."

**Python usage:**

```python
import subprocess
import json

def get_video_info(url):
    result = subprocess.run(
        ["yt-dlp", "--dump-json", "--write-auto-subs", 
         "--skip-download", url],
        capture_output=True, text=True
    )
    return json.loads(result.stdout)
yt-dlp --dump-json "https://www.bilibili.com/video/BV..."

**Python使用示例:**

```python
import subprocess
import json

def get_video_info(url):
    result = subprocess.run(
        ["yt-dlp", "--dump-json", "--write-auto-subs", 
         "--skip-download", url],
        capture_output=True, text=True
    )
    return json.loads(result.stdout)

Search videos

搜索视频

def search_youtube(query, max_results=5): result = subprocess.run( ["yt-dlp", f"ytsearch{max_results}:{query}", "--dump-json"], capture_output=True, text=True ) return [json.loads(line) for line in result.stdout.strip().split('\n')]
undefined
def search_youtube(query, max_results=5): result = subprocess.run( ["yt-dlp", f"ytsearch{max_results}:{query}", "--dump-json"], capture_output=True, text=True ) return [json.loads(line) for line in result.stdout.strip().split('\n')]
undefined

3. Twitter/X (twitter-cli)

3. Twitter/X(twitter-cli)

Requires Cookie authentication. Export cookies using Cookie-Editor Chrome extension.
bash
undefined
需要Cookie认证。使用Chrome扩展Cookie-Editor导出Cookie。
bash
undefined

Configure (paste exported cookies when prompted)

配置(提示时粘贴导出的Cookie)

twitter configure
twitter configure

Read a tweet

读取单条推文

Search tweets

搜索推文

twitter search "AI agents" --limit 20
twitter search "AI agents" --limit 20

Get user timeline

获取用户时间线

twitter timeline @username --limit 50
twitter timeline @username --limit 50

Get tweet thread

获取推文线程


**Configuration file location:** `~/.twitter-cli/config.json`

**配置文件位置:** `~/.twitter-cli/config.json`

4. Reddit (rdt-cli)

4. Reddit(rdt-cli)

Requires Cookie authentication:
bash
undefined
需要Cookie认证:
bash
undefined

Login with cookies

使用Cookie登录

rdt login
rdt login

Search posts

搜索帖子

rdt search "machine learning" --limit 20
rdt search "machine learning" --limit 20

Read post with comments

读取帖子及评论

Get subreddit posts

获取子版块帖子

rdt subreddit r/python --limit 30
undefined
rdt subreddit r/python --limit 30
undefined

5. GitHub (gh CLI)

5. GitHub(gh CLI)

bash
undefined
bash
undefined

Login (opens browser OAuth flow)

登录(打开浏览器OAuth流程)

gh auth login
gh auth login

View repository

查看仓库信息

gh repo view owner/repo
gh repo view owner/repo

Search repositories

搜索仓库

gh search repos "LLM framework" --limit 20
gh search repos "LLM framework" --limit 20

Search issues

搜索Issue

gh search issues "bug" --repo owner/repo
gh search issues "bug" --repo owner/repo

View issue

查看Issue详情

gh issue view 123 --repo owner/repo
gh issue view 123 --repo owner/repo

Create issue

创建Issue

gh issue create --repo owner/repo
--title "Bug report" --body "Description"

**Python usage:**

```python
import subprocess
import json

def search_repos(query, limit=20):
    result = subprocess.run(
        ["gh", "search", "repos", query, 
         "--limit", str(limit), "--json", "name,description,url"],
        capture_output=True, text=True
    )
    return json.loads(result.stdout)

def get_repo_info(owner_repo):
    result = subprocess.run(
        ["gh", "repo", "view", owner_repo, "--json", 
         "description,stargazerCount,forkCount,url"],
        capture_output=True, text=True
    )
    return json.loads(result.stdout)
gh issue create --repo owner/repo
--title "Bug report" --body "Description"

**Python使用示例:**

```python
import subprocess
import json

def search_repos(query, limit=20):
    result = subprocess.run(
        ["gh", "search", "repos", query, 
         "--limit", str(limit), "--json", "name,description,url"],
        capture_output=True, text=True
    )
    return json.loads(result.stdout)

def get_repo_info(owner_repo):
    result = subprocess.run(
        ["gh", "repo", "view", owner_repo, "--json", 
         "description,stargazerCount,forkCount,url"],
        capture_output=True, text=True
    )
    return json.loads(result.stdout)

6. XiaoHongShu (xhs-cli via mcporter)

6. 小红书(通过mcporter调用xhs-cli)

Requires Cookie authentication:
bash
undefined
需要Cookie认证:
bash
undefined

Configure (sets up MCP server)

配置(启动MCP服务器)

mcporter add xiaohongshu
mcporter add xiaohongshu

The MCP server provides these tools:

MCP服务器提供以下工具:

- search_notes: Search XHS posts

- search_notes: 搜索小红书笔记

- get_note_detail: Get post content

- get_note_detail: 获取笔记详情

- post_note: Create new post

- post_note: 发布新笔记

- comment_note: Add comment

- comment_note: 添加评论

- like_note: Like a post

- like_note: 点赞笔记


Configuration stored in: `~/.mcporter/xiaohongshu/config.json`

配置文件存储于:`~/.mcporter/xiaohongshu/config.json`

7. Bilibili Enhanced (bili-cli)

7. B站增强功能(bili-cli)

bash
undefined
bash
undefined

Get hot videos

获取热门视频

bili hot --limit 20
bili hot --limit 20

Search videos

搜索视频

bili search "Python tutorial" --limit 30
bili search "Python tutorial" --limit 30

Get video info

获取视频信息

bili video BV1xx411c7mD
bili video BV1xx411c7mD

Get user dynamics

获取用户动态

bili user-dynamic 123456
undefined
bili user-dynamic 123456
undefined

8. Internet Search (Exa via mcporter)

8. 互联网搜索(通过mcporter调用Exa)

Semantic search across the web:
bash
undefined
基于语义的全网搜索:
bash
undefined

Add Exa MCP server (no API key needed for basic use)

添加Exa MCP服务器(基础功能无需API密钥)

mcporter add exa
mcporter add exa

The MCP server provides:

MCP服务器提供:

- search: AI-powered semantic search

- search: AI驱动的语义搜索

- find_similar: Find similar pages

- find_similar: 查找相似页面

- get_contents: Extract page contents

- get_contents: 提取页面内容


**For advanced features, set API key:**

```bash
export EXA_API_KEY=your_key_here

**高级功能需设置API密钥:**

```bash
export EXA_API_KEY=your_key_here

9. RSS Feeds

9. RSS订阅

python
import feedparser
python
import feedparser

Parse RSS feed

解析RSS订阅源

feed = feedparser.parse("https://example.com/feed.xml")
for entry in feed.entries: print(f"Title: {entry.title}") print(f"Link: {entry.link}") print(f"Published: {entry.published}") print(f"Summary: {entry.summary}") print("---")
undefined
feed = feedparser.parse("https://example.com/feed.xml")
for entry in feed.entries: print(f"标题: {entry.title}") print(f"链接: {entry.link}") print(f"发布时间: {entry.published}") print(f"摘要: {entry.summary}") print("---")
undefined

10. WeChat Official Accounts

10. 微信公众号

Search and read WeChat articles via Exa + Camoufox:
python
undefined
通过Exa + Camoufox搜索并读取微信文章:
python
undefined

Use Exa search to find WeChat articles

使用Exa搜索查找微信文章

Articles are auto-extracted when URLs contain mp.weixin.qq.com

当URL包含mp.weixin.qq.com时,文章内容会自动提取

undefined
undefined

11. Weibo (微博)

11. 微博

bash
undefined
bash
undefined

Search content

搜索内容

agent-reach weibo search "AI" --type content
agent-reach weibo search "AI" --type content

Get hot search

获取热搜

agent-reach weibo hot
agent-reach weibo hot

Get user posts

获取用户微博

agent-reach weibo user USER_ID
agent-reach weibo user USER_ID

Get comments

获取评论

agent-reach weibo comments POST_ID
undefined
agent-reach weibo comments POST_ID
undefined

12. V2EX

12. V2EX

bash
undefined
bash
undefined

Get hot topics

获取热门主题

agent-reach v2ex hot
agent-reach v2ex hot

Get node topics

获取节点主题

agent-reach v2ex node python
agent-reach v2ex node python

Get topic details

获取主题详情

agent-reach v2ex topic 123456
undefined
agent-reach v2ex topic 123456
undefined

Configuration Patterns

配置模式

Cookie-Based Services

基于Cookie的服务

For Twitter, Reddit, XiaoHongShu — use Cookie-Editor:
  1. Login to the service in browser
  2. Install Cookie-Editor
  3. Click extension → Export → Copy
  4. Paste into CLI config command
Never commit cookies to version control. They're stored in:
  • Twitter:
    ~/.twitter-cli/config.json
  • Reddit:
    ~/.rdt-cli/cookies.json
  • XHS:
    ~/.mcporter/xiaohongshu/config.json
对于Twitter、Reddit、小红书——使用Cookie-Editor:
  1. 在浏览器中登录对应服务
  2. 安装Cookie-Editor
  3. 点击扩展→导出→复制
  4. 将复制内容粘贴到CLI配置命令中
切勿将Cookie提交到版本控制系统。Cookie存储于:
  • Twitter:
    ~/.twitter-cli/config.json
  • Reddit:
    ~/.rdt-cli/cookies.json
  • 小红书:
    ~/.mcporter/xiaohongshu/config.json

Proxy Configuration (Server Deployments)

代理配置(服务器部署)

For Bilibili access from servers:
bash
undefined
服务器环境下访问B站需配置代理:
bash
undefined

Set proxy environment variables

设置代理环境变量

export HTTP_PROXY=http://proxy-server:port export HTTPS_PROXY=http://proxy-server:port
export HTTP_PROXY=http://proxy-server:port export HTTPS_PROXY=http://proxy-server:port

Or configure per-tool

或针对单个工具配置

yt-dlp --proxy http://proxy-server:port URL
undefined
yt-dlp --proxy http://proxy-server:port URL
undefined

GitHub Authentication

GitHub认证

bash
undefined
bash
undefined

OAuth login (recommended)

OAuth登录(推荐)

gh auth login
gh auth login

Or use token

或使用Token

export GITHUB_TOKEN=ghp_your_token_here gh auth login --with-token <<< $GITHUB_TOKEN
undefined
export GITHUB_TOKEN=ghp_your_token_here gh auth login --with-token <<< $GITHUB_TOKEN
undefined

Common Workflows

常见工作流

Scrape Twitter Thread for Research

爬取Twitter线程用于研究

python
import subprocess
import json

def get_twitter_thread(url):
    result = subprocess.run(
        ["twitter", "thread", url],
        capture_output=True, text=True
    )
    return result.stdout

thread_content = get_twitter_thread(
    "https://twitter.com/user/status/123456789"
)
python
import subprocess
import json

def get_twitter_thread(url):
    result = subprocess.run(
        ["twitter", "thread", url],
        capture_output=True, text=True
    )
    return result.stdout

thread_content = get_twitter_thread(
    "https://twitter.com/user/status/123456789"
)

Extract YouTube Video Summary

提取YouTube视频摘要

python
import subprocess
import json

def get_video_transcript(url):
    # Get metadata + subtitles
    result = subprocess.run(
        ["yt-dlp", "--dump-json", "--write-auto-subs", 
         "--skip-download", url],
        capture_output=True, text=True
    )
    data = json.loads(result.stdout)
    
    # Subtitles are in data['subtitles'] or data['automatic_captions']
    return {
        'title': data.get('title'),
        'description': data.get('description'),
        'duration': data.get('duration'),
        'subtitles': data.get('automatic_captions', {})
    }
python
import subprocess
import json

def get_video_transcript(url):
    # 获取元数据+字幕
    result = subprocess.run(
        ["yt-dlp", "--dump-json", "--write-auto-subs", 
         "--skip-download", url],
        capture_output=True, text=True
    )
    data = json.loads(result.stdout)
    
    # 字幕存储于data['subtitles']或data['automatic_captions']
    return {
        'title': data.get('title'),
        'description': data.get('description'),
        'duration': data.get('duration'),
        'subtitles': data.get('automatic_captions', {})
    }

Search GitHub for Solutions

搜索GitHub解决方案

python
import subprocess
import json

def search_github_issues(query, repo=None):
    cmd = ["gh", "search", "issues", query, 
           "--limit", "20", "--json", 
           "title,url,state,body,comments"]
    if repo:
        cmd.extend(["--repo", repo])
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    return json.loads(result.stdout)
python
import subprocess
import json

def search_github_issues(query, repo=None):
    cmd = ["gh", "search", "issues", query, 
           "--limit", "20", "--json", 
           "title,url,state,body,comments"]
    if repo:
        cmd.extend(["--repo", repo])
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    return json.loads(result.stdout)

Search across all repos

搜索所有仓库

issues = search_github_issues("memory leak in agents")
issues = search_github_issues("memory leak in agents")

Search specific repo

搜索指定仓库

issues = search_github_issues("bug", repo="openai/gpt-4")
undefined
issues = search_github_issues("bug", repo="openai/gpt-4")
undefined

Monitor Reddit for Mentions

监控Reddit中的品牌提及

bash
undefined
bash
undefined

Search and save results

搜索并保存结果

rdt search "your_product_name" --limit 50 > mentions.txt
rdt search "your_product_name" --limit 50 > mentions.txt

Get specific subreddit

获取指定子版块内容

rdt subreddit r/artificial --limit 100
undefined
rdt subreddit r/artificial --limit 100
undefined

Read Web Page Content for Analysis

读取网页内容用于分析

python
import requests

def get_clean_content(url):
    response = requests.get(
        f"https://r.jina.ai/{url}",
        headers={
            "X-With-Links-Summary": "true",
            "X-No-Cache": "true"
        }
    )
    return response.text

content = get_clean_content("https://news.ycombinator.com")
python
import requests

def get_clean_content(url):
    response = requests.get(
        f"https://r.jina.ai/{url}",
        headers={
            "X-With-Links-Summary": "true",
            "X-No-Cache": "true"
        }
    )
    return response.text

content = get_clean_content("https://news.ycombinator.com")

Troubleshooting

故障排查

Doctor Command Shows ❌

Doctor命令显示❌

Run diagnostics:
bash
agent-reach doctor
Each ❌ includes a fix suggestion. Common issues:
Twitter/Reddit not working:
  • Need Cookie authentication
  • Use Cookie-Editor to export cookies
  • Run
    twitter configure
    or
    rdt login
Bilibili 403 on server:
  • Need proxy for non-CN IPs
  • Set
    HTTP_PROXY
    and
    HTTPS_PROXY
    env vars
GitHub rate limited:
  • Authenticate:
    gh auth login
  • Authenticated rate: 5,000/hour vs 60/hour
yt-dlp fails:
  • Update to latest:
    pip install -U yt-dlp
  • Tool is actively maintained, updates frequently
运行诊断命令:
bash
agent-reach doctor
每个❌都会附带修复建议。常见问题:
Twitter/Reddit无法使用:
  • 需要Cookie认证
  • 使用Cookie-Editor导出Cookie
  • 运行
    twitter configure
    rdt login
服务器环境下B站返回403:
  • 非国内IP需配置代理
  • 设置
    HTTP_PROXY
    HTTPS_PROXY
    环境变量
GitHub请求受限:
  • 进行认证:
    gh auth login
  • 认证后请求限制为5000次/小时,未认证为60次/小时
yt-dlp执行失败:
  • 更新至最新版本:
    pip install -U yt-dlp
  • 该工具持续维护,更新频繁

MCP Server Connection Issues

MCP服务器连接问题

bash
undefined
bash
undefined

Check mcporter status

检查mcporter状态

mcporter list
mcporter list

Restart a server

重启服务器

mcporter restart xiaohongshu
mcporter restart xiaohongshu

View server logs

查看服务器日志

mcporter logs exa
undefined
mcporter logs exa
undefined

Proxy Not Working

代理无法工作

bash
undefined
bash
undefined

Test proxy connection

测试代理连接

Set for specific command

为单个命令设置代理

export HTTPS_PROXY=http://proxy:port yt-dlp URL
undefined
export HTTPS_PROXY=http://proxy:port yt-dlp URL
undefined

Cookie Expired

Cookie过期

Re-export fresh cookies:
  1. Login to service in browser
  2. Export with Cookie-Editor
  3. Reconfigure CLI tool
重新导出新鲜Cookie:
  1. 在浏览器中登录对应服务
  2. 使用Cookie-Editor导出
  3. 重新配置CLI工具

Environment Variables

环境变量

bash
undefined
bash
undefined

Proxy (for server deployments)

代理(服务器部署)

export HTTP_PROXY=http://proxy:port export HTTPS_PROXY=http://proxy:port
export HTTP_PROXY=http://proxy:port export HTTPS_PROXY=http://proxy:port

GitHub

GitHub

export GITHUB_TOKEN=ghp_xxxxx
export GITHUB_TOKEN=ghp_xxxxx

Exa (optional, for advanced features)

Exa(可选,用于高级功能)

export EXA_API_KEY=your_key_here
export EXA_API_KEY=your_key_here

Custom config paths (optional)

自定义配置路径(可选)

export AGENT_REACH_CONFIG_DIR=~/.config/agent-reach
undefined
export AGENT_REACH_CONFIG_DIR=~/.config/agent-reach
undefined

Safety & Privacy

安全与隐私

  • All cookies stored locally in
    ~/.twitter-cli/
    ,
    ~/.rdt-cli/
    , etc.
  • No data uploaded to Agent Reach servers (there are none)
  • Code is open source — audit anytime
  • Use
    --safe
    mode during install to review system package installs
  • 所有Cookie均本地存储
    ~/.twitter-cli/
    ~/.rdt-cli/
    等目录
  • 无数据上传至Agent Reach服务器(不存在此类服务器)
  • 代码开源——可随时审计
  • 安装时使用
    --safe
    模式可查看系统包安装详情

Updating

更新

bash
undefined
bash
undefined

Update agent-reach

更新agent-reach

pip install -U agent-reach
pip install -U agent-reach

Update individual tools

更新单个工具

pip install -U yt-dlp gh extension upgrade --all npm update -g mcporter

Check for breaking changes: https://github.com/Panniantong/agent-reach/blob/main/CHANGELOG.md
pip install -U yt-dlp gh extension upgrade --all npm update -g mcporter

查看重大变更:https://github.com/Panniantong/agent-reach/blob/main/CHANGELOG.md

Platform Support Matrix

平台支持矩阵

PlatformOut of BoxAfter ConfigNotes
WebJina Reader, no limits
YouTubeyt-dlp, 1800+ sites
RSSfeedparser
GitHub🔧 Auth for privategh CLI
Twitter🔧 Cookie🔧 Cookietwitter-cli
Reddit🔧 Cookie🔧 Cookierdt-cli
Bilibili✅ Local🔧 Proxy (server)yt-dlp
XiaoHongShu🔧 Cookie🔧 Cookiexhs-cli via MCP
Search🔧 MCP🔧 API key (optional)Exa
WeChatVia Exa search
WeiboDirect API
V2EXDirect API
Legend: ✅ Works immediately | 🔧 Needs configuration
平台开箱即用配置后可用说明
网页Jina Reader,无限制
YouTubeyt-dlp,支持1800+站点
RSSfeedparser
GitHub🔧 认证后访问私有仓库gh CLI
Twitter🔧 需Cookie🔧 需Cookietwitter-cli
Reddit🔧 需Cookie🔧 需Cookierdt-cli
B站✅ 本地可用🔧 服务器需代理yt-dlp
小红书🔧 需Cookie🔧 需Cookie通过MCP调用xhs-cli
搜索🔧 需配置MCP🔧 可选API密钥Exa
微信通过Exa搜索
微博直接API
V2EX直接API
图例:✅ 立即可用 | 🔧 需要配置