# Backend Options for Each Platform in Agent Reach: Complete Channel & Backend Matrix

> Explore Agent Reach's complete channel & backend matrix. Discover backend options for each platform and how to select or override active backends for your needs.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: architecture
- Published: 2026-07-04

---

**Agent Reach treats every supported internet platform as a channel with an ordered list of backend candidates, probing each during `check()` to select the first healthy option and storing it in `channel.active_backend`, which users can override via configuration.**

Agent Reach is an open-source Python framework (Panniantong/Agent-Reach) that abstracts content retrieval across social media, developer platforms, and generic web sources. Each platform implementation declares specific **backend options**—concrete tools or APIs that fulfill read and search functionality.

## How Channel Backend Selection Works

In [`agent_reach/channels/base.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/base.py), the abstract `Channel` class defines the `backends` attribute as an ordered list of candidate strings. The `check()` method iterates through `ordered_backends()`, probing each candidate until one reports status `ok` or `warn`. The winning backend is cached in `channel.active_backend` and used for subsequent operations.

If no candidate is healthy, the channel reports `off` (backend not installed) or `error` (installed but broken). Users can force a specific backend by setting a configuration key matching the pattern `<channel>_backend` (e.g., `twitter_backend=twitter-cli`) via `agent_reach.config.Config`.

## Platform-by-Platform Backend Reference

The following matrix details the fallback hierarchy for every supported platform, extracted directly from the source code in `agent_reach/channels/`.

### Social Media Platforms

**YouTube**
- **Primary:** `yt-dlp` (requires JavaScript runtime)
- **Source:** [`agent_reach/channels/youtube.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/youtube.py)

**Twitter / X**
- **Ordered candidates:** `twitter-cli` → `OpenCLI` → `bird CLI` (legacy)
- **Source:** [`agent_reach/channels/twitter.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/twitter.py)

**Reddit**
- **Ordered candidates:** `OpenCLI` → `rdt-cli`
- **Source:** [`agent_reach/channels/reddit.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/reddit.py)

**Instagram**
- **Primary:** `OpenCLI` (inherits from `OpenCLISiteChannel`)
- **Source:** [`agent_reach/channels/instagram.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/instagram.py) → [`agent_reach/channels/_opencli_site.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/_opencli_site.py)

**Facebook**
- **Primary:** `OpenCLI` (inherits from `OpenCLISiteChannel`)
- **Source:** [`agent_reach/channels/facebook.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/facebook.py) → [`agent_reach/channels/_opencli_site.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/_opencli_site.py)

### Chinese Social Platforms

**Bilibili**
- **Ordered candidates:** `bili-cli` → `OpenCLI` → **B站搜索 API** (fallback)
- **Source:** [`agent_reach/channels/bilibili.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/bilibili.py)

**XiaoHongShu (Little Red Book)**
- **Ordered candidates:** `OpenCLI` → `xiaohongshu-mcp` → `xhs-cli` (legacy)
- **Source:** [`agent_reach/channels/xiaohongshu.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/xiaohongshu.py)

**Xueqiu (Snowball)**
- **Primary:** `Xueqiu API` (requires login cookie)
- **Source:** [`agent_reach/channels/xueqiu.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/xueqiu.py)

### Professional & Developer Platforms

**LinkedIn**
- **Ordered candidates:** `linkedin-scraper-mcp` → **Jina Reader** (fallback)
- **Source:** [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py)

**GitHub**
- **Primary:** `gh CLI`
- **Source:** [`agent_reach/channels/github.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/github.py)

### Generic Web & Search

**RSS**
- **Primary:** `feedparser`
- **Source:** [`agent_reach/channels/rss.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/rss.py)

**Web (Generic)**
- **Primary:** `Jina Reader`
- **Source:** [`agent_reach/channels/web.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/web.py)

**Exa Search**
- **Primary:** `Exa via mcporter`
- **Source:** [`agent_reach/channels/exa_search.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/exa_search.py)

## The OpenCLI Shared Backend

Many channels rely on `OpenCLI` as either a primary or fallback option. The probing logic lives in [`agent_reach/backends/opencli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/backends/opencli.py) and performs three validation steps via `opencli_status()`:

1. Verifies the `opencli` npm package is installed
2. Checks for the Chrome extension presence via disk search
3. Confirms the daemon is running and the extension is connected

Channels like Twitter, Reddit, Bilibili, XiaoHongShu, Instagram, and Facebook all include `OpenCLI` in their backend chains, making it a critical dependency for cross-platform functionality.

## Checking and Configuring Backends

### Listing Active Backends via CLI

Use the built-in doctor command to probe all channels and display their currently selected backends:

```bash
python -m agent_reach.cli doctor

```

Sample output shows the hierarchy resolution:

```

YouTube → yt-dlp (ok)
Twitter → twitter-cli (warn)  # installed but not authenticated

Reddit → OpenCLI (ok)
Bilibili → bili-cli (ok)
XiaoHongShu → OpenCLI (ok)

```

### Programmatic Backend Inspection

Query a channel's active backend after running `check()`:

```python
from agent_reach.channels import YouTubeChannel, TwitterChannel

yt = YouTubeChannel()
yt.check()                       # probes yt-dlp

print("YouTube backend:", yt.active_backend)   # → yt-dlp

tw = TwitterChannel()
tw.check()
print("Twitter backend:", tw.active_backend)   # e.g. twitter-cli or OpenCLI

```

### Forcing a Specific Backend

Override automatic selection via the configuration API:

```python
from agent_reach.config import Config
from agent_reach.channels import TwitterChannel

cfg = Config()
cfg.set("twitter_backend", "OpenCLI")   # written to ~/.agent-reach/config.yaml

tw = TwitterChannel()
tw.check(cfg)                           # OpenCLI is tried first

print(tw.active_backend)               # → OpenCLI (if healthy)

```

### Using Channel Methods

Once a backend is selected, invoke platform-specific features like transcription:

```python
from agent_reach.channels import YouTubeChannel

yt = YouTubeChannel()
yt.check()
transcript = yt.transcribe(
    "https://www.youtube.com/watch?v=abc123",
    provider="groq_whisper",
)
print(transcript)

```

## Key Source Files

| File | Role |
|------|------|
| [`agent_reach/channels/base.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/base.py) | Abstract `Channel` class defining `backends`, `ordered_backends()`, and `check()` contract |
| [`agent_reach/channels/youtube.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/youtube.py) | YouTube channel with `yt-dlp` probing and transcription |
| [`agent_reach/channels/twitter.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/twitter.py) | Twitter/X channel probing `twitter-cli`, `OpenCLI`, and legacy `bird` CLI |
| [`agent_reach/channels/reddit.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/reddit.py) | Reddit channel with `OpenCLI` and `rdt-cli` support |
| [`agent_reach/channels/bilibili.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/bilibili.py) | Bilibili channel with `bili-cli`, `OpenCLI`, and search API fallback |
| [`agent_reach/channels/xiaohongshu.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/xiaohongshu.py) | XiaoHongShu channel with `OpenCLI`, `xiaohongshu-mcp`, and `xhs-cli` |
| [`agent_reach/channels/xueqiu.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/xueqiu.py) | Xueqiu channel requiring API cookie authentication |
| [`agent_reach/channels/_opencli_site.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/_opencli_site.py) | Base class for OpenCLI-driven sites (Instagram, Facebook) |
| [`agent_reach/backends/opencli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/backends/opencli.py) | OpenCLI probing logic (daemon status, extension presence) |
| [`agent_reach/channels/linkedin.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/linkedin.py) | LinkedIn with `linkedin-scraper-mcp` and `Jina Reader` fallback |
| [`agent_reach/channels/github.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/github.py) | GitHub channel using `gh CLI` |
| [`agent_reach/channels/rss.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/rss.py) | RSS feed parsing via `feedparser` |
| [`agent_reach/channels/web.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/web.py) | Generic web fetching via `Jina Reader` |
| [`agent_reach/channels/exa_search.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/exa_search.py) | Exa Search integration via `mcporter` |

## Summary

- **Agent Reach** implements each platform as a channel with an ordered list of backend candidates defined in the `backends` attribute.
- The `check()` method in [`agent_reach/channels/base.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/base.py) probes candidates sequentially, selecting the first healthy backend and caching it in `active_backend`.
- **OpenCLI** serves as a shared fallback for Twitter, Reddit, Bilibili, Instagram, Facebook, and XiaoHongShu, with probing logic centralized in [`agent_reach/backends/opencli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/backends/opencli.py).
- Users can force specific backends using the `<channel>_backend` configuration key (e.g., `twitter_backend=twitter-cli`).
- Platform-specific implementations range from single-backend channels like YouTube (`yt-dlp`) and GitHub (`gh CLI`) to multi-tier fallback systems like LinkedIn (`linkedin-scraper-mcp` → `Jina Reader`).

## Frequently Asked Questions

### How does Agent Reach decide which backend to use for a platform?

When `check()` is called on a channel, it iterates through the `ordered_backends()` list and probes each candidate. The first backend returning status `ok` or `warn` is stored in `channel.active_backend` and used for subsequent operations. This selection persists until `check()` is run again or a configuration override is applied.

### Can I force Agent Reach to use a specific backend instead of auto-selecting?

Yes. Set a configuration key matching the pattern `<channel>_backend` to the desired backend name. For example, set `twitter_backend` to `"OpenCLI"` in `~/.agent-reach/config.yaml` or via `Config.set()`, and that backend will be tried first during the next `check()` call.

### Why does OpenCLI appear as a backend option for so many different platforms?

OpenCLI is a cross-platform abstraction layer that provides unified access to multiple social media sites through a browser extension and daemon architecture. Channels like Twitter, Reddit, Instagram, and Facebook include it in their backend chains because it offers a generic fallback when platform-specific CLIs (like `twitter-cli` or `rdt-cli`) are not installed or authenticated.

### What happens if none of the backend options for a channel are available?

If all backends report `off` (not installed) or `error` (installed but non-functional), the channel remains inactive. Operations requiring that platform will fail gracefully, and the `doctor` CLI command will display the error status. You must install one of the supported backends (e.g., `yt-dlp` for YouTube or `gh` for GitHub) or fix authentication issues to activate the channel.