Install
openclaw skills install clawtext-ingestMulti-source memory ingestion with Discord support, automatic deduplication, and agent-ready patterns
openclaw skills install clawtext-ingestVersion: 1.3.0 | License: MIT | Status: Production ✅
Author: ragesaq | Category: Memory & Knowledge Management
GitHub: https://github.com/ragesaq/clawtext-ingest
ClawText Ingest transforms external data (Discord forums, files, URLs, JSON, text) into structured, deduplicated memories for AI agents.
✅ One command imports from Discord, files, URLs, or JSON
✅ 100% idempotent — Run 1000x, zero duplicates
✅ Automatic metadata — YAML frontmatter with date, project, type, entities
✅ 6 agent patterns — Autonomous workflows documented and ready
✅ Discord-native — Forum hierarchy preserved, progress bars, auto-batch mode
checkDedupe: true/false per operation.ingest_hashes.json for cross-session trackingclawtext-ingest + clawtext-ingest-discord commands# Via npm
npm install clawtext-ingest
# Via OpenClaw
openclaw install clawtext-ingest
# 1. Set up Discord bot (see DISCORD_BOT_SETUP.md)
# 2. Get bot token, set DISCORD_TOKEN env var
# 3. Inspect forum
clawtext-ingest-discord describe-forum --forum-id FORUM_ID --verbose
# 4. Ingest with progress
DISCORD_TOKEN=xxx clawtext-ingest-discord fetch-discord --forum-id FORUM_ID
# 5. Rebuild ClawText clusters
clawtext-ingest rebuild
clawtext-ingest ingest-files --input="docs/*.md" --project="docs"
import { ClawTextIngest } from 'clawtext-ingest';
const ingest = new ClawTextIngest();
// Ingest files
await ingest.fromFiles(['docs/**/*.md'], { project: 'docs', type: 'fact' });
// Ingest JSON
await ingest.fromJSON(chatArray, { project: 'team' }, {
keyMap: { contentKey: 'message', dateKey: 'timestamp', authorKey: 'user' }
});
// Rebuild clusters for RAG injection
await ingest.rebuildClusters();
For: In-agent code
Use when: Agents need to ingest as part of workflow
const ingest = new ClawTextIngest();
await ingest.fromFiles(['docs/**/*.md'], { project: 'docs' });
For: Autonomous Discord ingestion
Use when: Agents need to fetch Discord forums
const runner = new DiscordIngestionRunner(ingest);
await runner.ingestForumAutonomous({
forumId, mode: 'batch', token: process.env.DISCORD_TOKEN
});
For: Agents executing commands
Use when: Simpler CLI-based execution needed
await execAsync('clawtext-ingest-discord fetch-discord --forum-id ID');
For: Recurring tasks
Use when: Daily/hourly ingestion needed
cron.schedule('0 * * * *', () => agentIngest());
For: Unified ingestion
Use when: Multiple sources in one operation
await ingest.ingestAll([
{ type: 'files', data: ['docs/**/*.md'], metadata: {...} },
{ type: 'json', data: chatExport, metadata: {...} }
]);
For: Thread-specific ingestion
Use when: Single thread fetch needed
await runner.ingestThread(threadId);
→ See AGENT_GUIDE.md for complete examples
async function syncDocsDaily() {
const ingest = new ClawTextIngest();
const result = await ingest.ingestAll([
{ type: 'files', data: ['docs/**/*.md'], metadata: { project: 'docs' } },
{ type: 'urls', data: ['https://docs.example.com/api'], metadata: { project: 'api-docs' } }
]);
await ingest.rebuildClusters();
return result;
}
async function monitorDiscordForum(forumId) {
const ingest = new ClawTextIngest();
const runner = new DiscordIngestionRunner(ingest);
const result = await runner.ingestForumAutonomous({
forumId,
mode: 'batch',
token: process.env.DISCORD_TOKEN,
onProgress: (p) => console.log(`${p.percent}% complete...`)
});
return result;
}
async function ingestTeamDecisions() {
const ingest = new ClawTextIngest();
const result = await ingest.ingestAll([
{ type: 'files', data: ['decisions/adr/**/*.md'], metadata: { type: 'adr' } },
{ type: 'json', data: slackThread, metadata: { type: 'decision', source: 'slack' } }
]);
await ingest.rebuildClusters();
return result;
}
clawtext-ingest — File/URL/JSON/Text Ingestionclawtext-ingest ingest-files --input="docs/*.md" --project="docs" --verbose
clawtext-ingest ingest-urls --input="https://example.com" --project="research"
clawtext-ingest ingest-json --input=messages.json --source="slack"
clawtext-ingest ingest-text --input="Finding: X is better than Y" --project="findings"
clawtext-ingest batch --config=sources.json
clawtext-ingest rebuild
clawtext-ingest status
clawtext-ingest-discord — Discord Integration# Inspect forum
clawtext-ingest-discord describe-forum --forum-id FORUM_ID --verbose
# Fetch & ingest
DISCORD_TOKEN=xxx clawtext-ingest-discord fetch-discord \
--forum-id FORUM_ID \
--mode batch \
--batch-size 100 \
--verbose
| Document | Purpose | Read Time |
|---|---|---|
| README.md | Overview + quick start | 5 min |
| QUICKSTART.md | 5-minute setup | 5 min |
| AGENT_GUIDE.md | 6 autonomous patterns | 10 min |
| API_REFERENCE.md | Complete API docs | 15 min |
| PHASE2_CLI_GUIDE.md | CLI commands | 10 min |
| DISCORD_BOT_SETUP.md | Bot creation | 5 min |
| CLAYHUB_GUIDE.md | Publication | 5 min |
| INDEX.md | Documentation index | 2 min |
| Operation | Speed | Notes |
|---|---|---|
| Ingest 100 files | ~5 sec | With SHA1 dedup check |
| Ingest 1000 JSON items | ~15 sec | Batch processing |
| Small forum (<100 msgs) | ~10 sec | Full mode |
| Large forum (1000+ msgs) | ~2 min | Auto-batch, streaming |
| Rebuild clusters | ~5-30 sec | Depends on total memories |
| Metric | Value |
|---|---|
| Tests | 22/22 passing ✅ |
| Code | 1,254 production lines |
| Documentation | 92 KB across 11 guides |
| Examples | 20+ working examples |
| Coverage | 100% critical paths |
# Complete workflow
clawtext-ingest-discord fetch-discord --forum-id ID # Step 1
clawtext-ingest rebuild # Step 2
# Step 3-4 automatic (ClawText + Agent)
Requirements:
Installation:
npm install clawtext-ingest
# or
openclaw install clawtext-ingest
Binaries:
clawtext-ingest — File/URL/JSON ingestionclawtext-ingest-discord — Discord integration| Feature | ClawText-Ingest | Manual | Generic Importer | API Tool |
|---|---|---|---|---|
| Discord native | ✅ | ❌ | ❌ | ❌ |
| Deduplication | ✅ | ❌ | Partial | ❌ |
| Agent patterns | ✅ | ❌ | ❌ | ❌ |
| Metadata auto | ✅ | ❌ | Partial | ❌ |
| ClawText integration | ✅ | ❌ | ❌ | ❌ |
| Idempotent | ✅ | ❌ | ❌ | Partial |
MIT — Use freely, open source, community supported
Contributions welcome! See GitHub issues for current priorities.
Ready to ingest? Start with QUICKSTART.md (5 min) or AGENT_GUIDE.md if you're building agents.