Add TRACaBot OpenClaw Telegram integration#9
Open
brxtrac wants to merge 7 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounty Reference
Submitted for OriginTrail DKG v10 Bounty Program Round 1 (
cfi-dkgv10-r1): Working and Shared Memory integrations for LLM-Wiki/autoresearch agents, with OpenClaw as a priority target under Section 5.Summary
tracabot is a live OpenClaw-compatible Telegram anti-scam agent. It detects phishing, fake airdrops, investment testimonial scams, support/admin impersonation, join-then-rename impersonators, off-platform DM impersonators, suspicious moderation events, and low-risk joins that must verify with a DKG Knowledge Asset challenge, then writes structured scam knowledge to DKG v10 Shared Working Memory in the
tracabotContext Graph.It now also exposes a concrete OpenClaw skill surface through
skills/tracabot/skill.jsonandbin/tracabot-skill.js, allowing OpenClaw agents to call scan, explain, watchlist, digest, campaign, appeal, and review tools directly as JSON.TRACaBot also supports bounded conversational safety replies in Telegram. It keeps its own standalone Telegram token while optionally inheriting local OpenClaw OAuth/model/gateway configuration for LLM-drafted answers to scam-safety questions. If OpenClaw chat access is unavailable, it falls back to deterministic evidence templates.
The differentiator is the shared persistent memory loop: one community's accepted report, DM scam report, fraud finding, or ban becomes queryable DKG intelligence for every other community running tracabot against the same Context Graph. A bad actor who tests a scam in one channel or in private DMs can be flagged elsewhere by Telegram user ID, username/display-name alias, reported alias, wallet, domain, or scam pattern before repeating the attack.
Telegram commands are registered on startup:
/scan: check a user, wallet, or replied message for scam risk./report: report a suspicious user, wallet, or message to DKG./dmreport: report off-platform DM impersonation scams to DKG Shared Memory when accepted./ban: ban a replied user and publish ban evidence./stats: show recent fraud checks and detections, including/stats campaignsfor repeated scam waves./why: explain a tracabot event decision using local evidence, DKG source refs, Shared Memory write metadata, and publish status./watchand/unwatch: admin-only scrutiny controls that accept replies, SangMata rename alerts, numeric Telegram IDs, or usernames, then boost scoring without banning by themselves./watchlist: admin-only local queue of active watches, temporary mutes, and pending review items./challenge on|off|status: admin-only per-chat join challenge toggle./appeal: submit a correction or appeal to DKG Shared Memory./review: admin-only upheld/overturned review decision written to DKG. Admins can reply directly to a bot review alert, and review confirmations remain visible for auditability./digest: summarize recent actions, reports, watches, appeals, reviews, and campaign signals.OpenClaw skill tools are also available:
scan_target,monitor_chat_event,sort_conversation_artifact,explain_event,get_watchlist,get_digest,query_campaigns,submit_appeal, andreview_event.DKG v10 Fit
DkgDaemonClientagainst the local DKG v10 daemon.sharewrites evidence-backed findings to Shared Memory with actor IDs, aliases, wallets, domains, patterns, campaign signals, confidence, evidence, target metadata, restriction expiry, review decisions, and moderation outcome;queryreads the same graph withincludeSharedMemory: truebefore scoring new joins, first posts,/scan, and/reporttargets. Plain watchlist monitoring and weak reports stay local-only.createAssertion,writeAssertion, andpromoteAssertionfor Working Memory to Shared Working Memory flow;shareremains supported as a compatibility fallback./why,/appeal, and/reviewmake decisions explainable and correctable while preserving an auditable DKG trail instead of silently rewriting moderation history.Verification
Live DKG v10 / OpenClaw adapter verification:
Review and governance paths are covered in the automated test suite, including
/appeal,/review, reply-based review inference from bot alerts, false-positive suppression after overturns,/watchlistreview queues, and visible persistent review confirmations.Tests and audit:
Telegram runtime:
Security Attestation
I attest that this code is my own work or properly licensed, contains no intentional backdoors, uses no dynamic remote code loading, and has no preinstall or postinstall scripts. Network egress is declared as
api.telegram.orgplus the configured local DKG node. DKG write authority is limited to Context Graph creation, Shared Memory writes, Shared Memory queries, and targeted auto-publishing of qualifying high-confidence fraud events through the configured Curator-authorized runtime.The registry install points to the published provenance-backed
tracabot@0.1.0package, while the source, design brief, and demo links are pinned to the final reviewed commit for this PR.Maintenance
Maintainer: brxtrac
Support window: at least six months after registry acceptance.