Hermes Atlas
Messaging bridges & gateways

Hermes Feishu Table Renderer

chapaofan/Hermes-feishu-to-table

Patched feishu.py that renders Markdown tables as real Feishu CardKit v2 tables in Hermes Agent

In short

Hermes Feishu Table Renderer is a patched feishu.py for Hermes Agent that sends Markdown tables to Feishu (Lark) as native CardKit v2 table components. It fixes tables appearing as plain text or code blocks for Hermes Agent users on Feishu.

What Hermes Feishu Table Renderer does

By default, Hermes sends Markdown tables to Feishu in a way that shows them as plain text or code blocks, which loses the table structure. This repository provides a modified feishu.py that detects Markdown tables before a message is sent and, when it finds one, sends an interactive schema 2.0 card with a native CardKit v2 table component. Messages without tables follow the original path.

The change adds helper functions. _parse_markdown_table splits text into table and non-table segments, _build_table_card converts rows into columns and rows objects, _build_interactive_card_with_tables assembles the card, and _build_outbound_payload chooses which format to send. Because CardKit v2 text cells do not support Markdown, the code strips ** and __ markers from cells and sets header_style bold for headers. _convert_markdown_tables_to_code stays as a deprecated pass-through. The README is written in Chinese.

Key features

  • Detects Markdown tables in outgoing Feishu messages
  • Builds CardKit v2 table components with columns and rows objects
  • Strips bold and underscore markers from cells and bolds the header row
  • Falls back to the original sending logic when a message has no table
  • Keeps a deprecated pass-through function for old callers

When to use it

  • Show comparison tables from Hermes replies as readable tables in Feishu chats
  • Replace the code-block table output seen in Feishu groups
  • Use the card builder functions as a reference for CardKit v2 tables

Who it is for: Hermes Agent operators who deliver replies through Feishu or Lark and need tables to display properly.

How it fits with Hermes Agent

A patch for Hermes Agent's Feishu gateway platform file, installed by replacing gateway/platforms/feishu.py in the Hermes directory.

How to install Hermes Feishu Table Renderer

These commands are copied from the project's README. Check the repository for the latest steps before you run them.

cp ~/.hermes/hermes-agent/gateway/platforms/feishu.py ~/.hermes/hermes-agent/gateway/platforms/feishu.py.bak
cp ./feishu.py ~/.hermes/hermes-agent/gateway/platforms/feishu.py
hermes gateway restart

Requirements: A Hermes Agent installation with its Feishu platform file at gateway/platforms/feishu.py.

Note: It works by replacing Hermes's own gateway/platforms/feishu.py file, so back up the original before copying it over.

FAQ

What is Hermes Feishu Table Renderer?

It is a modified feishu.py for Hermes Agent that turns Markdown tables into native Feishu CardKit v2 table components instead of plain text or code blocks.

How do I install Hermes Feishu Table Renderer?

Optionally back up gateway/platforms/feishu.py, copy the repository's feishu.py over it, and run hermes gateway restart. Adjust the path to match where Hermes is installed.

Is Hermes Feishu Table Renderer free and open source?

GitHub shows no license file for the repository, so default copyright applies, although the README's License section says MIT. Check with the author before reuse.

Similar messaging for Hermes Agent

All messaging

Related guides: How to run Hermes Agent securely · Run multiple Hermes agents with profiles