
AttentionOS
A self-hosted, agent-driven content pipeline for short-form video: research → strategy → scripting → editing → publishing → engagement → measurement, with a feedback loop into the next cycle. Agents run on Claude Code (your own Claude plan) or the Anthropic API. Every public action is gated by deterministic validators and per-agent autonomy levels.
- License: MIT
- Status: v0.1, under active development. Expect frequent updates, and breaking changes to config and schema until 1.0
- Stack: TypeScript (Node 22.18+, ESM, strict), Postgres 16+ with pgvector (17 in the Docker stack), Python 3.12 media sidecar, Docker Compose, MCP
Why we're sharing it now. The workflows in AttentionOS have already generated millions of views, and they're useful today, so we're opening them up rather than waiting for a polished 1.0. The repo gets frequent updates: new modules, providers, fixes and docs land often. Run ./aos update to stay current, watch the repo for releases, and see Report an issue if something doesn't work for you.
Architecture
┌──────────────────────────── learn ◄─────────────────────────────┐
▼ │
research ─► strategy ─► scripting ─► (human films) ─► editing ─► publishing ─► community ─► analytics
┌──────────── docker compose ──────────────────────────────────────────────────────────────┐
│ │
│ attentionos (one image) postgres (pgvector/pg17) │
│ ├─ studio Next.js dashboard :4747 ◄──┐ ├─ facts, queues, metrics │
│ ├─ worker jobs, schedules, webhooks ├── SQL ──────►├─ knowledge_chunks (RAG) │
│ ├─ mcp MCP data server │ └─ not published to host │
│ ├─ runner claude -p | Anthropic API ───┘ │
│ └─ media-py ASR, cuts, render, QC │
│ │
│ /workspace ◄── bind mount: Brand Kit + config (plain files, yours, git-friendly) │
└──────────────────────────────────────────────────────────────────────────────────────────┘
- State split. Taste and policy live in the workspace as plain files (the Brand Kit:
brand/voice.md, audience, offers, lanes, proof, house style, lessons). Facts and queues live in Postgres, always scoped by workspace_id.
- Code holds the gates. Script, caption, keyword and payload validators in
packages/guardrails are deterministic and can't be edited by the LLM at runtime. A claim ledger rejects numbers that aren't backed by the proof inventory or a cited source.
- Untrusted input isolation. Extraction and classification jobs marked
toolless run without tools or MCP access, and structured outputs are schema-validated (Zod v4). Other agents can read web content and workspace files; this is not a sandbox against every prompt-injection attack. Run the supplied container with only your intended workspace mounted and review public actions.
- Provider interfaces. Modules depend on
packages/core/src/providers.ts, never on vendor SDKs. Each vendor is its own adapter package.
- Outlier scoring. Every post, yours or a competitor's, is scored as
x against that account's rolling median. Remixes record their source; structure is reused, wording isn't.
- Autonomy. Each agent runs at
review_all, review_key or autopilot. Nothing public ships above the configured level.
- Lessons. A correction becomes a dated rule in
brand/lessons.md that every agent loads.
Deeper: docs/architecture.md · ADRs
Requirements
| |
|---|
| Host | macOS or Linux (Debian/Ubuntu tested). Windows via WSL 2 (notes). 4 GB RAM minimum, 8 GB recommended; ~10 GB disk |
| Docker | Engine 24+ with Compose v2 (OrbStack or Docker Desktop on macOS) |
| LLM | Claude Pro/Max plus a claude setup-token OAuth token (default), or ANTHROPIC_API_KEY with runner.engine: "api" |
| Data providers | Apify (competitor/own-post scraping) and/or Zernio (publishing, inbox, first-party analytics). Optional at boot |
| Optional | Telegram or Discord bot (notifications, approvals, chat) |
Install
This gets a working stack in about 30 minutes, most of it the first image build. The full guide, with servers, backups, Windows and troubleshooting, is docs/install.md.