Telegram Context for Openclaw

A toggle-enabled skill that retrieves recent Telegram message history to ensure conversational continuity across agent sessions.

fourthdensity
v1.0.1
Feb 15, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install telegram-context

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 telegram-context 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 Telegram Context?

Telegram Context is a technical integration designed to bridge the gap between disconnected sessions on the Telegram platform. By automatically fetching recent message history at the start of a session, it provides the AI agent with immediate situational awareness without requiring the user to recap previous interactions. This skill is a vital component for developers looking to build persistent and reliable communication flows using Openclaw Skills.

The skill functions by interacting with the Openclaw gateway to pull the most recent messages from the active chat. It stores user preferences, such as the fetch count and enable status, in a local JSON file. This approach ensures that the agent remains contextually aware while respecting user control and privacy, as no message content is permanently stored within the skill configuration itself.

Telegram Context Use Cases

  • Restoring conversation flow after an agent timeout or system restart.
  • Catching up on previous messages in a Telegram-based project management chat.
  • Providing necessary background data to the LLM for complex, multi-day tasks.
  • Manually pulling specific segments of history using Openclaw Skills for targeted analysis.
  • Ensuring agents remain synchronized with user instructions across different devices.

How Telegram Context Works

  1. At the start of a Telegram session, the skill checks the memory/telegram-context.json file to see if the auto-fetch feature is enabled.
  2. If active, it identifies the current channel context through the messaging gateway.
  3. The skill calls the built-in message tool with a list action to retrieve the last N messages (defaulting to 20).
  4. These messages are injected into the agent's context window, providing the LLM with the necessary history.
  5. The lastFetch timestamp is updated in the local state file to track synchronization activity.

Telegram Context Setup

The Telegram Context skill is designed for ease of use with auto-detection for active Telegram channels. To get started, ensure your agent has message:read permissions. You can manage the skill using the following commands within your chat interface:

/telegram-context on
/telegram-context status

No manual API key configuration is required, as the skill leverages the existing gateway permissions established for your Openclaw Skills. Configuration state is automatically managed in the memory/telegram-context.json file.

Telegram Context Data Schema & Taxonomy

The skill maintains a lightweight state file to manage session persistence and user preferences. Data is organized as follows:

Property Description
enabled A boolean indicating if automatic history fetching is active.
fetchCount The number of messages to retrieve during each fetch operation.
lastFetch An ISO8601 timestamp of the most recent history retrieval.

Note that message content is only processed within the volatile context window and is never saved to the local JSON state file.

Telegram Context Advanced Features

  • Manual Override: Use the fetch command to pull specific message counts (e.g., /telegram-context fetch 50) for deep context tasks.
  • State Persistence: Configuration remains consistent across restarts, ensuring your preferred Openclaw Skills behavior is maintained.
  • Targeted Scope: Operations are strictly limited to the current chat to prevent cross-conversation data exposure.
  • Context Optimization: Control the fetchCount to balance between providing detailed history and managing LLM token consumption.
  • Integration Support: Works seamlessly alongside other memory-focused Openclaw Skills to provide a robust long-term persistence layer.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*