# How Agent Reach Prioritizes Platforms Using the Channel Tier System

> Agent Reach uses channel tiers to prioritize platforms by setup complexity. Discover how zero-config, free-key, and complex platforms are ordered to guide you to the most usable options.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: deep-dive
- Published: 2026-06-24

---

**Agent Reach assigns every platform channel a tier value (0–2) based on setup complexity, then orders diagnostic reports so zero-config platforms appear first, free-key platforms second, and complex-setup platforms last—guiding users toward the most immediately usable options.**

Agent Reach is an open-source automation framework that abstracts social media and web platforms as modular channels. The **channel tier system** built into the codebase categorizes these platforms by their configuration requirements, ensuring that when users run health checks or select backends, the most accessible platforms surface first.

## How Channel Tiers Classify Platform Complexity

Each channel inherits from `Channel` in [`agent_reach/channels/base.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/base.py) and declares a `tier` class attribute. The channel tier system defines three levels:

- **Tier 0 (Zero-config):** Platforms requiring no API keys or authentication, such as YouTube, RSS, or GitHub. These work immediately after installation.
- **Tier 1 (Free-key/login):** Platforms requiring free API keys, cookies, or basic account credentials, such as Twitter or Reddit.
- **Tier 2 (Complex setup):** Platforms requiring paid subscriptions, OAuth flows, or non-trivial installation, such as LinkedIn or XHS.

For example, `TwitterChannel` in [`agent_reach/channels/twitter.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/twitter.py) sets `tier = 1` to indicate it requires a free key or cookie:

```python

# agent_reach/channels/twitter.py

class TwitterChannel(Channel):
    name = "twitter"
    description = "Twitter / X"
    backends = ["twitter"]
    tier = 1                        # needs a free key / cookie

```

## Prioritization Logic in the Doctor Component

The prioritization executes in [`agent_reach/doctor.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/doctor.py) within the `check_all` and `format_report` functions (lines 62–89). The system collects health status from every channel via `get_all_channels()`, then groups results by tier value:

1. **Tier 0 channels** always appear first under the "✅ 装好即用" (ready-to-use) section.
2. **Tier 1 channels** appear next under "可选渠道（已安装）" only if at least one Tier 1 channel reports an `"ok"` status.
3. **Tier 2 channels** display only when no Tier 1 channels are active, preventing complex options from overwhelming users when simpler alternatives exist.

The relevant grouping logic filters channels by tier value and status:

```python

# agent_reach/doctor.py lines 62–88

tier1 = {k: r for k, r in results.items() if r["tier"] == 1}
tier1_active = {k: r for k, r in tier1.items() if r["status"] == "ok"}
tier2 = {k: r for k, r in results.items() if r["tier"] == 2}
tier2_active = {k: r for k, r in tier2.items() if r["status"] == "ok"}

if tier1_active:               # show Tier 1 first

    ...
elif tier2_active:            # only show Tier 2 if no Tier 1 active

    ...

```

## Practical Code Examples for Tier-Based Selection

### Generating a Tier-Ordered Health Report

```python
from agent_reach.config import Config
from agent_reach.doctor import check_all, format_report

cfg = Config()                      # loads ~/.agent-reach/config.yaml

results = check_all(cfg)            # dict keyed by channel name

print(format_report(results))       # prints a tier-grouped, colour-coded report

```

### Filtering Zero-Config Channels

```python
from agent_reach.doctor import check_all
from agent_reach.config import Config

cfg = Config()
all_results = check_all(cfg)

zero_cfg = {name: info for name, info in all_results.items()
            if info["tier"] == 0 and info["status"] == "ok"}

print("Zero-config channels ready to use:")
for name, info in zero_cfg.items():
    print(f"- {info['name']} ({info['message']})")

```

### Selecting Backends by Tier Priority

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

cfg = Config()
for ch in get_all_channels():
    status, _ = ch.check(cfg)
    if status == "ok":
        print(f"Use {ch.name} via backend {ch.active_backend}")
    else:
        print(f"{ch.name} is unavailable (tier {ch.tier})")

```

## Summary

- The **channel tier system** in Agent Reach assigns values 0–2 to platforms based on setup complexity, with Tier 0 requiring no configuration and Tier 2 requiring complex authentication.
- The [`doctor.py`](https://github.com/Panniantong/Agent-Reach/blob/main/doctor.py) module implements strict prioritization: Tier 0 displays first, Tier 1 appears only if active, and Tier 2 surfaces only when no Tier 1 options are ready.
- Each concrete channel class, such as `TwitterChannel` in [`agent_reach/channels/twitter.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/twitter.py), defines its tier by setting the `tier` class attribute inherited from [`agent_reach/channels/base.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/base.py).
- Users can programmatically filter the results dictionary from `check_all()` by the `"tier"` key to identify the most accessible platforms for immediate use.

## Frequently Asked Questions

### What determines a channel's tier level in Agent Reach?

A channel's tier is determined by its configuration requirements as defined in the class definition. Tier 0 channels require no API keys or authentication, Tier 1 channels require free keys or cookies, and Tier 2 channels require paid subscriptions or complex OAuth flows. This value is stored as the `tier` class attribute in each channel's implementation file.

### How does Agent Reach handle multiple channels with different tiers?

The `check_all` function in [`agent_reach/doctor.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/doctor.py) aggregates health status from all channels, then `format_report` groups them hierarchically. Tier 0 channels always appear first in reports. Tier 1 channels appear next only if they are active, and Tier 2 channels display only when no Tier 1 channels are active, ensuring users see the simplest options first.

### Can I customize which tier levels are displayed in health reports?

While the default `format_report` function follows the built-in prioritization logic, you can programmatically filter the results dictionary returned by `check_all()` to customize display behavior. The dictionary includes a `"tier"` key for each channel result, allowing you to build custom reports that include or exclude specific tier levels based on your requirements.

### Where is the tier attribute defined for new channels?

The `tier` attribute is defined in the concrete channel class that inherits from `Channel` in [`agent_reach/channels/base.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/base.py). When creating a new channel, you must set `tier = 0`, `tier = 1`, or `tier = 2` as a class attribute, similar to how `TwitterChannel` sets `tier = 1` in [`agent_reach/channels/twitter.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/channels/twitter.py).