Briefcast: How I Built a Personal AI Intelligence Agent That Reads the Entire AI Ecosystem — For…
From the publisher’s feed, collected in the ZeroLabs newsroom.
Briefcast: How I Built a Personal AI Intelligence Agent That Reads the Entire AI Ecosystem — For approx $10/MonthA deep technical breakdown of building a production-grade, fully automated AI briefing pipeline with ranking, RAG, prompt caching, citations, and real architectural decisions documented along the way.Photo by Roman Kraft on UnsplashEvery morning at 09:00, a Telegram message arrives. Ten items. Ranked. Cited. Delivered without me lifting a finger.It covers what actually mattered in AI over the past 24 hours — across Google DeepMind, OpenAI, Anthropic, Meta AI, Hugging Face, Microsoft AI, NVIDIA, and arXiv. If I want to know more about any of it, I just ask the bot a follow-up question and get a grounded, sourced answer in seconds.That system is Briefcast — an open-source personal AI intelligence agent I designed, built, and deployed. This article is the complete technical breakdown: every architectural decision, every trade-off, every real number behind the system.Why I Built ThisKeeping up with AI in 2026 is not a content problem. Every lab, every researcher, every conference is publishing constantly. The problem is that none of the existing tools are built for signal extraction — they are built for volume delivery.Newsletters optimize for opens, not relevance. Twitter/X optimizes for engagement, not accuracy. RSS readers dump everything in your lap and call it productivity. None of them rank. None of them de-duplicate across sources. None of them let you ask a follow-up question at 8am when you see something interesting.I wanted one message, every morning, that told me exactly what mattered — composed by a system that understood the AI landscape, not just a chronological feed aggregator. I wanted citations on every claim. And I wanted to be able to ask follow-up questions from the same curated knowledge base that composed the briefing.So I built it.What BriefCast Does: The One-Line ViewSources → Ingest → Classify → Deduplicate → Summarise → Rank → Brief → AnswerEvery 6 hours: pull from 10 official AI sources, run a relevance filter, de-duplicate at two layers, summarize with Gemini Flash, embed with Nomic, score each article with a three-signal ranking formula, and persist to Postgres.At 09:00 IST daily: select the top 10 ranked articles (with diversity caps), compose a Telegram briefing with Claude Haiku, deliver.On demand: any message sent to the Telegram bot triggers a RAG query over the 14-day rolling knowledge base, answered by Claude Sonnet with mandatory inline citations.No scraping. No paywalled content. No full article bodies stored. MIT licensed. Costs ~$10/month to run.Architecture: The Full PictureBefore diving into each layer, here is the complete system diagram:Prepared using Mermaid.aiThe system runs as two separate Railway services sharing one Postgres database:- API Service: FastAPI, always-on, handles the Telegram webhook for incoming user messages and serves `/healthz`- Worker Service: APScheduler, handles the 6-hour ingestion cron and the 09:00 IST briefing cronSeparating them is a deliberate reliability decision I will come back to later.Layer 1: Sources and IngestionWhat Gets IngestedBriefcast monitors ten official sources across two tiers:Tier 1 — Google Family (highest priority):- Google AI Blog- Google Research Blog- Google DeepMind Blog- Google Cloud AI BlogTier 2 — AI Labs:- OpenAI, Meta AI, Hugging Face, Microsoft AI, NVIDIA, arXiv(Anthropic, Mistral, and Cohere are on the roadmap — no confirmed RSS feed URL yet.)All ingestion uses `feedparser` and `httpx` against official RSS/Atom feeds or the arXiv Atom API. No scraping. No fragile HTML parsing. No paywalled access. This is both a legal clarity decision and a reliability decision — official feeds don’t break when a site redesigns its layout.Step 1: LLM Relevance ClassificationBefore anything else happens, every fetched article title and snippet passes through a Gemini Flash relevance classifier — a lightweight YES/NO filter. This was added because broad RSS feeds occasionally surface off-topic content (a corporate blog posting about diversity initiatives, a Google Cloud post about billing). The classifier uses a deterministic prompt (temperature=0.0) to answer: “Is this AI-relevant?”A few important implementation details:- It runs after Layer 1 hash dedup and before the embed call — preserving the cost ordering: free check → cheap check → paid operations- It fails open: if the Gemini API returns an error, the article is treated as relevant and passes through. A transient API failure should never silently drop a real announcement- Cost: approximately $0.000001 per article — genuinely negligibleThe alternative — a hardcoded keyword list — breaks on anything outside its vocabulary: new model names, new companies, event-specific terms like “Project Astra” or “Google I/O 2026”. Every keyword list requires a code change to update. The LLM classifier adapts automatically.Step 2: Two-Layer DeduplicationArticles that pass the relevance filter go through de-duplication. This is two-layer because each layer catches what the other misses at a different cost point.Layer 1 — SHA-256 URL hash (O(1), zero API cost)A database lookup by URL hash. Catches exact re-fetches of the same article across ingestion cycles. Fast, free, always runs first.Layer 2 — Cosine similarity against recent title embeddingsCompares the incoming article’s title embedding against a rolling window of the 500 most-recent stored article embeddings. Threshold: 0.92. This catches semantic duplicates — when five different AI blogs cover the same paper with different URLs and slightly different titles.A crucial implementation detail: the comparison uses the incoming title against stored summary embeddings, not the incoming full text. At dedup time, the summary doesn’t exist yet — generating it would cost an API call that gets discarded if the item is a duplicate. Titles carry enough semantic content to catch near-duplicates at a fraction of the cost.Why 0.92 specifically?The threshold was chosen deliberately, not arbitrarily.At 0.85, it is too aggressive — “Gemini 2.5 released” and “Gemini 2.5 benchmark results” are genuinely distinct stories but share enough semantic content to collide, silently dropping valid articles.At 0.95, near-paraphrase duplicates from syndicated sources slip through, diluting the briefing. 0.92 is the conservative starting point; the right value should be calibrated against a labeled set of 50–100 duplicate/non-duplicate pairs, which is the first eval task planned for v1.5.Step 3: Circuit BreakerThree consecutive fetch failures marks a source as `degraded` and fires an immediate Telegram alert. One failure is too sensitive — a transient 503 trips a healthy source. Five failures means 30 hours of stale data before alerting. Three is the minimum that filters transients without accumulating significant lag.This is how pipelines fail quietly. Without this, a broken source just stops contributing to the briefing and you notice two weeks later when you wonder why you haven’t seen any NVIDIA updates.Layer 2: ProcessingSummarization and Storage ModesEach article that clears dedup goes through Gemini Flash summarization via OpenRouter. The prompt generates a tight 3–5 sentence summary — approximately 100–150 tokens.Briefcast doesn’t store full article bodies. Ever. This is both an ethical design choice (attribution-respecting ingestion) and a practical one. A concise 3-sentence summary eliminates noise, boosts semantic signal per token, and produces a tighter embedding than a full 2,000-word article. The trade-off: fine-grained keyword retrieval suffers if a user asks about a specific number or quoted phrase. This is why hybrid BM25 is on the roadmap — add keyword matching once there is evidence that vector recall alone is the bottleneck.Storage modes are handled differently by content type:- Mode A (blog posts): Gemini Flash generates a 3-sentence plain-English summary. Stored as `storage_mode = “summary_metadata”`.- Mode B (arXiv): The raw abstract is stored directly. arXiv programmatic access is designed for this. Stored as `storage_mode = “abstract_metadata”`.A subtle consequence: Mode A produces summaries in a consistent plain-English voice; Mode B produces formal academic register. Both land in the same pgvector embedding space. In practice, `nomic-embed-text-v1.5` handles both registers well enough. If retrieval evaluation shows arXiv results clustering away from blog results on semantically similar queries, the fix is to route arXiv abstracts through the same Gemini Flash summarization pipeline.Why “Traditional RAG Chunking” Doesn’t Apply HereA common question in code reviews: why isn’t there a RecursiveCharacterTextSplitter at the heart of the processing pipeline?Because there is nothing to chunk. The unit of storage is a generated summary (~150 tokens) or an arXiv abstract (~200 tokens). The summary is the chunk. The RecursiveCharacterTextSplitter(chunk_size=800, overlap=100) in the code base is reserved for Mode C — fetch-process-discard of permissive license PDFs — which is never triggered in v1.This is an intentional departure from the standard RAG textbook that actually improves retrieval quality for this use case.EmbeddingAfter summarisation, nomic-embed-text-v1.5 via the Nomic API creates a 768-dimensional vector from the summary. This gets stored in Postgres alongside metadata: URL, title, summary, score, dedup hash, and storage mode.Nomic was chosen over local embedding models for one specific reason: Railway Hobby instances have limited RAM. Running a local embedding model (sentence-transformers, E5, etc.) at 768 dimensions with batch inference takes 1–2GB RAM that the Hobby plan doesn’t have headroom for. The Nomic free tier (1M tokens/month) is more than sufficient, introduces zero RAM overhead, and uses the `same nomic-embed-text-v1.5 model that can later be run locally if needed — no embedding space migration required.Layer 3: RankingAfter each ingestion cycle, every article in the rolling corpus gets rescored with a three-signal formula:score = tier × 0.35 + recency × 0.35 + novelty × 0.30The Three SignalsTier (0.35) — source priority. Google AI family (Tier 1) scores 1.0. Major AI labs (Tier 2) score ~0.7. arXiv scores ~0.5. This is an explicit editorial decision: align the briefing with where the most impactful model and research announcements land. The weights were chosen by priority ordering, not statistical optimization.Recency (0.35) — time decay over 14 days. A freshly ingested article scores 1.0; an article from 14 days ago scores 0.0. Tier and recency are equally weighted because both are load-bearing: a Tier 1 article from 13 days ago should not beat a fresh Tier 2 breakthrough. The 14-day rolling window was chosen because 7 days loses important multi-day stories, and 30 days crowds the vector space with older content that dilutes retrieval precision.Novelty (0.30) — pairwise uniqueness:novelty[i] = 1 - max(cosine_similarity(embedding[i], embedding[j])) for all j ≠ iThis is O(n²) in the number of articles. At the typical 14-day rolling window size of 200–500 articles, this runs in under one second in NumPy. It becomes a concern above ~5,000 articles — at that scale, switch to approximate nearest neighbor (FAISS / ScaNN) or sample the comparison set.Novelty gets slightly less weight than tier and recency (0.30 vs 0.35) because it is the noisiest signal. Pairwise cosine similarity across a corpus of 100+ articles is a rough proxy for uniqueness that benefits from calibration against real relevance labels.Ranking vs Selection: Two Different SystemsAn important distinction that is easy to miss: ranking is a global score; selection is a slot allocation. They run at different times and serve different purposes.Ranking happens after every ingestion cycle and assigns a score to every article in the corpus. Selection happens at briefing time and picks which articles actually go into the message, with diversity caps: maximum 4 from the Google family, maximum 2 from any other single company.A conflict scenario makes this clear: suppose Google publishes 6 articles in a day, all scoring above 0.8. The ranker correctly scores them highest. The _select() diversity cap then allocates only 4 Google slots and gives the 5th and 6th positions to the highest-scored non-Google articles. This is the desired behavior. Ranking determines which Google articles win their slots; it doesn't determine whether Google dominates the entire briefing.One more thing worth noting: the ranking score is deliberately not used as a retrieval signal in RAG. The ranking score is a freshness + provenance signal. For RAG, what matters is semantic distance between the query embedding and the article embedding. A highly ranked article that is semantically irrelevant to a user’s question should not appear in their answer. The two systems serve orthogonal goals.Layer 4: Daily BriefingAt 03:30 UTC (09:00 IST), the APScheduler cron triggers briefing composition.The briefing window is 36 hours, not 14 days. This is different from the ranking and retrieval windows, and the reasoning matters. The briefing is a daily news digest — it should only contain articles published since the previous briefing. Using the full 14-day window caused high-scoring Tier 1 articles to reappear on consecutive days (their recency score decays slowly at first: a day-old article still scores ~0.93). The 36-hour window is 24h + a 12-hour buffer to absorb ingestion lag — if an article is published at 11pm and ingestion runs every 6 hours, it might not land in the DB until the next cycle.Claude Haiku composes the Telegram-formatted HTML briefing. The prompt enforces:Exactly 10 items from the selected top articlesMandatory inline citations on every claim (links back to the original source)Telegram HTML format (bold, links, clean character count under 4,096)Consistent daily toneWhy Haiku and not Gemini Flash? The briefing is the user-facing product — it is read every day and its tone shapes the product’s personality. In blind writing quality evaluations, Claude output is preferred ~47% of the time vs Gemini’s ~24%. Haiku is the cheapest Claude model. The cost delta vs Gemini Flash at this usage volume is approximately $0.001/day — genuinely negligible. Writing quality is not interchangeable here.Sample briefReal output delivered to Telegram at 09:00 IST — company drill-down buttons appear below the briefingLayer 5: RAG Query-BackAny non-command message sent to the Telegram bot triggers the RAG path. This is where Briefcast stops being a briefing agent and starts feeling like a research assistant.The Retrieval PathUser message → Nomic embed (768-dim) → pgvector cosine search (k=10, 14-day window) → Claude Sonnet → reply with citationsA few implementation details:Why cosine distance and not dot product or Euclidean (L2)?nomic-embed-text-v1.5 embeddings are not normalized to unit length. Dot product is magnitude-sensitive — a longer document's embedding (higher magnitude) would score higher regardless of semantic relevance. Cosine normalizes by magnitude, making it a pure angular similarity measure. L2 penalizes both angular difference and magnitude difference, which is unsuitable for variable-length text embeddings. Cosine is the correct choice.Why k=10?At k=3, the model gets insufficient context for multi-source synthesis. If the three retrieved articles come from one source or cover one angle of a broad question, the answer will be narrow. At k=20, the signal-to-noise ratio drops — articles 11–20 ranked by cosine similarity are often only marginally relevant, and feeding them to the LLM increases the risk of tangential content diluting the answer. k=10 is the standard starting point for a corpus of this size; calibrate against retrieval recall@k once labelled QA pairs exist.What happens when there’s no relevant content in the 14-day window?The retriever returns its top-k by cosine distance regardless — it has no minimum relevance floor. The responder’s system prompt explicitly instructs the model to declare when retrieved documents do not support the query. Without this instruction, the LLM will hallucinate an answer from training data. This is a prompt engineering responsibility, not a retrieval responsibility. Citations are mandatory so the user can verify what was and was not actually in the corpus.Why Claude Sonnet for RAG?RAG responses carry the highest hallucination risk in the system. The model must synthesize across multiple retrieved articles, attribute claims to specific sources, and decline to answer when evidence is insufficient.Haiku is prone to over-generating on low-evidence queries — producing confident-sounding answers that go beyond what the retrieved documents support. Sonnet’s instruction-following on citation and grounding constraints is materially stronger. The higher cost (~$3/M input tokens vs $1/M for Haiku) is justified because RAG is user-interactive, not batch. You are paying for quality on the queries that matter most.The Model Strategy: Why Three Different ModelsThis is one of the most common questions when reviewing the architecture. The honest answer is that using one model for everything would mean either overpaying on batch summarization or under-investing on the Q&A layer that users actually interact with.Could you run the entire pipeline on a single model? Yes. Using Gemini Flash everywhere cuts cost to ~$0.50/month. The real cost is quality degradation at the briefing and RAG layers. The three-model split maps each task to its cost-quality optimum — and OpenRouter makes this zero-ops overhead. One API key, one billing account, one parameter change to swap any model.Prompt Caching: Cutting RAG Costs 90%This was added as ADR 010 and is worth a dedicated section because it is a concrete, measurable optimization.Every RAG query sends the same static system prompt (~150 tokens) plus a variable context block of up to 10 retrieved articles (~1,200–1,500 tokens). Without caching, the full input token count is billed at $3.00/M on every query.The system prompt never changes between queries — it is a fixed set of behavioral rules: citation format, answer length, output format, hallucination guard. This is a perfect candidate for Anthropic’s prompt caching API.Pricing (as of May 2026):Cache write: $3.75/M tokens (~25% premium, paid once per 5-minute TTL windowCache read: $0.30/M tokens (~90% reduction vs normal input)Normal input: $3.00/M tokensThe saving per cache-hit query on the 150-token system prompt:(3.00 − 0.30) / 1,000,000 × 150 ≈ $0.000405 per querySmall per query, but every RAG call captures it. Break-even is 2 queries within a 5-minute window — after that, every query in the window pays the read price.Implementation detail: ChatPromptTemplate cannot attach cache_control to a message's content array — it only interpolates strings. The implementation therefore constructs SystemMessage / HumanMessage objects directly and passes the anthropic-beta: prompt-caching-2024-07-31 header via OpenRouter. LangSmith tracing is unaffected — _llm.ainvoke(messages) on a LangChain LLM is traced identically to the LCEL pipe syntax it replaces.Cache hits and misses are tracked separately in structured logs: cache_read_tokens billed at $0.30/M, cache_write_tokens billed at $3.75/M, remaining input_tokens at $3.00/M. Cache effectiveness is visible in the responder.done log line without opening LangSmith.Tech StackKey Architectural Decisions and WhyWhy pgvector over Pinecone (ADR 001)Each major decision in Briefcast is documented as an Architecture Decision Record (ADR) — a short file capturing the context, the decision, and the consequences. ADRs live in decisions/ in the repo.A separate vector database adds infrastructure overhead and removes the ability to join metadata and vectors in a single SQL query. At under 1M vectors, Postgres with pgvector handles both concerns with zero additional services. One database, one connection string, SQL joins between article metadata and vector scores, simpler ops. The right trigger to reconsider: you exceed 1M vectors, or you need vector operations that pgvector can’t serve (filtered multi-vector search, advanced HNSW tuning).Why APScheduler over Celery (ADR inline)At this scale — two cron jobs, one user — a separate queue service (Celery + Redis) adds ~$10–15/month in Railway services, a separate worker process, and a broker to operate. APScheduler runs in the same Python process as the worker, costs nothing extra, and is sufficient for jobs that run every 6 hours and once daily. The right trigger to migrate: jobs start running longer than 10 minutes, or the need arises to run the same job across multiple concurrent workers.Why Two Railway Services, Not One (Reliability)If the Worker OOMs on a large ingestion cycle (embedding 200 articles sequentially), the FastAPI webhook handler — which handles incoming Telegram messages — stays alive. In a shared process, a runaway worker job would make the bot unresponsive. The API service needs low-latency always-on availability; the Worker needs burst memory during ingestion cycles. Separating them is a separation of failure domains, not just a nice-to-have.Why LangChain is Used in Exactly One FileLangChain is in the dependencies but only in app/rag/responder.py. The RAG query path uses LangChain's ChatOpenAI with SystemMessage / HumanMessage objects constructed directly and invoked via _llm.ainvoke(messages). This gives automatic LangSmith tracing of the full prompt → generation step — ainvoke on a LangChain LLM is traced identically to LCEL pipe syntax.Direct message construction (rather than ChatPromptTemplate) is required here because prompt caching needs cache_control attached to the system message's content array, which string-interpolation templates cannot express.Everything else — summarization (50–200 calls per ingestion cycle), briefing composition, embedding — uses raw httpx. LangChain adds abstraction overhead to batch jobs without adding any value over a direct API call. It is justified only where per-query trace visibility matters: seeing exactly what context was retrieved and fed to the model for a given user question.Why not LangGraph? LangGraph is justified when the pipeline has real conditional branching requiring a stateful graph. In v1, every path is linear and deterministic: embed → retrieve → generate. LangGraph would add dependency, a learning curve, and graph state management overhead for zero architectural benefit. It becomes the right tool when the query agent needs a validator node and retry loop.Why Citations Are Enforced at the Prompt Level (ADR 004)Every daily briefing and every RAG answer must include source attribution. This is enforced in the system prompt. In v1, there is no structural validation — if Sonnet generates an answer without citations, the system doesn’t catch it. The correct enforcement mechanism (planned for v1.5) is output validation: parse the response for tags and fall back to a retry or "no answer" response if none are found. The current approach trusts the model's instruction-following, which Sonnet is strong but not perfect at.Citations are not a formatting preference. They are the primary trust mechanism. If you cannot trace a claim to a source, you cannot rely on the system.Why Telegram Over Slack (ADR 008)For a personal tool, Slack introduces OAuth, workspace provisioning, and app approval friction. Telegram is free, has no OAuth, supports webhooks cleanly, handles unlimited message history, and is available on every device. The right trigger to add Slack: the tool needs to be shared with a team.RSS and Official APIs Only (ADR 003)No scraping. This is simultaneously a legal clarity decision and a reliability decision. Official feeds are stable, attribution-respecting, and don’t break when a site redesigns its HTML. arXiv’s Atom API is purpose-built for programmatic access. The constraint keeps the ingestion layer simple, defensible, and maintainable without a headless browser or HTML parser.Observability: Two Separate ConcernsTwo independent observability systems, kept cleanly apart because they serve different purposes.LangSmith — RAG Trace VisibilityWhen LANGSMITH_TRACING=true, every RAG query is traced in full:The complete prompt sent to Claude Sonnet (including all 10 retrieved context articles)Token counts and latency per callRetrieved document visibility — exactly what context the model saw for a given questionThis is how you debug retrieval quality. When an answer looks wrong, you open LangSmith, find the query, and see whether the right articles were retrieved. It answers “was this a retrieval failure or a generation failure?” in seconds.LangSmith’s free developer tier covers 5,000 traces/month — more than sufficient for a personal tool.structlog — Cost LoggingEvery LLM call in the system logs to structured JSON:log.info("llm.call", model=model, task="summarise|briefing|rag", input_tokens=n, output_tokens=n, latency_ms=n, estimated_cost_usd=n, source=source_name)Running scripts/cost_report.py weekly aggregates spend by model and task. The prompt caching implementation adds separate cache_read_tokens and cache_write_tokens fields to the RAG log lines, making cache effectiveness visible without opening LangSmith.This is the mechanism that keeps the $8/month cost target honest. Pipelines fail silently — stale feeds, duplicate content slipping through, LLM cost creep from an unintended prompt expansion. Structured logging is what makes those failures visible before they compound.Required Environment VariablesOPENROUTER_API_KEY=NOMIC_API_KEY=TELEGRAM_BOT_TOKEN=TELEGRAM_CHAT_ID=DEDUP_THRESHOLD=0.92OPENROUTER_APP_REFERER=LANGSMITH_TRACING=trueLANGSMITH_API_KEY=LANGSMITH_PROJECT=briefcast-devLANGSMITH_ENDPOINT=https://api.smith.langchain.comCost BreakdownThe prompt caching implementation on the RAG layer (ADR 010) cuts the Sonnet input cost on the system prompt portion by ~90% for any two queries within a 5-minute window — the $2–3 OpenRouter figure already reflects this optimization.How to Run It YourselfLocal Setup# 1. Clone and installgit clone https://github.com/SID-SURANGE/briefcast.gitcd briefcastpython -m venv .venvsource .venv/bin/activate # Linux/macOS# .venv\Scripts\activate # Windowspip install -e ".[dev]"# 2. Configure credentialscp .env.example .env# Fill in all required env vars (see above)# 3. Start Postgres with pgvectordocker compose up -d db# 4. Apply migrationsalembic upgrade head# 5. Seed sources and run first ingestionpython scripts/seed_sources.pypython scripts/run_ingestion_once.py# 6. Start the serveruvicorn app.main:app --host 0.0.0.0 --port 8000 --reload# Verify: GET /healthz → {"status": "ok"}Deploying on RailwayRailway runs two services from the same repo sharing one Postgres database.Prerequisites:Railway account (Hobby plan, ~$5/month)Telegram bot token — create via @BotFatherOpenRouter API key — openrouter.aiNomic API key — atlas.nomic.ai (free tier)LangSmith API key — smith.langchain.com (free tier, optional)Step 1: Add a Railway Postgres plugin. Enable pgvector in the Postgres shell (one-time):CREATE EXTENSION IF NOT EXISTS vector;Step 2: Create the API service. Set start command:uvicorn app.main:app --host 0.0.0.0 --port 8000Step 3: Create the Worker service from the same repo. Set start command:python -m app.workerStep 4: Set all environment variables on both services (see above list).Step 5: Run migrations and seed sources locally, pointing DATABASE_URL at your Railway public Postgres URL:alembic upgrade headpython scripts/seed_sources.pyStep 6: Register the Telegram webhook once:https://api.telegram.org/bot/setWebhook?url=https:///telegramStep 7: Verify — GET /healthz → {"status": "ok"}. Trigger a manual ingestion, then send any message to your bot.Full deployment walkthrough with screenshots is in docs/railway-deployment.md.Repo Layoutbriefcast/├── app/│ ├── main.py # FastAPI — Telegram webhook + /healthz│ ├── worker.py # APScheduler — ingestion + briefing crons│ ├── config.py # pydantic-settings — all env vars, no secrets in code│ ├── db.py # SQLAlchemy engine + session│ ├── models/ # Article, Source (pgvector, soft-delete)│ ├── ingestion/ # fetcher, classifier, dedup, circuit breaker│ ├── processing/ # summariser (Gemini Flash), embedder (Nomic)│ ├── ranking/ # weighted ranker│ ├── briefing/ # composer (Claude Haiku)│ ├── rag/ # retriever (pgvector), responder (Claude Sonnet + caching)│ ├── delivery/ # telegram_bot.py (primary), slack_bot.py (v1.5)│ └── observability/ # structlog setup + cost logging helpers├── scripts/│ ├── seed_sources.py # seed source registry into Postgres│ ├── dry_run_ingestion.py # smoke-test without writing to DB│ ├── run_ingestion_once.py # one-shot ingestion against live DB│ └── cost_report.py # weekly LLM spend aggregated from logs├── docs/│ ├── architecture.md # full Mermaid diagram│ ├── POLICY.md # ingestion + storage policy│ ├── env-setup.md # local environment setup guide│ └── railway-deployment.md # Railway deployment walkthrough├── decisions/ # ADRs 001–010 + design-faq.md├── evals/ # RAG eval harness scaffold (v1.5)├── alembic/ # DB migrations (pgvector extension + full schema)└── tests/ # 32 tests — dedup, ranker, retrieverRoadmapThe v1 system is live and running daily. These are the next planned additions:Tier 3 sources — DeepSeek, Qwen, Kimi, MistralTier 4 newsletters — Import AI, Ahead of AI, The GradientHybrid BM25 + vector search — measure the pure vector recall baseline first; add BM25 only when recall is demonstrably the bottleneckRAG eval harness — 20 grounded Q&A pairs with source and citation checks; dedup threshold calibration against labelled pairsOutput validation for citations — parse Sonnet responses for tags; retry or return "no answer" if citations are absentGCP migration path — Cloud Run + Cloud SQL with the same Docker images, no code changesBriefing prompt caching — apply the same Anthropic ephemeral cache pattern to Claude Haiku if query volume growsSourceFull code, architecture docs, ADRs, design FAQ, deployment guide, and tests:👉 github.com/SID-SURANGE/briefcastBriefcast: How I Built a Personal AI Intelligence Agent That Reads the Entire AI Ecosystem — For… was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.