Skip to content

baokhanh546123/Tutorial-Simple-Agent-Skill-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Agent Skill: Automated News Intelligence & Summarization

Python Version License: MIT AI Model

1. Overview

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.

Key Capabilities:

  • 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/).

2. Project Architecture

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

3.Setup

3.1 Prerequisites

Ensure you have python 3.9+ , you can check it by command python --version with Windows and python3 --version with Linux/macOS

3.2 Enviroment Setup

It is highly recommended to use a virtual environment to isolate project dependencies.

Linux/macOS

python3 -m venv venv 
source venv/bin/activate

Windows

python -m venv venv
# Using Command Prompt:
venv\Scripts\activate
# Using PowerShell:
.\venv\Scripts\Activate.ps1

3.3 Installing dependencies

pip install -r requirement.txt

4.Cofiguration

  1. API 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_HERE
  1. Brand Identity: Modify references/brand_voice.txt to define how the AI should "speak" (e.g., formal, concise, or analytical).

5.Usage

The agent operates through a terminal-based interface. To initiate the skill, run:

python main.py

Execution Flow:

  1. Validation: The agent checks the URL for validity.
  2. Fetching: The fetch_news.py script extracts the HTML/Text content.
  3. Synthesis: The AI processes the raw text using the brand_voice.txt constraints.
  4. Formatting: The final output is structured based on summary_template.md.

6. Future Roadmap

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.

7. Contributing

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.

About

I will guess build and use one simple agent ai

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages