Content OS

Learning Agent

✅ Built — live. Three sub-agents shipped; further sub-agents remain open.

Back to the agent roster · Marketing OS


What it does

Watches what the system and the team actually do — which sources yield real articles, what reviewers reject and why, which compliance advice gets accepted or dismissed — and turns those observations into durable, citable knowledge the other agents consume. It is the agent that makes the others improve with use.

Why an agent

Counting events is deterministic. Inferring a pattern — "this reviewer dismisses market-risk findings on explainer content", "this source's real articles live under /news/ and everything else is product junk" — is judgment.

What shipped

Three sub-agents, all live in apps/backend/src/ai/agents/learning/:

1. Source Profiler (source-profiler/, prompt source-profiler-v3)

One-time, verified scrape rules per news source, replacing blind heuristics. A worker (jobs/source-profile-worker.ts) claims unprofiled or stale sources; the service gathers evidence (listing, feed probes, sitemap, sample articles through the real extraction chain), the agent proposes rules, and every model claim is verified before it may steer the crawl — CSS selectors against sampled pages, URL-date regexes against real URLs; what fails is dropped. v3 adds a separate sample judge call (the model never grades its own patterns) so a share-price page that extracts cleanly still doesn't count as an article, and patterns verified on the source's own samples become an allowlist with no generic fallback. Competitor sources (blogs/sites) profile through the same path. Three consecutive dry crawls flip a profile to stale for automatic re-profiling; every scrape logs whether and how the profile was used, and the Sources page shows a per-source report sheet with the verification proof. The worker stamps a heartbeat per tick and the unprofiled/stale count is a backlog gauge, so a stalled profiler is an alert on the monitor console.

2. Compliance Feedback (compliance-feedback/, prompt cfr-v1)

Learns from reviewer behaviour. Four signals land as durable events in content_compliance_feedback: article approve/reject (a reason is compulsory on reject — the shared reason dialog blocks a reasonless one, because it teaches nothing), blog finding dismissals, and CMS-gate acknowledgements. The aggregation service (modules/compliance/services/feedback-report.ts) hands those events to the agent, which writes one per-tenant pattern report, each pattern tagged user- or company-scope, surfaced on the Review Insights page. Read-only v1, deliberately — it never reaches a prompt and never suppresses a finding.

3. Creative Feedback (creative-feedback/, prompt cfl-v1)

Learns from how the team uses Campaign Creatives — passively. Almost every signal was already stored by the studio (every chat message, every plan's power, every version's parent, every star, every delete), so the new log keeps only what nothing recorded: downloads, storyboard gate actions, and a voluntary thumbs up/down with a reason on any edition card. A version is read as accepted when it is downloaded, starred, collected, thumbed up or left as the final version for a day, and rejected when it is superseded, deleted or thumbed down — explicit beats implicit. Deleted versions keep their bytes for 30 days, because a discarded picture is the learning corpus. The agent's report carries patterns (user- or company-scoped) and nudges — one dismissible "do this next?" chip when a version turns ready, matched deterministically — and the wizard shows "Usually" chips (the kept size and language sets per format, exact counts, no model). Rendered on Learning → Creative Insights. Nothing learned reaches a generation prompt.

All three sub-agents keep the three properties the original spec called for:

  • the learned thing is written into the intelligence layer, not a private store;
  • what the model proposes is verified or human-reviewed before it acts — the profiler drops unverified rules, the feedback report only advises;
  • it annotates, never suppresses — nothing learned may hide a finding.

The earlier prototype — compliance dismissals generalised into learned exceptions (see the compliance agent technical reference) — is still live and was the shape both sub-agents copied.

Still open

The general choice-event log — queue / publish / edit actions across every surface, and a performance reader that ties published results back to choices. Today's event logs cover the compliance-review and creative-studio surfaces; rejection reasons and creative thumbs are the first structured "what the team chose and why" signals, not the last. Further sub-agents (performance reader, feed reweighting proposals) remain proposed, as does feeding learned creative preferences into a prompt — today they only annotate.

Roadmap source

Page 6's three ES loops: learn from what we have done · scan competition · scan category — see roadmap_ref_extracted.md.

Design notes carried forward

  • Filter-bubble risk still applies to any future feed reweighting: it needs an exploration floor — a reserved share of the feed the model does not influence.
  • Adjustments must stay proposals a human accepts, never silent reweighting — the feedback report is read-only for exactly this reason.
  • Design + work logs live in the repo, outside this rendered tree: docs/plans/learning-agent-source-profiler.md and docs/plans/learning-agent-compliance-feedback.md.
Source: roadmap/marketing-os/agents/learning-agent/README.md