TokenFlow for Openclaw

An agent-agnostic tool for converting multi-format documents, spreadsheets, audio files, and web pages into structured Markdown or HTML.

kolemaravilla
v1.0.0
May 19, 2026
0
749
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tokenflow

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tokenflow using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is TokenFlow?

TokenFlow is a highly extensible, agent-agnostic tool designed to bridge the gap between heavy, unstructured files and LLM context windows. By integrating with the TokenFlow API, this capability automatically converts PDFs, spreadsheets, Word documents, web pages, and audio files into parsed, clean markdown or HTML. It serves as an essential addition to any developer's catalog of Openclaw Skills, allowing AI agents to effortlessly read local files and external web pages.

Since configuration is managed entirely agent-side via a local JSON profile, developers can set custom rules for different document types, manage fallbacks during conversion failures, and establish interactive prompts. By translating binary assets into lightweight, semantic text, TokenFlow ensures your workflows maximize token efficiency and maintain rich format context.

TokenFlow Use Cases

  • Processing massive DOCX and PDF documents into structured, LLM-ready markdown formats.
  • Previewing and converting complex spreadsheet files (.xlsx, .xls, .csv) with single or multi-sheet routing.
  • Transcribing multi-format audio files directly into structured transcripts for conversation parsing.
  • Fetching pasted URLs and converting target web layout elements into clean markdown.
  • Optimizing overall processing overhead for custom workflows powered by Openclaw Skills platforms.

How TokenFlow Works

  1. Interception: The AI agent detects an incoming document attachment, audio file, or pasted web URL.
  2. Configuration Match: The skill processes the extension against local behavior policies to decide if it should convert, skip, or request user confirmation.
  3. Spreadsheet Previewing: For Excel sheets, the skill runs a fast preview request to inspect the inner tab matrix before calling full conversion.
  4. Conversion Call: The file data is sent to the TokenFlow API via secure multipart requests, converting the input into the targeted output layout.
  5. Injection: Structured text is returned to the active session, instantly expanding the developer's agent execution memory.
  6. Error Safeguards: If timeouts, rate limits, or validation errors occur, the system triggers pre-defined fallbacks, gracefully falling back to standard file usage.

TokenFlow Setup

To integrate this conversion utility into your workflows, configure your credentials and pull the module to your local instance.

Installation

For systems utilizing Openclaw Skills, run the package installation command:

openclaw skills install tokenflow

Alternatively, clone or download the workspace manually into your configured location:

cp -r tokenflow ~/.openclaw/skills/

For Hermes configurations, place the directory into your active skills path:

cp -r tokenflow ~/.hermes/skills/

Configuration

Create a local configuration file named config.json inside your skill's directory:

{
  "apiKey": "your-api-key-here",
  "apiUrl": "https://tokenflow.fly.dev",
  "filetypeBehavior": {
    "docx": { "action": "convert", "askEachTime": false },
    "xlsx": { "action": "convert", "askEachTime": true },
    "pdf": { "action": "convert", "askEachTime": false },
    "audio": { "action": "convert", "askEachTime": false }
  },
  "outputFormat": "markdown",
  "maxRetries": 1,
  "fallbackBehavior": "use_file"
}

Ensure you configure your environment keys if your runtime system requires execution variables:

export TOKENFLOW_API_KEY="Your TokenFlow API key"

TokenFlow Data Schema & Taxonomy

TokenFlow structures all conversions through a localized profile and interacts with structured API nodes. Below is the configuration taxonomy mapping:

Filetype Rules

File Type Extensions Supported Action Policy Prompt User (askEachTime)
docx .docx, .pptx "convert" or "skip" True/False
xlsx .xlsx, .xls, .csv "convert" or "skip" True/False
pdf .pdf "convert" or "skip" True/False
audio .wav, .mp3, .ogg, .flac, .m4a "convert" or "skip" True/False

Endpoint Routing Schema

  • POST /convert: Converts files to structured Markdown/HTML using your authorization token.
  • POST /convert/preview: Retrieves index records and tab metadata for multi-sheet workbooks.
  • POST /convert/url: Transforms external hyperlinks into readable markdown structures.
  • GET /health: Serves as the system check endpoint.
  • GET /usage: Monitors monthly credits and query usage stats.

TokenFlow Advanced Features

  • Flexible Error Recovery: Define fallback behaviors like use_file to bypass conversion failures and fall back to raw attachments.
  • Embedded Image Processing: Renders base64-encoded images directly inside PDF markdown payloads for continuous multimodal processing.
  • Interactive Prompt Controls: Activate individual conversion warnings for heavy spreadsheet or audio payloads to keep developers in full control.
  • Pre-conversion Workbook Analysis: Runs localized sheet previews to easily process nested spreadsheets without overhead blocks.
  • Native Cross-Agent Portability: Effortlessly run the skill across Openclaw Skills and Hermes environments without modifying core agent workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*