Skip to main content

A resumable multi-agent pipeline that researches, writes, judges, narrates, and renders long and 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.1.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.1-py3-none-any.whl (411.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: content_foundry-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 428127e8473f6c93862f60106767d425792e26754f52b044efdb2dd3201a1d54
MD5 80de14be506f1552a38b555fa95f8145
BLAKE2b-256 200d7a1f445275fd1437f05cbab469924f9e4de131ac1e972ab69f3d11203a94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: content_foundry-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0a6afdd1ec7a94c8df0ad7b6afeb188976f01ab45ea34fa829792f9ac9c3522
MD5 2de0ea584a2ce57123903d49747f55d7
BLAKE2b-256 23eef8703c14785046861384de0b50084f42a1d05806da1e54299cca022a8fe3

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