A Python package for creating and managing agents.
Project description
seenu-agent
seenu-agent is a Python package that provides a framework for creating and managing agents to perform tasks like translation, summarization, and more. The package includes three main classes: Agent, Task, and TaskManager, allowing you to create complex workflows by chaining tasks together. Installation
Install the package using pip:
pip install seenu-agent
Below is a sample usage of the seenu-agent package:
Importing the Classes
from seenu_agent import Agent, Task, TaskManager
Creating Agents
** Translation Agent **
translation_llm = {'repo_name': 'Helsinki-NLP/opus-tatoeba-fi-en', 'operation': 'translation'} translation_agent = Agent(name='Translator', llm=translation_llm)
** Custom Function Agent **
def custom_function(text): return text.lower()
custom_agent = Agent(name='Custom Function Agent', function=custom_function)
Creating Tasks
translation_task = Task(name='Translation Task', task_id=1, agent=translation_agent) custom_task = Task(name='Custom Function Task', task_id=3, agent=custom_agent)
Managing Tasks
task_manager = TaskManager() task_manager.add_task(translation_task) task_manager.add_task(custom_task)
Running Tasks
Sequential Mode
input_texts = ["Your text here..."] sequential_results = task_manager.run(input_texts, mode='sequential')
for i, task_results in enumerate(sequential_results): print(f"Task {i+1} Results:") for result in task_results: print(f" Result : {result}")
Example Output
plaintext
Sequential Task Output: Task 1 Results: Result : Translated text here... Task 2 Results: Result : Summarized text here... Task 3 Results: Result : Transformed text here...
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seenu_agent-0.4.1.tar.gz.
File metadata
- Download URL: seenu_agent-0.4.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2e4d6cd81e3098c0f711625f9fab56845d656cedc10321392cf824ce643382f
|
|
| MD5 |
3fa9c37f1a4ac8f88ecd483445fe4bf1
|
|
| BLAKE2b-256 |
6c04df966f0ef826da92d4c16d3a5dbc83dfb3eb8574cfb6f92b3cd2aab3f99d
|
File details
Details for the file seenu_agent-0.4.1-py3-none-any.whl.
File metadata
- Download URL: seenu_agent-0.4.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed01a5fb2764229ba359eefd1b5d89664ffb71063b7a39f3173b0af25243b22
|
|
| MD5 |
c82db90356a6aceda325f4271b9a6eae
|
|
| BLAKE2b-256 |
818649e2b8a9bc119fb6ec9f38554eaf2655ccd05a8edd6480380aabb82dc28b
|