An AI-powered YouTube Trend Coach that uses Memori v3 as long‑term memory and MiniMax (OpenAI‑compatible) for reasoning.
- Scrapes your channel with
yt-dlpand stores video metadata in Memori. - Uses MiniMax to analyze your channel history plus Exa web trends.
- Provides a Streamlit chat UI to ask for trends and concrete new video ideas grounded in your own content.
-
Direct YouTube scraping
- Uses
yt-dlpto scrape a channel or playlist URL (titles, tags, dates, views, descriptions). - Stores each video as a Memori document for later semantic search.
- Uses
-
Memori memory store
- Uses
Memori+ a MiniMax/OpenAI‑compatible client to persist “memories” of your videos. - Ingestion happens via
ingest_channel_into_memoriincore.py, which callsclient.chat.completions.create(...)so Memori can automatically capture documents.
- Uses
-
Web trend context with Exa (optional)
- If
EXA_API_KEYis set, fetches web articles and topics for your niche viaExa. - Blends Exa trends with your channel history when generating ideas.
- If
-
Streamlit UI
- Sidebar for API keys, MiniMax base URL, and channel URL.
- Main area provides a chat interface for asking about trends and ideas.
- Python 3.11+
uv(recommended) orpip- MiniMax account + API key (used via the OpenAI SDK)
- Optional: Exa and Memori API keys
- Install
uv(if you don’t have it yet):
curl -LsSf https://astral.sh/uv/install.sh | sh- Create the environment and install dependencies from
pyproject.toml:
cd memory_agents/youtube_trend_agent
uv syncThis will create a virtual environment (if needed) and install all dependencies declared in pyproject.toml.
- Environment variables
You can either:
- Set these in your
.env, (see .env.example) or - Enter them in the Streamlit sidebar (the app writes them into
os.environfor the current process).
From the youtube_trend_agent directory:
uv run streamlit run app.pyIn the sidebar:
- Enter your MiniMax API Key and (optionally) MiniMax Base URL.
- Optionally enter Exa and Memori API keys.
- Paste your YouTube channel (or playlist) URL.
- Click “Save Settings” to store the keys for this session.
- Click “Ingest channel into Memori” to scrape and store recent videos.
Then, in the main chat:
- Ask things like:
- “Suggest 5 new video ideas that build on my existing content and current trends.”
- “What trends am I missing in my current uploads?”
- “Which topics seem to perform best on my channel?”
The agent will:
- Pull context from Memori (your stored video history),
- Use MiniMax (
MiniMax-M2.1by default, configurable), - Optionally incorporate Exa web trends,
- And respond with specific, actionable ideas and analysis.