Integrate

Monitor web changes with CrewAI

CrewAI orchestrates agents and tools well, but a crew has no way to notice that a docs page, a pricing table, or a regulatory filing changed. Hypeline gives it one: a clean, deduplicated stream of genuinely-new-content events. Wrap it as a custom Tool the agents call, or trigger a whole crew from a signed webhook.

The mental model: a Tool the crew can call

An agent inside a crew is invoked on demand, so it fits the pull pattern. You expose two thin tools over Hypeline: one that starts watching a URL and returns a cursor, and one that fetches deduplicated changes since a cursor. The agent decides when to call them. A long-running crew can also subscribe to the stream, but the tool shape is the most natural way to hand a crew eyes on the web.

Wrap Hypeline as a custom Tool

tools.py
# pip install hypeline crewai
from crewai.tools import BaseTool
from hypeline import Hypeline

hy = Hypeline("hype_...")

class WatchSource(BaseTool):
    name: str = "watch_source"
    description: str = "Start watching a URL for genuinely-new content. Returns a cursor."

    def _run(self, url: str) -> str:
        watch = hy.create_watch(url)
        return f"watching {url} cursor={watch.cursor}"

class GetChanges(BaseTool):
    name: str = "get_changes"
    description: str = "Fetch deduplicated changes since a cursor. Returns titles and URLs."

    def _run(self, cursor: str) -> str:
        page = hy.get_changes_since(cursor=cursor)
        lines = [f"{e.title}: {e.url}" for e in page.events]
        return "\n".join(lines) or "no new changes"

The hypeline client is a thin wrapper over the HTTP API: create_watch is POST /v1/sources and get_changes_since is GET /v1/events, so the same calls work from plain curl if you prefer.

Hand the tools to an agent

crew.py
from crewai import Agent, Task, Crew
from tools import WatchSource, GetChanges

analyst = Agent(
    role="Competitive analyst",
    goal="Notice and summarize real changes on tracked pages",
    tools=[WatchSource(), GetChanges()],
    backstory="Watches rival pricing and changelog pages for the team.",
)

watch = Task(
    description="Watch https://competitor.example/pricing, then report any genuinely-new content.",
    agent=analyst,
    expected_output="A short note per real change, with the source URL.",
)

Crew(agents=[analyst], tasks=[watch]).kickoff()

Or trigger a crew from a signed webhook

For a crew that should run the moment something changes, deliver events by webhook instead of polling. You create an alert (POST /v1/alerts with a filter and the sources to watch), then add a webhook destination to it (POST /v1/alerts/{alert_id}/destinations with a body whose kind is webhook and url is your endpoint), which returns a whsec_ signing secret once. Point that destination at a small endpoint, verify the HMAC signature, then call kickoff with the event as input. This keeps the crew idle until there is real work.

Why Hypeline, not a page-change checker

  • Deduplicated on extracted content. Fingerprinting the extracted main text filters template and timestamp churn, so a tool call returns real changes, not raw diffs.
  • One schema across every source. Feeds, watched pages, and streaming sources return the same event shape, so a single tool covers them all.
  • Cursor resume. The crew hands back the cursor it last saw, and the next call returns strictly newer changes, so nothing repeats.
  • Signed events. Content-layer Ed25519 signatures and HMAC-signed webhooks let the crew trust the input it acts on.
FAQ

Frequently asked questions

Should the crew use a tool or a webhook?

Use a tool when an agent should pull changes as part of its reasoning, and a webhook when a change should start a crew from idle. Both consume the same deduplicated events; pick by whether the crew is on demand or event driven.

What does get_changes return?

Deduplicated changes since the cursor you pass, each with a title, source URL, extracted content, and timestamps, plus a next cursor to resume from. You control the filter with keywords when you watch or when you poll.

Can one crew watch many sources?

Yes. Add as many watches as you need; per-source adaptive scheduling checks active sources often and backs off quiet ones, while respecting robots.txt and rate limits. The crew still sees one merged stream of changes.

Does the agent need to scrape pages itself?

No. Hypeline fetches, renders JavaScript pages when needed, extracts the main content, and deduplicates, so the tool returns clean changes and the crew never runs a scraper.

Give your agents eyes on the web

Add your email and we'll tell you the moment your agents can start watching the web live.

No spam. One email when it goes live.