Skip to main content

A resumable multi-agent pipeline that researches, writes, judges, narrates, and renders short-form YouTube videos for any niche.

Project description

Content Foundry

An autonomous, fully-resumable multi-agent pipeline that turns real labor-market data into a published (Private/Unlisted draft) YouTube video — grounded in data, gated by a strict quality rubric, and compliant with synthetic-content disclosure by default.

Pipeline: Data Fetcher → Script Generator → Judge → Voiceover → Visuals → Render → Publish

The complete engineering specification (single source of truth) lives in spec/. A high-level architecture summary is in TECH_REPORT.md, and the operator guide in Tutorial.md.

Live channel

Watch the output live: youtube.com/@TheCrackedEng

Disclaimer: This channel is 100% generated, voiced, and published autonomously by this repository.

Quickstart

# 1. Create & activate a Python 3.11+ environment, then install
pip install -r requirements.txt
pip install -e .            # exposes the `content-foundry` CLI

# 2. Configure
cp .env.example .env        # fill in your keys (see Human_Tasks.md)

# 3. Initialise the database
python scripts/init_db.py

# 4. Smoke test (no upload, stops at the Judge)
content-foundry run --niche "tech careers" --to-stage judge

# Or produce a vertical YouTube Short instead of a long video (one switch):
content-foundry run --niche "tech careers" --idea "your topic" --format short

See spec/23-deployment-instructions.md for full deployment, spec/17-cli-interface.md for every command, and Human_Tasks.md for the manual setup checklist (API keys, OAuth, Telegram bot).

Project layout

src/content_foundry/    # the engine (models, agents, providers, pipeline, ...)
dashboard/            # Streamlit review dashboard
scripts/              # init_db, seed_demo
tests/                # unit / agent / integration / e2e (dry-run)
spec/                 # the authoritative specification (25 chapters)
output/runs/<run_id>/ # per-run artifacts + media + package.md

Cost discipline

Only Agent 2 (Script Generator) always calls an LLM. The Data Fetcher, most of the Judge, and the Visuals prompt-builder are deterministic Python — free, fast, and hallucination-proof.

Cost levers (cheapest first):

  • Run the LLM locallyPRIMARY_PROVIDER=local (Ollama / LM Studio / vLLM) makes generation free.
  • Free voiceTTS_PROVIDER=edge (Microsoft neural, free, no key) or piper (fully offline), or chatterbox to clone your own voice free & locally (MIT-licensed, safe to monetize; GPU recommended). Paid: elevenlabs / openai. Voices auto-alternate male/female by run number.
  • Free visualsIMAGE_PROVIDER=none renders polished title cards; add free Pexels + Pixabay keys for real, moment-matched B-roll (a clip per narration beat), now held to a STRICT on-topic bar — a beat with no confidently-relevant clip falls back to a bespoke generated image (or a clean card when no image provider is set), never an off-topic clip.
  • Free research (default)ENABLED_SOURCES=search runs free DuckDuckGo web research on your run's topic (no key), so it works on any niche out of the box; the labor-market feeds (adzuna/layoffs/bls) are opt-in add-ons.
  • Free idea discoveryIDEA_MINING_ENABLED=true + a free YOUTUBE_API_KEY mines proven outlier videos in your niche (views far above the channel's median) so each run builds a topic with demonstrated demand instead of a guess; best-effort, so it never blocks a run.
  • Free polish — bundled sound effects (SFX_ENABLED), scene crossfades, a warm grade, and a Subscribe nudge are all local/ffmpeg (no paid services).
  • --profile cheap — deterministic judge + Pillow cards (no image API) + a single revision.
  • Hard budget capENFORCE_BUDGET_CAP=true aborts a run once estimated month-to-date spend reaches MONTHLY_BUDGET_USD (on by default; cost safety, not just an alert).
  • Resume reuses paid artifacts — re-running a stage reuses existing voiceover/visuals instead of paying again (use --force to regenerate).
  • FAIL_FAST_SCORE (opt-in) — stop paying for revisions a hopeless script can't recover from.

Use --profile quality for publishing.

Testing

pytest                # unit + agent + integration + e2e dry-run, ≥85% coverage gate

All tests run offline — vendors are mocked behind their protocols; no real network or API calls.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

content_foundry-1.0.0.tar.gz (368.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

content_foundry-1.0.0-py3-none-any.whl (411.6 kB view details)

Uploaded Python 3

File details

Details for the file content_foundry-1.0.0.tar.gz.

File metadata

  • Download URL: content_foundry-1.0.0.tar.gz
  • Upload date:
  • Size: 368.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for content_foundry-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2c6c44a1bdb74e6bf9b581eb555739e30aafdb5830c463e34f4ac2b3d119078b
MD5 638ae2ec9c4f6760b8072a370eabbefc
BLAKE2b-256 414915782d92ddfaf187e03a660887bf962be96446afbe11cc15a02e7afa634c

See more details on using hashes here.

File details

Details for the file content_foundry-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: content_foundry-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 411.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for content_foundry-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95ec350d96e11c4ddd83885c99fb8ca66db48792078a357cc49d3ab8103912f6
MD5 9668b7dd81b7f7f2947825acb79d30d7
BLAKE2b-256 9a657f8b78441b790e6ddadde2bcd386d5df43a1c37b7f118554d7d8e8455135

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page