Skip to content

resonatehq-examples/example-website-summarization-agent-py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resonate example app readme banner

Website summarization agent

summarization agent banner

Resonate Python SDK

This is an example website summarization application built with:

  • Flask: web server that handles HTTP requests
  • Resonate: framework for distributed & concurrent applications
  • Beautiful Soup: web scraper
  • Ollama: LLM that summarizes content

This application uses uv as the environment and package manager.

Prerequisites:

  • Make sure you have Ollama installed and running llama3.1
  • Make sure you have a Google Chrome browser running.

Running the application:

When running this application locally, you will use 4 separate terminals, each running its own process in a distributed application connected over a network.

Run a local Resonate Server:

brew install resonatehq/tap/resonate
resonate serve

In another terminal, install dependencies:

uv sync

Run the HTTP gateway service:

uv run gateway

In another terminal, run a summarization application node:

uv run app

From another terminal, summarize a website:

curl -X POST http://localhost:9000/summarize -H "Content-Type: application/json" -d '{"url": "https://resonatehq.io", "email": "[email protected]"}'

You will be prompted from the application node terminal to accept or reject the summarization.

  • Accepting will complete the workflow.
  • Rejecting will invoke another summarization attempt.

About

Durable summarization app in Python with Resonate, Flask, and Ollama

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 100.0%