Skip to content

RITAMIT2023/mit-training

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI Agent Framework (Python)

This project implements a basic AI Agent framework in Python. It introduces a flexible and extensible base class called BaseAgent and two derived agent classes: β€’ GreetAgent: Greets a person with a good morning message. β€’ BirthdayAgent: Wishes someone a happy birthday.

The framework allows easy addition of new agents by simply defining new actions and agent classes.

ai-agent-framework/ β”œβ”€β”€ agents.py # Contains GreetAgent and BirthdayAgent classes β”œβ”€β”€ base_agent.py # BaseAgent class definition β”œβ”€β”€ main.py # Entry point to test agents └── README.md # Project overview and usage

πŸš€ Features β€’ 🧱 Modular and extensible base class (BaseAgent) β€’ 🀝 Custom actions passed dynamically to agents β€’ πŸŽ‰ Example agents to greet and wish birthdays β€’ πŸ“¦ Easy to plug and play in larger AI workflows

▢️ How to Run

  1. Clone the repository
    git clone https://github.com/shaiknawazz1/mit-training.git
    cd mit-training
  1. Run the agents
    python main.py

Example Output

[GreetAgent]: Processing request... Good morning, Alice! [BirthdayAgent]: Processing request... Happy Birthday, Bob! πŸŽ‰

To add a new agent: 1. Define a new action function. 2. Create a new class inheriting from BaseAgent and pass the action.

Example:

    def thank_action(name: str) -> str:
        return f"Thank you, {name}!"

    class ThankAgent(BaseAgent):
        def __init__(self):
            super().__init__("ThankAgent", "Sends a thank-you message.", thank_action)

πŸ“„ License

This project is open source and available under the MIT License.

About

training repo created for MIT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%