/ingest - Material Ingestion
Ingests external materials into the Mega Brain inbox, extracting metadata and preparing content for pipeline processing.Syntax
string
required
YouTube URL, local file path, or Google Drive link
Supported Sources
YouTube
Videos with automatic transcription
Local Files
.txt, .pdf, .docx documents
Google Drive
Docs, PDFs, Sheets
Flags
string
Manually specify the expert/person name (overrides automatic detection)Example:
--person "Cole Gordon"string
Content type: PODCAST, MASTERCLASS, COURSE, BLUEPRINT, VSL, etc.Example:
--type MASTERCLASSboolean
Automatically start pipeline processing after ingestionExample:
--processExamples
How It Works
Step 1: Source Type Detection
The command identifies the source type:Step 2: Metadata Extraction
Automatic metadata detection:- Person Detection
- Content Type Detection
- Company Detection
--person flag provided, uses that instead.Step 3: Destination Path
Files are saved to structured inbox:- YouTube:
{VIDEO_TITLE} [youtube.com_watch_v={ID}].txt - Local:
{ORIGINAL_NAME}.txt - Google Drive:
{DOC_TITLE}.txt
Step 4: Generate Source ID
Each file gets a unique identifier:Step 5: Ingest Report
Display confirmation:Step 6: Auto-Process (if —process flag)
If--process flag is present, automatically triggers:
Audit Logging
All ingestions are logged to/logs/AUDIT/audit.jsonl:
YouTube Transcription
Requirements
OPENAI_API_KEY required for YouTube transcription via Whisper
- Download audio using
yt-dlp - Convert to MP3
- Send to Whisper API
- Save transcript with timestamps
Transcript Format
Supported Languages
Whisper auto-detects language. Supports 50+ languages including:- English
- Spanish
- Portuguese
- French
- German
- Chinese
- Japanese
- And more…
Google Drive Import
Setup Required
Configure during/setup or manually in .env:
OAuth Flow
First time accessing Drive:Supported Document Types
- Google Docs - Converted to plain text
- Google Sheets - Converted to CSV then text
- PDFs - Extracted with OCR if needed
- Word Docs (.docx) - Converted to text
Error Handling
YouTube Video Not Available
Transcription Failed
File Already Exists
Unsupported File Type
Performance
Processing Times
YouTube transcription time depends on video length and Whisper API latency
Rate Limits
- OpenAI Whisper: 50 requests/min (Tier 1)
- YouTube API: 10,000 quota/day
- Google Drive API: 1,000 requests/100s/user
Best Practices
1. Organize by Expert
Use--person flag for consistency:
2. Specify Content Type
Helps with later analysis:3. Batch Processing
For multiple files, ingest first, then batch process:4. Use Descriptive Filenames
Before ingesting local files:Advanced Usage
Playlist Ingestion
Webhook Integration
Custom Metadata
Troubleshooting
”yt-dlp not found”
Issue: YouTube downloader not installed Solution:“OpenAI API key invalid”
Issue: API key not configured or incorrect Solution:“Permission denied writing to inbox/”
Issue: Insufficient file permissions Solution:Next Steps
Process Command
Transform raw content into structured knowledge
JARVIS Briefing
Monitor your knowledge base growth
Pipeline Guide
Understand the 8-phase processing pipeline
Inbox Management
Best practices for organizing materials
