An abstract base class for building various agent-based systems.
Project description
BaseAgent
BaseAgent is an abstract base class designed to support the development of various agent-based systems. It provides a structured approach to creating agents with initialization, execution, and cleanup phases.
Installation
To install BaseAgent, you can use pip directly from GitHub:
pip install git+https://github.com/chigwell/BaseAgent.git
Usage
BaseAgent is intended to be subclassed by other classes that implement specific agent behaviors. Here's an example of how to create a concrete agent:
from base_agent import BaseAgent
class MyAgent(BaseAgent):
def initialize(self, config):
print("Initializing with config:", config)
def execute(self, task):
print("Executing task:", task)
return "Task Completed"
def finalize(self):
print("Cleaning up resources.")
# Example usage
if __name__ == "__main__":
agent = MyAgent()
agent.initialize(config={"setting": "value"})
result = agent.execute(task="Example Task")
print(result)
agent.finalize()
This example demonstrates the basic structure of an agent that can be built using the BaseAgent framework.
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
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 base_agent-2025.5.180920.tar.gz.
File metadata
- Download URL: base_agent-2025.5.180920.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4eb65f8e445edb0090626758f13064457722d5e5c20021bbd807e92b661a8fc
|
|
| MD5 |
e9e236d92c2ff9ba999c2e048b05a602
|
|
| BLAKE2b-256 |
6a6c27fd905821270dcaeac94250646cc2cc596e78b49de15b7e007afa65bac5
|
File details
Details for the file base_agent-2025.5.180920-py3-none-any.whl.
File metadata
- Download URL: base_agent-2025.5.180920-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d7bec851b817072ef55e91f40c79712709a19b9a6febee0f5105061500cb3af
|
|
| MD5 |
6a6ce6264404db2a014a4b68ce53b0c0
|
|
| BLAKE2b-256 |
c45df9fbd1458cdd62dbbfc4f4a08c223aeac4168a45373ac6b85b895675d1dd
|