Anchorcast
A Python client for real-time media streams generated by pluggable models.
Early (
0.1.0). The session / model / source interface is the point. Expect it to move.
Install
pip install anchorcast
From git:
pip install git+https://github.com/scrollmark/anchorcast.git
For local development:
git clone https://github.com/scrollmark/anchorcast.git
cd anchorcast
python3.11 -m pip install -e ".[dev]"
python3.11 -m pytest
Requirements: Python 3.11+, ffmpeg on PATH (for last-frame continuity), and a fal key if you use the H3 Max adapter (FAL_KEY or FALAI_API_KEY).
Quickstart
from pathlib import Path
from anchorcast import Brief, Character, QueueSource, Session
from anchorcast.models import H3Max
source = QueueSource()
session = Session(
model=H3Max(),
character=Character(
name="Bear",
image=Path("bear.png"),
visual_prompt="Hand-drawn stuffed bear on cream paper.",
voice_prompt="warm, unhurried cadence",
),
source=source,
workdir=Path(".anchorcast"),
)
source.submit(
Brief(
id="rates",
topic="mortgage rates",
talking_points=("Why are mortgage rates still so high?",),
citations=("https://example.com/rates",),
priority=10,
)
)
for event in session.run(max_segments=1):
print(event.segment.path, event.segment.brief.topic)
A Brief is the next beat of the stream. The session asks the source for one, asks the model for a clip, and keeps a small generate-ahead buffer so you do not mint faster than the playhead.
Core types
| Type | Role |
|---|---|
Brief |
Topic, talking points, citations, priority |
Character |
Seed still, visual prompt, voice description |
Model |
generate(request) -> Segment. H3Max ships first; swap the adapter to change models |
Source |
next_brief(playhead) -> Brief | None |
Continuity |
Which still starts the next clip (LastFrameContinuity or IdentityContinuity) |
Session |
Buffer, pacing, event stream |
Sources
QueueSource— explicit briefs, ordered bypriorityFeedSource— RSS/Atom mapped to cited storiesIdleSource— character bits that make no news claims
When the queue is empty, pass idle=IdleSource(character) so the session can keep breathing without inventing facts.
Custom model
from anchorcast.types import GenerateRequest, Segment
class MyModel:
def generate(self, request: GenerateRequest) -> Segment:
# write a video to request.output_path
return Segment(
path=request.output_path,
duration=15.0,
generated_in=1.0,
brief=request.brief,
)
Custom source
from anchorcast.types import Brief, Playhead
class WebhookSource:
def next_brief(self, playhead: Playhead | None = None) -> Brief | None:
return self._take_from_queue()
YouTube Live, Twitch, TikTok Live, and Super Chats are a later backend. That layer should map platform events into Briefs and submit them to a QueueSource. It does not belong in this client.
Status
- Generate-ahead
Sessionwith a pluggable model and source - fal MiniMax H3 Max adapter (
minimax/h3-max/image-to-video) - Feed, queue, and idle sources
- Last-frame continuity via ffmpeg
Not yet: RTMP output, hosted APIs, or platform chat integrations.
Example app
examples/literary_bear is a continuous 1926 literary-bear news stream (Shepard, not Disney). Each clip is the next fifteen seconds of one monologue, not a fresh "oh bother" cold open.
python3.11 -m examples.literary_bear --dry-run # scripts only
python3.11 -m examples.literary_bear # local player at http://127.0.0.1:8765
--llm or OPENAI_API_KEY writes spoken lines with gpt-5.6-luna. --no-llm forces the rotating templates.
Development
python3.11 -m pip install -e ".[dev]"
python3.11 -m pytest
License
MIT. See LICENSE.
The example still under examples/characters/literary-bear/ is an E. H. Shepard illustration from Winnie-the-Pooh (1926), U.S. public domain. It is not Disney, and this project is not affiliated with Disney.
Release files for anchorcast 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anchorcast-0.1.0.tar.gz | 2.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anchorcast-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / anchorcast-0.1.0.tar.gz
| Download URL | anchorcast-0.1.0.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
236dd31e5811152117c589026631ea2584c6e0b16545afc98dc52de9ea4bf86e
|
|
BLAKE2b-256 checksum How to use checksums |
014d7ac45a5f4ebb894380c026dca85b169f45178e9c50733b40b4b1a4135220
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / anchorcast-0.1.0-py3-none-any.whl
| Download URL | anchorcast-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05913b9830f8c7320650c34832faa17d26cf73436216f3861ec657d99f34d680
|
|
BLAKE2b-256 checksum How to use checksums |
c72f9b662c4400ae7397453a7406654c3f12519ec9ab84d618f2f763a60c66dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log