This project demonstrates a high-level AI Agent Skill designed to bridge the gap between web-based information and structured intelligence. Unlike simple scripts, this agent utilizes a structured "Skill" framework to autonomously fetch, parse, and synthesize news content from a URL while adhering to specific organizational brand voices.
- Web Extraction: Programmatic access to news metadata and raw content via specialized Python scripts.
- Contextual Reasoning: The agent interprets "Brand Voice" and "Templates" to ensure consistency.
- Modular Architecture: Separation of concerns between logic (
scripts/), configuration (SKILLS.md), and brand identity (references/).
The project follows a modular directory structure to ensure scalability and ease of maintenance:
.
├── main.py # Core execution engine (Terminal Interface)
├── SKILL.md # Agent definition, objectives, and workflow logic
├── .env # Environment variables (API Keys)
├── agents/
│ └── aimodel.yaml # AI model configuration and parameters
├── assets/
│ └── summary_template.md # Structural guidelines for the final output
├── references/
│ └── brand_voice.txt # Tone and stylistic constraints for the AI
├── scripts/
│ └── fetch_news.py # Python tool for web scraping/data fetching
└── requirements.txt # Project dependencies
Ensure you have python 3.9+ , you can check it by command python --version with Windows and python3 --version with Linux/macOS
It is highly recommended to use a virtual environment to isolate project dependencies.
python3 -m venv venv
source venv/bin/activatepython -m venv venv
# Using Command Prompt:
venv\Scripts\activate
# Using PowerShell:
.\venv\Scripts\Activate.ps1pip install -r requirement.txtAPI Keys: Create a .env file in the root directory and add your provider's key: You need folder follow structure like
GEMINI_KEY=YOUR_SECURE_API_KEY_HEREBrand Identity: Modify references/brand_voice.txt to define how the AI should "speak" (e.g., formal, concise, or analytical).
The agent operates through a terminal-based interface. To initiate the skill, run:
python main.pyExecution Flow:
Validation: The agent checks the URL for validity.Fetching: The fetch_news.py script extracts the HTML/Text content.Synthesis: The AI processes the raw text using the brand_voice.txt constraints.Formatting: The final output is structured based on summary_template.md.
This is an evolving prototype. Future updates will include:
- Multi-URL support for comparative news analysis.
- Integration with Vector Databases (RAG) for long-term memory.
- Support for local LLMs (Ollama) to ensure data privacy.
- Web-based GUI for non-technical users.
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.
Disclaimer: This agent is intended for educational purposes. Ensure you comply with the Terms of Service of any website you scrape.