Skip to content
← Back to all pipelines

Daily News Digest

Fetch article URLs → summarize each → produce Markdown digest with 1-line summary per article + 3-bullet takeaways.

v1.0.0CompositionVerified
paralleldagsummarization
Setup — API key

Set one of these env vars before running locally. The CLI resolves $VAR via env-var substitution.

shell · bash
# Choose ONE provider
export MINIMAX_API_KEY="sk-..."      # default provider for these pipelines
# OR
export OPENROUTER_API_KEY="sk-..."  # OpenRouter (multi-model gateway)

Pipeline YAMLs use ${VAR:-default} syntax; runtime reads fromprocess.env at parse time. agentsmarket pipeline call returns a clear error if no key is found.

Install

Downloads Pipeline.yaml. R16 stub — server route pending.

CLI · bash
agentsmarket pipeline install daily-news-digest
Run locally

Executes the pipeline via the local CLI runtime. Use --mock for a dry-run (no API key needed).

CLI · bash
# Dry-run (no API key needed)
agentsmarket pipeline call daily-news-digest --local --mock

# Real run (uses one of MINIMAX_API_KEY / OPENROUTER_API_KEY)
agentsmarket pipeline call daily-news-digest --local

Inputs are passed via --inputs '<JSON>' or read from~/.config/agentsmarket/pipelines/daily-news-digest/inputs.json. See the pipeline YAML below for the input schema.

Pipeline YAML

Verbatim copy of packages/pipeline-runtime/pipelines/daily-news-digest.yaml. Verified end-to-end against mock LLM provider.

pipeline.yaml · yaml
# daily-news-digest — produces a morning digest from a list of article URLs.
#
# Demonstrates: multi-stage chain with `depends_on`, `uses:` skill@pin,
# structured_json output. The web_scraper skill must be registered on
# the marketplace before this pipeline can run on server.
#
# Run locally:  agentsmarket run pipelines/daily-news-digest.yaml --mock
# Publish:      agentsmarket publish-pipeline pipelines/daily-news-digest.yaml
name: daily-news-digest
version: 1.0.0
description: Fetch article URLs → summarize each → produce Markdown digest with 1-line summary per article + 3-bullet takeaways.
author_id: 0xYourAddress
license: MIT

inputs:
  urls:
    type: array
    required: true
    items: { type: string, description: "Article URL to fetch + summarize" }
  max_per_article_chars:
    type: integer
    required: false
    default: 4000
    description: "Hard cap on article text fetched (avoids huge pages)"

outputs:
  digest:
    format: text
    description: "Markdown digest, ready to email or paste into a doc"

defaults:
  model: MiniMax-M3

stages:
  - id: fetch
    uses: web_fetch@1.0.0
    input:
      urls: $input.urls
      max_chars: $input.max_per_article_chars
    output_format: text

  - id: per_article_summary
    provider: minimax
    depends_on: [fetch]
    system: ${NEWS_READER_TONE:-You write for a busy professional. Skip boilerplate, name tradeoffs, lead with new facts.}
    prompt: |
      For each article in this batch, write a 1-sentence summary focused on
      the new information (skip boilerplate, navigation, ads).

      Articles:
      ---
      $stages.fetch.output
      ---

      Format each summary as: `- [source](url): <one sentence>`.
      URLs come from $input.urls in the same order as the articles.
    output_format: text

  - id: takeaways
    provider: minimax
    depends_on: [per_article_summary]
    prompt: |
      From the per-article summaries below, extract the 3 most important
      cross-article takeaways for a time-pressed reader.

      Output a JSON object with exactly these three string fields:
        - `takeaway_1` (one sentence, the single most important takeaway)
        - `takeaway_2` (one sentence, second most important)
        - `takeaway_3` (one sentence, third most important)

      Reply with valid JSON only. No prose, no markdown fences.

      Summaries: $stages.per_article_summary.output
    output_format: structured_json
    fields: [takeaway_1, takeaway_2, takeaway_3]

  - id: digest
    provider: minimax
    depends_on: [takeaways]
    prompt: |
      Compose a Markdown morning digest with this structure:
        # Daily News — $today
        ## TL;DR
        - takeaway_1
        - takeaway_2
        - takeaway_3
        ## Stories
      followed by the per-article summary list.

      TL;DR items: $stages.takeaways.output
      Per-article list: $stages.per_article_summary.output
    output_format: text
Verification evidence

How do we know this pipeline actually runs?

Each pipeline in this catalog is gated by packages/pipeline-runtime/tests/examples-execution.test.ts— a mock-provider end-to-end test that runs the actual YAML through the real runPipelineV2 executor and asserts every stage produces output. The CI test suite reports results on every push.

What the test verifies:

  • YAML parses + has valid name/version/stages array
  • Every stage declares a non-empty id
  • All stage IDs are unique
  • runPipelineV2 executes without throwing
  • Every stage produces an output
  • Mock provider is called at least once per model stage
  • structured_json stages declare a non-empty fields array
  • Pipeline version pin enforcement (uses: foo@1.0.0 returns matching version)
Run it yourself

From the repo root:

shell · bash
pnpm --filter @agentsmarket/pipeline-runtime test examples-execution

# Expected: 16 tests pass (1 file × 16 it() blocks)
Author

by agents-market-demo