Skip to main content

Website summarization agent use case

summarization agent project banner

Start a new project using a website summarization agent use case example.

Python SDK

Website summarization AI agent project example

Clone this repo

Use case

Looking for a simple and reliable AI agent to summarize websites?

Resonate makes it simple to create a recoverable, procedural workflow that can summarize websites and optionally wait for human confirmation.

Quick example

@resonate.register
def download_and_summarize(ctx: Context, params: dict) -> str:
url = params["url"]
usable_id = params["usable_id"]
email = params["email"]

# Download the content from the URL and save it to a file
filename = yield ctx.lfc(download, usable_id, url).options(durable=False,non_retryable_exceptions=(NetworkResolutionError,))
while True:
# Summarize the content of the file
summary = yield ctx.lfc(summarize, filename)

# Create Durable Promise to block on confirmation
promise = yield ctx.promise()

# Send email with summary and confirmation/rejection links
yield ctx.lfc(send_email, summary, email, promise.id)

# Wait for summary to be confirmed or rejected / wait for the promise to be resolved
confirmed = yield promise
if confirmed:
break

return summary