← 返回
沟通协作 中文

Telegram Context

Fetches recent Telegram messages at session start to maintain conversation context across sessions, with toggle and manual fetch commands.
在会话启动时获取最近的 Telegram 消息,以保持跨会话的对话上下文,支持开关和手动获取命令。
fourthdensity
沟通协作 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,162
下载
💾 25
安装
1
版本
#chat-history#context#latest#memory#privacy#telegram

概述

Telegram Context

Provides conversational continuity by fetching recent Telegram messages at session start. When enabled, the agent automatically retrieves message history to maintain context across disconnected sessions.

Credits

Created by @fourthdensity

Commands

  • /telegram-context on — Enable automatic history fetching
  • /telegram-context off — Disable automatic fetching
  • /telegram-context status — Show current settings
  • /telegram-context fetch [n] — Manually fetch last n messages (default: 20)

Setup

  1. The skill auto-detects Telegram channels — no configuration needed
  2. State is stored in memory/telegram-context.json
  3. Only activates when the current channel is Telegram

How It Works

When a session starts in Telegram:

  1. Check memory/telegram-context.json for enabled state
  2. If enabled, fetch recent messages via message tool
  3. Provide history as context for the conversation
  4. Update lastFetch timestamp

State File

memory/telegram-context.json:

{
  "enabled": true,
  "fetchCount": 20,
  "lastFetch": "2025-01-15T10:30:00Z"
}

Implementation Notes

Command Handlers

Enable/disable:

// Read current state
read: memory/telegram-context.json

// Update state
write: memory/telegram-context.json
{
  "enabled": true/false,
  "fetchCount": 20,
  "lastFetch": "2025-01-15T10:30:00Z"
}

Manual fetch:

message: {
  action: "list",
  limit: 20  // or user-specified count
}
// Provide results as context summary

Session Start Behavior

At the start of each Telegram session:

  1. Check if memory/telegram-context.json exists
  2. If enabled, call message tool with action: "list"
  3. Summarize recent messages for context window
  4. Acknowledge continuity to user (optional)

Implementation Scope

The skill uses OpenClaw's built-in message tool with:

  • action: "list" — limited to the current Telegram chat only
  • No access to other chats, channels, or external Telegram accounts
  • Requires the OpenClaw gateway to have Telegram channel permissions already configured

Privacy & Security

Data Handling:

  • Only fetches from the current chat (never cross-chats or other Telegram conversations)
  • Message content is included in the agent's context window and sent to the configured LLM provider
  • No message content is stored in telegram-context.json — only settings and timestamps
  • Message content may appear in OpenClaw session logs (depends on your logging configuration)

Recommendations for Sensitive Conversations:

  • Use manual fetch (/telegram-context fetch) instead of auto-fetch
  • Set low fetchCount (5-10) to minimize context exposure
  • Disable the skill entirely when discussing sensitive topics: /telegram-context off
  • Be aware that fetched messages become part of the conversation history sent to AI models

User Control:

  • Full toggle on/off anytime — no persistence beyond your control
  • No external credentials or API keys required
  • No binaries installed — pure instruction-based skill

Limitations

  • Telegram-only (other channels not supported)
  • Requires appropriate message permissions via OpenClaw gateway
  • Large history may need summarization to fit context window
  • Fetched messages are sent to your configured LLM provider — review your threat model for sensitive conversations

Tips

  • Set fetchCount to 10-30 for most use cases (balance context vs. tokens)
  • Use /telegram-context fetch 50 when you need deep context for a specific task
  • Works best alongside MEMORY.md for long-term persistence

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 05:45 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,587
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,420
productivity

SAM TTS

fourthdensity
使用 SAM(Software Automatic Mouth)——经典 C64 文字转语音合成器,生成复古机器人语音。通过 /sam 命令生成语音消息,支持 /sam on/off 切换模式,所有响应均以 SAM 语音朗读。可调节音高、语
★ 2 📥 1,194