Where to Find Channel Files in Agent Reach: Complete Guide to Platform Connectors

All channel files in Agent Reach are located in the agent_reach/channels directory, with each platform implemented as a separate Python file inheriting from the abstract Channel class defined in base.py.

Agent Reach organizes internet platform integrations as modular channels. If you are extending the codebase or debugging a specific platform connector, you need to locate the channel files in Agent Reach to understand how each platform handles URL recognition and content extraction.

Channel Directory Structure

The repository organizes all platform connectors under a single package. Each supported internet platform lives as a standalone Python module within this structure.

  • Base Location: agent_reach/channels/
  • Base Class: base.py contains the abstract Channel class
  • Registry: __init__.py imports all concrete implementations and exposes ALL_CHANNELS
  • Platform Files: One file per platform (e.g., twitter.py, youtube.py)

Complete List of Agent Reach Channel Files

The agent_reach/channels directory contains 15 platform-specific implementations plus the base class and registry. Each file defines a concrete class that inherits from Channel.

Core Channel Architecture

Every channel file inherits from the abstract base class defined in base.py. This ensures consistent behavior across all platform implementations.

The Channel class in agent_reach/channels/base.py defines three critical methods:

  • can_handle(url): Determines if the channel recognizes a specific URL pattern
  • ordered_backends: Property listing the data extraction tools required for the platform
  • check(): Validates that upstream CLI tools are installed and accessible

Concrete implementations override these methods to provide platform-specific logic. For example, twitter.py implements can_handle to match Twitter/X URLs, while youtube.py handles YouTube video links.

Channel Registry and Discovery

The __init__.py file serves as the central registry for all channel files in Agent Reach. It imports every concrete channel class and constructs the ALL_CHANNELS list.


# agent_reach/channels/__init__.py

ALL_CHANNELS: List[Channel] = [
    GitHubChannel(),
    TwitterChannel(),
    YouTubeChannel(),
    RedditChannel(),
    FacebookChannel(),
    InstagramChannel(),
    BilibiliChannel(),
    XiaoHongShuChannel(),
    LinkedInChannel(),
    XiaoyuzhouChannel(),
    V2EXChannel(),
    XueqiuChannel(),
    RSSChannel(),
    ExaSearchChannel(),
    WebChannel(),
]

This registry enables the CLI doctor command to iterate through all platforms and run health checks. The module also exposes helper functions get_channel() and get_all_channels() for programmatic access.

How to Access Channel Files Programmatically

You can interact with the channel files directly from Python to inspect capabilities or validate URLs.

List all available channels:

from agent_reach.channels import get_all_channels

for ch in get_all_channels():
    print(f"{ch.name:12} → {ch.description}")

Get a specific channel and validate URLs:

from agent_reach.channels import get_channel

twitter = get_channel("twitter")
can_process = twitter.can_handle("https://x.com/elonmusk/status/12345")
print(can_process)  # True

Run health checks:

status, message = twitter.check()
print(status, message)

# Output: ok Twitter CLI 完整可用(搜索、读推文、时间线、长文/Article、用户查询、Thread)

Summary

  • Location: All channel files reside in agent_reach/channels/ according to the Agent Reach source code
  • Architecture: Each file inherits from the abstract Channel class in base.py
  • Registry: The __init__.py file maintains ALL_CHANNELS for system-wide discovery
  • Platforms: 15 supported channels including GitHub, Twitter, YouTube, Bilibili, and XiaoHongShu
  • API: Use get_channel() and get_all_channels() to access channel functionality programmatically

Frequently Asked Questions

What is the base class for all channel files in Agent Reach?

All channel implementations inherit from the abstract Channel class defined in agent_reach/channels/base.py. This base class provides the interface for URL matching (can_handle), backend ordering (ordered_backends), and health checking (check).

How do I add a new platform channel to Agent Reach?

Create a new Python file in agent_reach/channels/ (e.g., new_platform.py), define a class that inherits from Channel, and implement the required methods. Then import and instantiate your class in agent_reach/channels/__init__.py and append it to the ALL_CHANNELS list.

Where is the channel registry located in Agent Reach?

The channel registry is located in agent_reach/channels/__init__.py. This file imports all concrete channel classes, instantiates them, and exposes them through the ALL_CHANNELS list and helper functions like get_channel() and get_all_channels().

How does Agent Reach determine which channel handles a specific URL?

Each channel implements the can_handle(url) method. When processing a URL, Agent Reach iterates through ALL_CHANNELS and calls this method on each instance until one returns True, indicating that channel is responsible for extracting content from that URL.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →