AgenticSocial is a Python-based application that leverages CrewAI and LitServe to summarize web content and generate engaging social media posts. It uses a combination of language models and tools to fetch, analyze, and summarize web pages, and then craft concise, shareable messages.
- Webpage Summarization: Extracts key insights from any article or webpage.
- Social Media Content Creation: Generates engaging Telegram messages or tweets from the summarized content.
- Configurable: Easily modify settings like the language model, API keys, and server configurations via
config.yaml.
- Python 3.8 or higher
- Required Python packages (see
requirements.txtor install dependencies as described below) - A valid API key for the Firecrawl tool
-
Clone the repository:
git clone https://github.com/your-repo/AgenticSocial.git cd AgenticSocial -
Install dependencies:
pip install -r requirements.txt
-
Set up the configuration file:
- Create a
config.yamlfile in the root directory (if it doesn't already exist). - Refer to the
load_configfunction inscripts/src/server.pyfor the default configuration structure.
- Create a
-
Ensure the
data/directory exists:mkdir -p data
-
Start the server:
python scripts/src/server.py
-
The server will start on the host and port specified in the
config.yamlfile (default:0.0.0.0:8000). -
Make a POST request to the
/predictendpoint with the following JSON payload:{ "url": "https://example.com/some-article" } -
The server will return a JSON response containing:
- The summarized content
- A crafted social media message
- The file path where the results are saved
The config.yaml file allows you to customize the following settings:
-
Language Model:
model: The model name (e.g.,qwen2.5)provider: The provider name (e.g.,ollama)base_url: The base URL for the language model API
-
API Keys:
firecrawl: Your Firecrawl API key
-
Server:
host: The host address for the serverport: The port number for the server
To summarize the webpage at https://aws.amazon.com/what-is/reinforcement-learning-from-human-feedback/, send the following request:
curl -X POST http://localhost:8000/predict -H "Content-Type: application/json" -d '{"url": "https://aws.amazon.com/what-is/reinforcement-learning-from-human-feedback/"}'The response will include the summary, social media message, and the file path where the results are saved.
scripts/src/server.py: Main server scriptdata/: Directory where results are savedconfig.yaml: Configuration file (not included by default; create it manually)
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to open issues or submit pull requests.
curl http://localhost:8080/queue/status
python3 scripts/src/scheduler/processor.py --now